summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorSingh, Vimal <vimalsingh@ti.com>2008-12-12 00:10:57 +0000
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-09-04 09:39:11 +0100
commit9a73290d7735c0671d1d2379ed40025db8b773d0 (patch)
treec3f364a4b12ad972240b43fe41d9d8072008b145 /drivers/mtd/nand/nand_base.c
parent05dd180709fca14fbae617c0dab1bed56be334fc (diff)
mtd: nand_base: allow drivers to choose ECC block size
This patch allows core driver to choose ECC block size in sw ecc case. Signed-off-by: Vimal Singh <vimalsingh@ti.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r--drivers/mtd/nand/nand_base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 268c9a4317bd..4c5e8a74e1b2 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2728,7 +2728,8 @@ int nand_scan_tail(struct mtd_info *mtd)
chip->ecc.write_page_raw = nand_write_page_raw;
chip->ecc.read_oob = nand_read_oob_std;
chip->ecc.write_oob = nand_write_oob_std;
- chip->ecc.size = 256;
+ if (!chip->ecc.size)
+ chip->ecc.size = 256;
chip->ecc.bytes = 3;
break;