[PATCH 5/7] mtd: omap gpmc: reserve 14 byte/subpage for ECC in BCH8 romcode
Sascha Hauer
s.hauer at pengutronix.de
Fri Aug 1 06:29:13 PDT 2014
As done in the Kernel. The Kernel has a comment this is done to
be compatible with the ROM code.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mtd/nand/nand_omap_gpmc.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index 5ff1647..b1d266f 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -826,19 +826,13 @@ static int omap_gpmc_eccmode(struct gpmc_nand_info *oinfo,
omap_oobinfo.eccpos[i] = i + offset;
break;
case OMAP_ECC_BCH8_CODE_HW_ROMCODE:
- oinfo->nand.ecc.bytes = 13;
+ oinfo->nand.ecc.bytes = 13 + 1;
oinfo->nand.ecc.size = 512;
oinfo->nand.ecc.strength = BCH8_MAX_ERROR;
nand->ecc.read_page = omap_gpmc_read_page_bch_rom_mode;
omap_oobinfo.oobfree->length = 0;
j = 0;
- for (i = 2; i < 15; i++)
- omap_oobinfo.eccpos[j++] = i;
- for (i = 16; i < 29; i++)
- omap_oobinfo.eccpos[j++] = i;
- for (i = 30; i < 43; i++)
- omap_oobinfo.eccpos[j++] = i;
- for (i = 44; i < 57; i++)
+ for (i = 2; i < 58; i++)
omap_oobinfo.eccpos[j++] = i;
break;
case OMAP_ECC_SOFT:
--
2.0.1
More information about the barebox
mailing list