[PATCH v3 1/3] mtd-nand: Add "page" parameter to all read_page/read_page_raw APIs

Narnakaje, Snehaprabha nsnehaprabha at ti.com
Fri Jul 17 10:35:54 EDT 2009



> -----Original Message-----
> From: vimal singh [mailto:vimalsingh at ti.com]
> Sent: Friday, July 17, 2009 2:33 AM
> To: Narnakaje, Snehaprabha
> Cc: linux-mtd at lists.infradead.org; davinci-linux-open-
> source at linux.davincidsp.com; dwmw2 at infradead.org; tglx at linutronix.de;
> akpm at linux-foundation.org; Paulraj, Sandeep
> Subject: Re: [PATCH v3 1/3] mtd-nand: Add "page" parameter to all
> read_page/read_page_raw APIs
> 
> On Fri, Jul 17, 2009 at 3:29 AM, <nsnehaprabha at ti.com> wrote:
> > From: Sneha Narnakaje <nsnehaprabha at ti.com>
> >
> > This patch new "page" parameter to all NAND read_page/read_page_raw
> APIs.
> > The read_page API for the new mode ECC_HW_OOB_FIRST requires the page
> > information to send the READOOB command and read the OOB area before the
> > data area.
> >
> > This patch series applies to linux-mtd next (mmotm) GIT tree.
> > This patch is the same as v2 version of this patch.
> >
> > Reviewed-by: David Brownell <dbrownell at users.sourceforge.net>
> > Signed-off-by: Sneha Narnakaje <nsnehaprabha at ti.com>
> > Signed-off-by: Sandeep Paulraj <s-paulraj at ti.com>
> > ---
> >  drivers/mtd/nand/atmel_nand.c    |    2 +-
> >  drivers/mtd/nand/cafe_nand.c     |    2 +-
> >  drivers/mtd/nand/fsl_elbc_nand.c |    3 ++-
> >  drivers/mtd/nand/nand_base.c     |   18 ++++++++++--------
> >  drivers/mtd/nand/sh_flctl.c      |    2 +-
> >  include/linux/mtd/nand.h         |    4 ++--
> >  6 files changed, 17 insertions(+), 14 deletions(-)
> >
> 
> Why not just adding 'page' or 'cur_page' parameter to 'mtd_info' structure
> and
> populate the same in 'nand_do_read_ops' and 'nand_do_write_ops' as soon as
> you
> calculate 'page' for every read and write access respectivily. And then
> this
> info can be used by any one who has knowledge of 'mtd_info'.

Yes, that was one option. This meant, some of the existing handlers for read_oob and write_oob required changes to get rid of "page", if we decide to use the page from mtd_info structure.

Thanks
Sneha

> 
> -vimal
> 




More information about the linux-mtd mailing list