Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 20, 2014 at 01:12:35PM -0400, Santosh Shilimkar wrote:
> Boris,

Who's Boris? And why should Boris be taking this patch? It's an MTD
patch.

> On Thursday 20 March 2014 01:06 PM, Ivan Khoronzhuk wrote:
> > From: Murali Karicheri <m-karicheri2@xxxxxx>
> > 
> > After testing NAND flash with ubifs for k2hk-emv board were committed
> > that flash doesn't support subpage writing, so we can fix it by
> > adding a property to disable subpage write.

What flash? We try to autodetect NAND as much as possible. Perhaps we
should be adding infrastructure support instead of hacking it with a DT
property.

> > Signed-off-by: Murali Karicheri <m-karicheri2@xxxxxx>
> > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@xxxxxx>
> > ---
> Can you please pick this up for 3.15 fixes ? Ofcourse assuming DT folks
> are ok with the patch.
> 
> I can then take patch 1/3 and 3/3 in my 3.15 fixes queue.
> 
> >  Documentation/devicetree/bindings/mtd/davinci-nand.txt | 2 ++
> >  drivers/mtd/nand/davinci_nand.c                        | 3 +++
> >  2 files changed, 5 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mtd/davinci-nand.txt b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
> > index cfb18ab..50af930 100644
> > --- a/Documentation/devicetree/bindings/mtd/davinci-nand.txt
> > +++ b/Documentation/devicetree/bindings/mtd/davinci-nand.txt
> > @@ -53,6 +53,8 @@ Recommended properties :
> >  				identifier is saved in OOB area. If not present
> >  				false.
> >  
> > +- ti,davinci-nosubpage-write:	disable subpage write for the device

If we really need the DT property, I'd prefer a generic
"nand-numer-of-partial-programs" or something like that, and if it's
equal to 1, then the flash doesn't support partial page programming.

But I'd prefer not to encode that in DT if possible.

> >  Deprecated properties:
> >  
> >  - ti,davinci-ecc-mode:		operation mode of the NAND ecc mode. ECC mode
> > diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
> > index 4615d79..3ba058d 100644
> > --- a/drivers/mtd/nand/davinci_nand.c
> > +++ b/drivers/mtd/nand/davinci_nand.c
> > @@ -581,6 +581,9 @@ static struct davinci_nand_pdata
> >  		    of_property_read_bool(pdev->dev.of_node,
> >  			"ti,davinci-nand-use-bbt"))
> >  			pdata->bbt_options = NAND_BBT_USE_FLASH;
> > +		if (of_property_read_bool(pdev->dev.of_node,
> > +			"ti,davinci-no-subpage-write"))
> > +			pdata->options |= NAND_NO_SUBPAGE_WRITE;
> >  	}
> >  
> >  	return dev_get_platdata(&pdev->dev);
> > 
> 

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux