From: Bo Shen <voice.shen@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] MTD: atmel_nand: support for software BCH ECC
Date: Wed, 28 Aug 2013 14:54:26 +0000 [thread overview]
Message-ID: <1377701666-9632-1-git-send-email-voice.shen@gmail.com> (raw)
Add possible to use software BCH ECC for atmel nand driver
Signed-off-by: Bo Shen <voice.shen@gmail.com>
---
drivers/mtd/nand/atmel_nand.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 96aca00..52efbee 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1177,7 +1177,11 @@ int atmel_nand_chip_init(int devnum, ulong base_addr)
mtd->priv = nand;
nand->IO_ADDR_R = nand->IO_ADDR_W = (void __iomem *)base_addr;
+#ifdef CONFIG_NAND_ECC_BCH
+ nand->ecc.mode = NAND_ECC_SOFT_BCH;
+#else
nand->ecc.mode = NAND_ECC_SOFT;
+#endif
#ifdef CONFIG_SYS_NAND_DBW_16
nand->options = NAND_BUSWIDTH_16;
#endif
--
1.7.10.4
next reply other threads:[~2013-08-28 14:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 14:54 Bo Shen [this message]
2013-09-04 10:23 ` [U-Boot] [PATCH] MTD: atmel_nand: support for software BCH ECC Andreas Bießmann
2013-09-04 12:11 ` Bo Shen
2013-09-04 12:30 ` Andreas Bießmann
2013-09-04 12:46 ` Bo Shen
2013-09-04 15:15 ` Andreas Bießmann
2013-09-04 19:44 ` Scott Wood
2013-09-05 6:28 ` Andreas Bießmann
2013-09-05 17:25 ` Scott Wood
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=1377701666-9632-1-git-send-email-voice.shen@gmail.com \
--to=voice.shen@gmail.com \
--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