[PATCH] mtd: nand: Do not automatically set SUBPAGE_READ flag

Hattink, Tjalling [FINT] T.Hattink at fugro.nl
Fri Feb 21 10:23:07 EST 2014


The default nand_read_subpage implementation returns -ENOSUPP, so if you
use a large nand chip without a specific read_subpage implementation the
read operations will always fail.

This functionaliy can be restored when a proper nand_read_subpage is
implemented for the default driver.

Signed-off-by: Tjalling Hattink <t.hattink at fugro.nl>
---
 drivers/mtd/nand/nand_base.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 54d8ba3..bfd695b 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3562,10 +3562,6 @@ int nand_scan_tail(struct mtd_info *mtd)
        /* Invalidate the pagebuffer reference */
        chip->pagebuf = -1;
 
-       /* Large page NAND with SOFT_ECC should support subpage reads */
-       if ((chip->ecc.mode == NAND_ECC_SOFT) && (chip->page_shift > 9))
-               chip->options |= NAND_SUBPAGE_READ;
-
        /* Fill in remaining MTD driver data */
        mtd->type = MTD_NANDFLASH;
        mtd->flags = (chip->options & NAND_ROM) ? MTD_CAP_ROM :
-- 
1.8.3.2



More information about the barebox mailing list