From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Hattink, Tjalling [FINT]" <T.Hattink@fugro.nl>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] mtd: nand: Do not automatically set SUBPAGE_READ flag
Date: Mon, 24 Feb 2014 09:53:33 +0100 [thread overview]
Message-ID: <20140224085333.GU17250@pengutronix.de> (raw)
In-Reply-To: <C89EFD3CD56F64468D3D206D683A8D2203041AF3@ldam-msx2.fugro-nl.local>
Hi Tjalling,
On Fri, Feb 21, 2014 at 04:23:07PM +0100, Hattink, Tjalling [FINT] wrote:
> 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@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;
> -
Only barebox nand_read_subpage returns -ENOSUPP. The kernel has a
default implementation. Wouldn't it be possible (and better) to just
remove the return -ENOSUPP from nand_read_subpage and use the code which
we already have?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-02-24 8:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 15:23 Hattink, Tjalling [FINT]
2014-02-24 8:53 ` Sascha Hauer [this message]
2014-02-24 9:20 ` Hattink, Tjalling [FINT]
2014-02-24 9:25 ` Sascha Hauer
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=20140224085333.GU17250@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=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