[U-Boot] [PATCH 5/5] NAND: DaVinci: allow forced disable of subpage writes
Scott Wood
scottwood at freescale.com
Thu Feb 13 01:00:22 CET 2014
On Tue, 2014-01-28 at 23:19 +0000, Karicheri, Muralidharan wrote:
> >-----Original Message-----
> >From: Scott Wood [mailto:scottwood at freescale.com]
> >Sent: Wednesday, January 22, 2014 3:48 PM
> >To: Karicheri, Muralidharan
> >Cc: u-boot at lists.denx.de; Rini, Tom; Andrianov, Vitaly
> >Subject: Re: [U-Boot] [PATCH 5/5] NAND: DaVinci: allow forced disable of subpage writes
> >
> >On Mon, 2014-01-20 at 17:10 -0500, Murali Karicheri wrote:
> >> This patch introduces a configurable mechanism to disable subpage
> >> writes in the DaVinci NAND driver.
> >>
> >> Signed-off-by: Vitaly Andrianov <vitalya at ti.com>
> >> Signed-off-by: Murali Karicheri <m-karicheri2 at ti.com>
> >> ---
> >> drivers/mtd/nand/davinci_nand.c | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/drivers/mtd/nand/davinci_nand.c
> >> b/drivers/mtd/nand/davinci_nand.c index 5b17d7b..75b03a7 100644
> >> --- a/drivers/mtd/nand/davinci_nand.c
> >> +++ b/drivers/mtd/nand/davinci_nand.c
> >> @@ -609,6 +609,9 @@ void davinci_nand_init(struct nand_chip *nand)
> >> #ifdef CONFIG_SYS_NAND_USE_FLASH_BBT
> >> nand->bbt_options |= NAND_BBT_USE_FLASH;
> >> #endif
> >> +#ifdef CONFIG_SYS_NAND_NO_SUBPAGE_WRITE
> >> + nand->options |= NAND_NO_SUBPAGE_WRITE;
> >> +#endif
> >> #ifdef CONFIG_SYS_NAND_HW_ECC
> >> nand->ecc.mode = NAND_ECC_HW;
> >> nand->ecc.size = 512;
> >
> >Why does it need to be configurable?
> >
>
> Same driver used in multiple platforms, and on some platforms like the one
> I work with doesn't support subpage writes and has to be disabled.
The option needs to be documented, and it should be either named in a
davinci-specific manner, or the documentation should clearly list which
drivers pay attention to it.
It seems odd though, that the ability to support subpage writes is an
independent thing rather than a consequence of some other variable such
as controller version.
-Scott
More information about the U-Boot
mailing list