mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: Enable read_subpage functionality
@ 2014-02-28 13:45 Hattink, Tjalling [FINT]
  0 siblings, 0 replies; only message in thread
From: Hattink, Tjalling [FINT] @ 2014-02-28 13:45 UTC (permalink / raw)
  To: barebox

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@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-28 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-28 13:45 [PATCH] mtd: nand: Enable read_subpage functionality Hattink, Tjalling [FINT]

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox