summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorSingh, Vimal2008-12-12 01:10:57 +0100
committerDavid Woodhouse2009-09-04 10:39:11 +0200
commit9a73290d7735c0671d1d2379ed40025db8b773d0 (patch)
treec3f364a4b12ad972240b43fe41d9d8072008b145 /drivers/mtd
parentmtd: correct typo "MTD_DATAFLASH_VERIFY_WRITE" (diff)
downloadkernel-qcow2-linux-9a73290d7735c0671d1d2379ed40025db8b773d0.tar.gz
kernel-qcow2-linux-9a73290d7735c0671d1d2379ed40025db8b773d0.tar.xz
kernel-qcow2-linux-9a73290d7735c0671d1d2379ed40025db8b773d0.zip
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')
-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;