From f40f6db278f602b55820693634a7256b0b4e4b80 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Wed, 20 May 2009 10:58:03 +0200 Subject: [PATCH] nand: Fix problem with ECC ordering for PPC4xx NDFC platforms 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 Acked-by: Scott Wood --- drivers/mtd/nand/nand_ecc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c index 94923b9..463f9cb 100644 --- a/drivers/mtd/nand/nand_ecc.c +++ b/drivers/mtd/nand/nand_ecc.c @@ -48,6 +48,11 @@ #include #include +/* 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 -- 2.7.4