[PATCH] mtd: nand: Enable read_subpage functionality

Hattink, Tjalling [FINT] T.Hattink at fugro.nl
Fri Feb 28 08:45:18 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.

The return -ENOSUPP line is removed and the original implementation of
nand_read_subpage is restored (as used in the linux kernel). This allows
large nand chips to be used safely with automatic subpaging support.

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

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 54d8ba3..8c4203e 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1036,11 +1036,6 @@ static __maybe_unused int
nand_read_subpage(struct mtd_info *mtd,
 	int index = 0;
 	unsigned int max_bitflips = 0;
 
-	/*
-	 * Currently we have no users in barebox, so disable this for
now
-	 */
-	return -ENOTSUPP;
-
 	/* Column address within the page aligned to ECC size (256bytes)
*/
 	start_step = data_offs / chip->ecc.size;
 	end_step = (data_offs + readlen - 1) / chip->ecc.size;
-- 
1.8.3.2




More information about the barebox mailing list