Skip to contentSkip to conversation

ppc4xx: Fix ndfc HW ECC byte order

PATCH New Stefan Roese 1 participant 1 message Feb 1, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc4xx: Fix ndfc HW ECC byte order

The current ndfc HW ECC implementation swaps the first two ECC bytes. But the 4xx NDFC already uses the SMC (Smart Media Card) ECC ordering, so this swapping in the HW ECC driver is bogus. This patch fixes this problem and now really uses the SMC ECC byte order.

Thanks to Sean MacLennan for pointing this out.

---
 cpu/ppc4xx/ndfc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
cpu/ppc4xx/ndfc.c +2 -2
index ec1b38c..9e2229d 100644
@@ -121,8 +121,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;
Signature · 1 line
1.5.4.rc5