]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/nand/fsl_ifc_spl.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[u-boot] / drivers / mtd / nand / fsl_ifc_spl.c
index 510077282cd15996f099aa47d627c63eb0a1d6ad..fb827c5e74e096a37f71dcbdade8a5a350be6aaf 100644 (file)
@@ -97,7 +97,7 @@ int nand_spl_load_image(uint32_t offs, unsigned int uboot_size, void *vdst)
        int pages_per_blk;
        int blk_size;
        int bad_marker = 0;
-       int bufnum_mask, bufnum;
+       int bufnum_mask, bufnum, ver = 0;
 
        int csor, cspr;
        int pos = 0;
@@ -130,6 +130,10 @@ int nand_spl_load_image(uint32_t offs, unsigned int uboot_size, void *vdst)
                        bad_marker = 5;
        }
 
+       ver = ifc_in32(&ifc->ifc_rev);
+       if (ver >= FSL_IFC_V2_0_0)
+               bufnum_mask = (bufnum_mask * 2) + 1;
+
        pages_per_blk =
                32 << ((csor & CSOR_NAND_PB_MASK) >> CSOR_NAND_PB_SHIFT);
 
@@ -250,3 +254,13 @@ void nand_boot(void)
        uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START;
        uboot();
 }
+
+#ifndef CONFIG_SPL_NAND_INIT
+void nand_init(void)
+{
+}
+
+void nand_deselect(void)
+{
+}
+#endif