summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-02-01 09:38:29 +0100
committerStefan Roese <sr@denx.de>2008-02-04 11:47:40 +0100
commitff02f139804f3cb61414f7bbcbfdaa0279e3efae (patch)
treebe1532999fc3bbbe69f619296fa7ea2c837903e7 /cpu/ppc4xx
parente1d1429b49b0ee58c80f8c7b29c1ebaf8be7f5f1 (diff)
downloadu-boot-imx-ff02f139804f3cb61414f7bbcbfdaa0279e3efae.zip
u-boot-imx-ff02f139804f3cb61414f7bbcbfdaa0279e3efae.tar.gz
u-boot-imx-ff02f139804f3cb61414f7bbcbfdaa0279e3efae.tar.bz2
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. Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'cpu/ppc4xx')
-rw-r--r--cpu/ppc4xx/ndfc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpu/ppc4xx/ndfc.c b/cpu/ppc4xx/ndfc.c
index ec1b38c..9e2229d 100644
--- a/cpu/ppc4xx/ndfc.c
+++ b/cpu/ppc4xx/ndfc.c
@@ -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;