From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WHrIS-000415-8t for barebox@lists.infradead.org; Mon, 24 Feb 2014 08:53:57 +0000 Date: Mon, 24 Feb 2014 09:53:33 +0100 From: Sascha Hauer Message-ID: <20140224085333.GU17250@pengutronix.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH] mtd: nand: Do not automatically set SUBPAGE_READ flag To: "Hattink, Tjalling [FINT]" Cc: barebox@lists.infradead.org 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 > --- > 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