mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Hattink, Tjalling [FINT]" <T.Hattink@fugro.nl>
To: barebox@lists.infradead.org
Subject: [PATCH] mtd: nand: Enable read_subpage functionality
Date: Fri, 28 Feb 2014 14:45:18 +0100	[thread overview]
Message-ID: <C89EFD3CD56F64468D3D206D683A8D22030421B4@ldam-msx2.fugro-nl.local> (raw)

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

                 reply	other threads:[~2014-02-28 13:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C89EFD3CD56F64468D3D206D683A8D22030421B4@ldam-msx2.fugro-nl.local \
    --to=t.hattink@fugro.nl \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox