From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] ppc4xx: Fix problem with ECC ordering for PPC4xx NDFC platforms
Date: Wed, 20 May 2009 10:58:02 +0200 [thread overview]
Message-ID: <1242809883-10823-2-git-send-email-sr@denx.de> (raw)
In-Reply-To: <1242809883-10823-1-git-send-email-sr@denx.de>
This patch now uses the correct ECC byte order (Smart Media - SMC)
to be used on the 4xx NAND FLASH driver. Without this patch we have
incompatible ECC byte ordering to the Linux kernel NDFC driver.
Please note that we also have to enable CONFIG_MTD_NAND_ECC_SMC in
drivers/mtd/nand/nand_ecc.c for correct operation. This is done with
a seperate patch.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
---
cpu/ppc4xx/ndfc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpu/ppc4xx/ndfc.c b/cpu/ppc4xx/ndfc.c
index ba481ad..971e2ae 100644
--- a/cpu/ppc4xx/ndfc.c
+++ b/cpu/ppc4xx/ndfc.c
@@ -93,8 +93,8 @@ static int ndfc_calculate_ecc(struct mtd_info *mtdinfo,
/* The NDFC uses Smart Media (SMC) bytes order
*/
- ecc_code[0] = p[1];
- ecc_code[1] = p[2];
+ ecc_code[0] = p[2];
+ ecc_code[1] = p[1];
ecc_code[2] = p[3];
return 0;
--
1.6.2.5
next prev parent reply other threads:[~2009-05-20 8:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 8:58 [U-Boot] [PATCH 1/3] ppc4xx: Move definition for PPC4xx NAND FLASH controller to header Stefan Roese
2009-05-20 8:58 ` Stefan Roese [this message]
2009-05-20 8:58 ` [U-Boot] [PATCH 3/3] nand: Fix problem with ECC ordering for PPC4xx NDFC platforms Stefan Roese
2009-05-20 18:52 ` [U-Boot] [PATCH 1/3] ppc4xx: Move definition for PPC4xx NAND FLASH controller to header Scott Wood
2009-05-23 10:47 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242809883-10823-2-git-send-email-sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox