]> git.sur5r.net Git - u-boot/commitdiff
Common: SPL: spl_nand: Fixed debug correct NAND ECC type.
authorAhmed Samir Khalil <engkhalil86@gmail.com>
Fri, 25 Mar 2016 12:13:17 +0000 (13:13 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 1 Apr 2016 21:17:42 +0000 (17:17 -0400)
In case of #define DEBUG 1 (fordebugging SPL). A bug in
spl_nand_load_image() will be triggered, because it prints
using hw ecc regardless of soft ecc configurations and
initializations.

Signed-off-by: Ahmed Samir <engkhalil86@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
common/spl/spl_nand.c

index 3e2c07405003931c2bc30817f28bcf000140e917..79388ff326a828f89eea814edf66e7b03d7ac5a2 100644 (file)
@@ -44,7 +44,11 @@ int spl_nand_load_image(void)
        int *src __attribute__((unused));
        int *dst __attribute__((unused));
 
+#ifdef CONFIG_SPL_NAND_SOFTECC
+       debug("spl: nand - using sw ecc\n");
+#else
        debug("spl: nand - using hw ecc\n");
+#endif
        nand_init();
 
        /*use CONFIG_SYS_TEXT_BASE as temporary storage area */