nand: Fix problem with ECC ordering for PPC4xx NDFC platforms
authorStefan Roese <sr@denx.de>
Wed, 20 May 2009 08:58:03 +0000 (10:58 +0200)
committerStefan Roese <sr@denx.de>
Sat, 23 May 2009 10:51:39 +0000 (12:51 +0200)
This patch enables Smart Media (SMC) ECC byte ordering which is used
on the PPC4xx NAND FLASH controller (NDFC). Without this patch we have
incompatible ECC byte ordering to the Linux kernel NDFC driver.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Scott Wood <scottwood@freescale.com>
drivers/mtd/nand/nand_ecc.c

index 94923b9..463f9cb 100644 (file)
 #include <asm/errno.h>
 #include <linux/mtd/mtd.h>
 
+/* The PPC4xx NDFC uses Smart Media (SMC) bytes order */
+#ifdef CONFIG_NAND_NDFC
+#define CONFIG_MTD_NAND_ECC_SMC
+#endif
+
 /*
  * NAND-SPL has no sofware ECC for now, so don't include nand_calculate_ecc(),
  * only nand_correct_data() is needed