Conditionally perform common relocation fixups
[oweals/u-boot.git] / drivers / mtd / nand / ndfc.c
index 528b22b49aeb32ec2a57720d385a080c12bd9a8d..0dd678958276521c0c64c1dfad177d95c3d6e2ea 100644 (file)
@@ -89,8 +89,8 @@ static int ndfc_calculate_ecc(struct mtd_info *mtdinfo,
 
        /* The NDFC uses Smart Media (SMC) bytes order
         */
-       ecc_code[0] = p[2];
-       ecc_code[1] = p[1];
+       ecc_code[0] = p[1];
+       ecc_code[1] = p[2];
        ecc_code[2] = p[3];
 
        return 0;
@@ -207,8 +207,8 @@ int board_nand_init(struct nand_chip *nand)
         */
        mtebc(EBC0_CFG, 0xb8400000);
 
-       mtebc(pb0cr, CONFIG_SYS_EBC_PB0CR);
-       mtebc(pb0ap, CONFIG_SYS_EBC_PB0AP);
+       mtebc(PB0CR, CONFIG_SYS_EBC_PB0CR);
+       mtebc(PB0AP, CONFIG_SYS_EBC_PB0AP);
 #endif
 
        chip++;