From: Teresa Remmet <t.remmet@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH for next] mtd: nand: nand_omap_gpmc: Fix GPMC_BCH_RESULT offset
Date: Wed, 19 Dec 2018 13:27:53 +0100 [thread overview]
Message-ID: <1545222473-22214-1-git-send-email-t.remmet@phytec.de> (raw)
Using BCH rom code mode we start calculating with GPMC_BCH_RESULTx_1.
Fix offset for correct error correction.
Fixes: d4077860c902 ("mtd: nand: omap: unbreak BCH8 support")
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
drivers/mtd/nand/nand_omap_gpmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index 277e23e57f7d..2dcf7e723b9f 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -676,7 +676,7 @@ static int omap_gpmc_read_page_bch_rom_mode(struct mtd_info *mtd,
p = buf;
for (i = 0, j = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize, j++) {
- __omap_calculate_ecc(mtd, &ecc_calc[i - j], j);
+ __omap_calculate_ecc(mtd, &ecc_calc[i - j], j + 1);
stat = omap_correct_bch(mtd, p, &ecc_code[i], &ecc_calc[i - j]);
if (stat < 0) {
mtd->ecc_stats.failed++;
--
2.7.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2018-12-19 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 12:27 Teresa Remmet [this message]
2018-12-20 7:52 ` Sascha Hauer
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=1545222473-22214-1-git-send-email-t.remmet@phytec.de \
--to=t.remmet@phytec.de \
--cc=barebox@lists.infradead.org \
/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