mtd: nand_base: allow drivers to choose ECC block size

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Sep 4 04:59:03 EDT 2009


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9a73290d7735c0671d1d2379ed40025db8b773d0
Commit:     9a73290d7735c0671d1d2379ed40025db8b773d0
Parent:     05dd180709fca14fbae617c0dab1bed56be334fc
Author:     Singh, Vimal <vimalsingh at ti.com>
AuthorDate: Fri Dec 12 00:10:57 2008 +0000
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Sep 4 09:39:11 2009 +0100

    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 at ti.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/nand_base.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 268c9a4..4c5e8a7 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;
 



More information about the linux-mtd-cvs mailing list