]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mpc8xxx: improve LAW error messages when setting up DDR
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 7 Oct 2009 20:34:28 +0000 (16:34 -0400)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 16 Oct 2009 15:21:39 +0000 (10:21 -0500)
When setting up the LAWs for the DDR, if there was an error,
you got the not-so-helpful error text "ERROR" and nothing
else.  Not only is it non-informative, but it is also
pretty frustrating trying to grep for "ERROR" in the source.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
cpu/mpc8xxx/ddr/util.c

index 4451989a02b5434eb1a2a22f23f79a0827ccbae8..1e2d921286e98050b90add2dca8bff8b3f288c0a 100644 (file)
@@ -89,17 +89,18 @@ __fsl_ddr_set_lawbar(const common_timing_params_t *memctl_common_params,
                        ? LAW_TRGT_IF_DDR_INTRLV : LAW_TRGT_IF_DDR_1;
 
                if (set_ddr_laws(base, size, lawbar1_target_id) < 0) {
-                       printf("ERROR\n");
+                       printf("%s: ERROR (ctrl #0, intrlv=%d)\n", __func__,
+                               memctl_interleaved);
                        return ;
                }
        } else if (ctrl_num == 1) {
                if (set_ddr_laws(base, size, LAW_TRGT_IF_DDR_2) < 0) {
-                       printf("ERROR\n");
+                       printf("%s: ERROR (ctrl #1)\n", __func__);
                        return ;
                }
        } else {
-               printf("unexpected controller number %u in %s\n",
-                       ctrl_num, __FUNCTION__);
+               printf("%s: unexpected DDR controller number (%u)\n", __func__,
+                       ctrl_num);
        }
 }