summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/omap_gpmc.c
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2013-12-12 15:19:31 +0200
committerScott Wood <scottwood@freescale.com>2013-12-17 17:41:25 -0600
commit2528460c38dfaffe7ae430244d1fa119087c1b01 (patch)
tree96b4ebc087077dc0eb8309cbfb688960d0b7a507 /drivers/mtd/nand/omap_gpmc.c
parent5d7a49b930156514ce9d418e26b5bf21673fd399 (diff)
downloadtalos-obmc-uboot-2528460c38dfaffe7ae430244d1fa119087c1b01.tar.gz
talos-obmc-uboot-2528460c38dfaffe7ae430244d1fa119087c1b01.zip
mtd: nand: omap: fix HAM1_SW ecc using default value for ecc.size
Commit "mtd: nand: omap: enable BCH ECC scheme using ELM for generic platform" (d016dc42cedbf6102e100fa9ecb58462edfb14f8) changed the way software ECC is configured, both during boot, and during ecc switch, in a way that is not backwards compatible with older systems: Older version of omap_gpmc.c always assigned ecc.size = 0 when configuring for software ecc, relying on nand_scan_tail() to select a default for ecc.size (256), while the new version of omap_gpmc.c assigns ecc.size = pagesize, which is likely to not be 256. Since 1 bit hamming sw ecc is only meant to be used by legacy devices, revert to the original behavior. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@ti.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Pekon Gupta <pekon@ti.com> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Pekon Gupta <pekon@ti.com>
Diffstat (limited to 'drivers/mtd/nand/omap_gpmc.c')
-rw-r--r--drivers/mtd/nand/omap_gpmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index 20679694f3..d5c4c2269c 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -776,7 +776,7 @@ static int omap_select_ecc_scheme(struct nand_chip *nand,
bch_priv.type = 0;
nand->ecc.mode = NAND_ECC_SOFT;
nand->ecc.layout = NULL;
- nand->ecc.size = pagesize;
+ nand->ecc.size = 0;
bch->ecc_scheme = OMAP_ECC_HAM1_CODE_SW;
break;
OpenPOWER on IntegriCloud