[PATCH v3 1/3] mtd-nand: Add "page" parameter to all read_page/read_page_raw APIs
vimal singh
vimalsingh at ti.com
Fri Jul 17 03:11:06 EDT 2009
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'.
-vimal
More information about the linux-mtd
mailing list