* [PATCH 0/3] Fix NAND propeties for k2hk-evm @ 2014-03-20 17:06 Ivan Khoronzhuk 2014-03-20 17:06 ` [PATCH 1/3] ARM: dts: k2hk-evm: set ubifs partition size for 512M NAND Ivan Khoronzhuk ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Ivan Khoronzhuk @ 2014-03-20 17:06 UTC (permalink / raw) To: dwmw2, computersforpeace, galak, santosh.shilimkar Cc: mark.rutland, devicetree, grygorii.strashko, linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, rob, Ivan Khoronzhuk, linux-arm-kernel This series is intedent to fix problems founded when checked NAND flash for k2hk-emv board rev2.0. Whithout this series we cannot use ubifs and whole volume of present NAND memory. Based on linux-next tag: next-20140320 Murali Karicheri (3): ARM: dts: k2hk-evm: set ubifs partition size for 512M NAND mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option ARM: dts: k2hk-evm: disable subpage write for davinci nand device Documentation/devicetree/bindings/mtd/davinci-nand.txt | 2 ++ arch/arm/boot/dts/k2hk-evm.dts | 3 ++- drivers/mtd/nand/davinci_nand.c | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) -- 1.8.3.2 ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/3] ARM: dts: k2hk-evm: set ubifs partition size for 512M NAND 2014-03-20 17:06 [PATCH 0/3] Fix NAND propeties for k2hk-evm Ivan Khoronzhuk @ 2014-03-20 17:06 ` Ivan Khoronzhuk 2014-03-20 17:06 ` [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option Ivan Khoronzhuk 2014-03-20 17:06 ` [PATCH 3/3] ARM: dts: k2hk-evm: disable subpage write for davinci nand device Ivan Khoronzhuk 2 siblings, 0 replies; 15+ messages in thread From: Ivan Khoronzhuk @ 2014-03-20 17:06 UTC (permalink / raw) To: dwmw2, computersforpeace, galak, santosh.shilimkar Cc: mark.rutland, devicetree, grygorii.strashko, linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, Ivan Khoronzhuk, linux-arm-kernel From: Murali Karicheri <m-karicheri2@ti.com> The UBIFS partition size was incorrectly defined as for 128M NAND, but on k2hk-evm installed NAND flash size is 512M. Hence, correct it. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> --- arch/arm/boot/dts/k2hk-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/k2hk-evm.dts b/arch/arm/boot/dts/k2hk-evm.dts index 1a1335b..949ef7d 100644 --- a/arch/arm/boot/dts/k2hk-evm.dts +++ b/arch/arm/boot/dts/k2hk-evm.dts @@ -133,7 +133,7 @@ partition@180000 { label = "ubifs"; - reg = <0x180000 0x7E80000>; + reg = <0x180000 0x1fe80000>; }; }; }; -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 17:06 [PATCH 0/3] Fix NAND propeties for k2hk-evm Ivan Khoronzhuk 2014-03-20 17:06 ` [PATCH 1/3] ARM: dts: k2hk-evm: set ubifs partition size for 512M NAND Ivan Khoronzhuk @ 2014-03-20 17:06 ` Ivan Khoronzhuk 2014-03-20 17:12 ` Santosh Shilimkar 2014-03-20 17:06 ` [PATCH 3/3] ARM: dts: k2hk-evm: disable subpage write for davinci nand device Ivan Khoronzhuk 2 siblings, 1 reply; 15+ messages in thread From: Ivan Khoronzhuk @ 2014-03-20 17:06 UTC (permalink / raw) To: dwmw2, computersforpeace, galak, santosh.shilimkar Cc: mark.rutland, devicetree, grygorii.strashko, linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, Ivan Khoronzhuk, linux-arm-kernel From: Murali Karicheri <m-karicheri2@ti.com> 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. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> --- 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 + 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); -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 17:06 ` [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option Ivan Khoronzhuk @ 2014-03-20 17:12 ` Santosh Shilimkar 2014-03-20 17:29 ` Brian Norris 0 siblings, 1 reply; 15+ messages in thread From: Santosh Shilimkar @ 2014-03-20 17:12 UTC (permalink / raw) To: computersforpeace Cc: mark.rutland, devicetree, grygorii.strashko, linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, galak, Ivan Khoronzhuk, dwmw2, linux-arm-kernel Boris, On Thursday 20 March 2014 01:06 PM, Ivan Khoronzhuk wrote: > From: Murali Karicheri <m-karicheri2@ti.com> > > 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. > > Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> > --- 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 > + > 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); > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 17:12 ` Santosh Shilimkar @ 2014-03-20 17:29 ` Brian Norris 2014-03-20 17:37 ` Santosh Shilimkar 0 siblings, 1 reply; 15+ messages in thread From: Brian Norris @ 2014-03-20 17:29 UTC (permalink / raw) To: Santosh Shilimkar Cc: mark.rutland, devicetree, grygorii.strashko, linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, galak, Ivan Khoronzhuk, dwmw2, linux-arm-kernel 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@ti.com> > > > > 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@ti.com> > > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> > > --- > 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 17:29 ` Brian Norris @ 2014-03-20 17:37 ` Santosh Shilimkar 2014-03-20 17:44 ` Warner Losh 2014-03-20 18:42 ` Brian Norris 0 siblings, 2 replies; 15+ messages in thread From: Santosh Shilimkar @ 2014-03-20 17:37 UTC (permalink / raw) To: Brian Norris Cc: mark.rutland, devicetree, grygorii.strashko, linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, galak, Ivan Khoronzhuk, dwmw2, linux-arm-kernel On Thursday 20 March 2014 01:29 PM, Brian Norris wrote: > 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. > I got your name completely wrong. Sorry.... >> On Thursday 20 March 2014 01:06 PM, Ivan Khoronzhuk wrote: >>> From: Murali Karicheri <m-karicheri2@ti.com> >>> >>> 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. > We can't auto detect it and thats why the DT approach was taken. We will double check that. >>> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> >>> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> >>> --- >> 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. > OK. It can be updated as you suggested. Thanks for quick response and sorry for the rename Regards, Santosh ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 17:37 ` Santosh Shilimkar @ 2014-03-20 17:44 ` Warner Losh 2014-03-20 18:02 ` Santosh Shilimkar 2014-03-20 18:42 ` Brian Norris 1 sibling, 1 reply; 15+ messages in thread From: Warner Losh @ 2014-03-20 17:44 UTC (permalink / raw) To: Santosh Shilimkar Cc: mark.rutland, devicetree, grygorii.strashko, Russell King - ARM Linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, galak, Ivan Khoronzhuk, Brian Norris, David Woodhouse, linux-arm-kernel On Mar 20, 2014, at 11:37 AM, Santosh Shilimkar <santosh.shilimkar@ti.com> wrote: > > > On Thursday 20 March 2014 01:29 PM, Brian Norris wrote: >> 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. >> > I got your name completely wrong. Sorry.... > >>> On Thursday 20 March 2014 01:06 PM, Ivan Khoronzhuk wrote: >>>> From: Murali Karicheri <m-karicheri2@ti.com> >>>> >>>> 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. >> > We can't auto detect it and thats why the DT approach was taken. We > will double check that. I though sub page writing was one of the fields in the onfi and/or jedec(toggle) meta data structures. Have you looked there? Warner ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 17:44 ` Warner Losh @ 2014-03-20 18:02 ` Santosh Shilimkar 2014-03-20 18:09 ` Warner Losh 2014-03-20 18:54 ` Brian Norris 0 siblings, 2 replies; 15+ messages in thread From: Santosh Shilimkar @ 2014-03-20 18:02 UTC (permalink / raw) To: Warner Losh Cc: mark.rutland, devicetree, grygorii.strashko, Russell King - ARM Linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, galak, Ivan Khoronzhuk, Brian Norris, David Woodhouse, linux-arm-kernel On Thursday 20 March 2014 01:44 PM, Warner Losh wrote: > > On Mar 20, 2014, at 11:37 AM, Santosh Shilimkar <santosh.shilimkar@ti.com> wrote: > >> >> >> On Thursday 20 March 2014 01:29 PM, Brian Norris wrote: >>> 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. >>> >> I got your name completely wrong. Sorry.... >> >>>> On Thursday 20 March 2014 01:06 PM, Ivan Khoronzhuk wrote: >>>>> From: Murali Karicheri <m-karicheri2@ti.com> >>>>> >>>>> 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. >>> >> We can't auto detect it and thats why the DT approach was taken. We >> will double check that. > > I though sub page writing was one of the fields in the onfi and/or jedec(toggle) meta data structures. Have you looked there? > Am not sure if I follow you. The limitation is from the TI NAND controller(AEMIF) and not the NAND memory. regards, Santosh ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 18:02 ` Santosh Shilimkar @ 2014-03-20 18:09 ` Warner Losh 2014-03-20 18:54 ` Brian Norris 1 sibling, 0 replies; 15+ messages in thread From: Warner Losh @ 2014-03-20 18:09 UTC (permalink / raw) To: Santosh Shilimkar Cc: mark.rutland, devicetree, grygorii.strashko, Russell King - ARM Linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, galak, Ivan Khoronzhuk, Brian Norris, David Woodhouse, linux-arm-kernel On Mar 20, 2014, at 12:02 PM, Santosh Shilimkar <santosh.shilimkar@ti.com> wrote: > On Thursday 20 March 2014 01:44 PM, Warner Losh wrote: >> >> On Mar 20, 2014, at 11:37 AM, Santosh Shilimkar <santosh.shilimkar@ti.com> wrote: >> >>> >>> >>> On Thursday 20 March 2014 01:29 PM, Brian Norris wrote: >>>> 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. >>>> >>> I got your name completely wrong. Sorry.... >>> >>>>> On Thursday 20 March 2014 01:06 PM, Ivan Khoronzhuk wrote: >>>>>> From: Murali Karicheri <m-karicheri2@ti.com> >>>>>> >>>>>> 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. >>>> >>> We can't auto detect it and thats why the DT approach was taken. We >>> will double check that. >> >> I though sub page writing was one of the fields in the onfi and/or jedec(toggle) meta data structures. Have you looked there? >> > Am not sure if I follow you. The limitation is from the TI NAND controller(AEMIF) and > not the NAND memory. Then never mind. I thought it was the other side of things. Warner ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 18:02 ` Santosh Shilimkar 2014-03-20 18:09 ` Warner Losh @ 2014-03-20 18:54 ` Brian Norris 2014-03-20 19:11 ` Santosh Shilimkar 1 sibling, 1 reply; 15+ messages in thread From: Brian Norris @ 2014-03-20 18:54 UTC (permalink / raw) To: Santosh Shilimkar Cc: mark.rutland, devicetree, grygorii.strashko, Russell King - ARM Linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, Murali Karicheri, robh+dt, linux-mtd, linux-arm-kernel, rob, galak, Ivan Khoronzhuk, David Woodhouse, Warner Losh On Thu, Mar 20, 2014 at 02:02:39PM -0400, Santosh Shilimkar wrote: > On Thursday 20 March 2014 01:44 PM, Warner Losh wrote: > > I though sub page writing was one of the fields in the onfi and/or jedec(toggle) meta data structures. Have you looked there? > > > Am not sure if I follow you. The limitation is from the TI NAND controller(AEMIF) and > not the NAND memory. That doesn't match the patch description, which says "that flash doesn't support subpage writing". Flash != flash controller. Which one is it? If it's a controller limitation, I think we should be able to pull this from a "compatible" property, no? Brian ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 18:54 ` Brian Norris @ 2014-03-20 19:11 ` Santosh Shilimkar 2014-03-20 19:26 ` Ivan Khoronzhuk 0 siblings, 1 reply; 15+ messages in thread From: Santosh Shilimkar @ 2014-03-20 19:11 UTC (permalink / raw) To: Brian Norris Cc: mark.rutland, devicetree, grygorii.strashko, Russell King - ARM Linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, Murali Karicheri, robh+dt, linux-mtd, linux-arm-kernel, rob, galak, Ivan Khoronzhuk, David Woodhouse, Warner Losh On Thursday 20 March 2014 02:54 PM, Brian Norris wrote: > On Thu, Mar 20, 2014 at 02:02:39PM -0400, Santosh Shilimkar wrote: >> On Thursday 20 March 2014 01:44 PM, Warner Losh wrote: >>> I though sub page writing was one of the fields in the onfi and/or jedec(toggle) meta data structures. Have you looked there? >>> >> Am not sure if I follow you. The limitation is from the TI NAND controller(AEMIF) and >> not the NAND memory. > > That doesn't match the patch description, which says "that flash doesn't > support subpage writing". Flash != flash controller. > Patch description is indeed doesn't reflect the actual issue. > Which one is it? If it's a controller limitation, I think we should be > able to pull this from a "compatible" property, no? > Just to be accurate, the limitation(bug) is on the controller found on Keystone SOCs. AEMIF controller is also used on DaVinci SOCs which don't seems to have any issue. So even for compatible, you need to add keystone specific one. Hence thought dt property is better option. regards, Santosh ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 19:11 ` Santosh Shilimkar @ 2014-03-20 19:26 ` Ivan Khoronzhuk 2014-03-20 19:28 ` Santosh Shilimkar 0 siblings, 1 reply; 15+ messages in thread From: Ivan Khoronzhuk @ 2014-03-20 19:26 UTC (permalink / raw) To: Santosh Shilimkar, Brian Norris Cc: mark.rutland, devicetree, grygorii.strashko, Russell King - ARM Linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, Murali Karicheri, robh+dt, linux-mtd, linux-arm-kernel, rob, galak, David Woodhouse, Warner Losh On 03/20/2014 09:11 PM, Santosh Shilimkar wrote: > On Thursday 20 March 2014 02:54 PM, Brian Norris wrote: >> On Thu, Mar 20, 2014 at 02:02:39PM -0400, Santosh Shilimkar wrote: >>> On Thursday 20 March 2014 01:44 PM, Warner Losh wrote: >>>> I though sub page writing was one of the fields in the onfi and/or jedec(toggle) meta data structures. Have you looked there? >>>> >>> Am not sure if I follow you. The limitation is from the TI NAND controller(AEMIF) and >>> not the NAND memory. >> That doesn't match the patch description, which says "that flash doesn't >> support subpage writing". Flash != flash controller. >> > Patch description is indeed doesn't reflect the actual issue. > >> Which one is it? If it's a controller limitation, I think we should be >> able to pull this from a "compatible" property, no? >> > Just to be accurate, the limitation(bug) is on the controller found on Keystone > SOCs. AEMIF controller is also used on DaVinci SOCs which don't seems to have > any issue. So even for compatible, you need to add keystone specific one. > Hence thought dt property is better option. > > regards, > Santosh > I will use compatible approach. We have keystone compatible in k2hk-evm.dts, so I need to add it only in the davinci-nand driver. I will add the following: if (of_device_is_compatible(np, "ti,keystone-nand")) { pdata->options |= NAND_NO_SUBPAGE_WRITE; } ... static const struct of_device_id davinci_nand_of_match[] = { {.compatible = "ti,davinci-nand", }, {.compatible = "ti,keystone-nand", }, {}, }; -- Regards, Ivan Khoronzhuk ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 19:26 ` Ivan Khoronzhuk @ 2014-03-20 19:28 ` Santosh Shilimkar 0 siblings, 0 replies; 15+ messages in thread From: Santosh Shilimkar @ 2014-03-20 19:28 UTC (permalink / raw) To: Ivan Khoronzhuk, Brian Norris Cc: mark.rutland, devicetree, grygorii.strashko, Russell King - ARM Linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, Murali Karicheri, robh+dt, linux-mtd, linux-arm-kernel, rob, galak, David Woodhouse, Warner Losh On Thursday 20 March 2014 03:26 PM, Ivan Khoronzhuk wrote: > > On 03/20/2014 09:11 PM, Santosh Shilimkar wrote: >> On Thursday 20 March 2014 02:54 PM, Brian Norris wrote: >>> On Thu, Mar 20, 2014 at 02:02:39PM -0400, Santosh Shilimkar wrote: >>>> On Thursday 20 March 2014 01:44 PM, Warner Losh wrote: >>>>> I though sub page writing was one of the fields in the onfi and/or jedec(toggle) meta data structures. Have you looked there? >>>>> >>>> Am not sure if I follow you. The limitation is from the TI NAND controller(AEMIF) and >>>> not the NAND memory. >>> That doesn't match the patch description, which says "that flash doesn't >>> support subpage writing". Flash != flash controller. >>> >> Patch description is indeed doesn't reflect the actual issue. >> >>> Which one is it? If it's a controller limitation, I think we should be >>> able to pull this from a "compatible" property, no? >>> >> Just to be accurate, the limitation(bug) is on the controller found on Keystone >> SOCs. AEMIF controller is also used on DaVinci SOCs which don't seems to have >> any issue. So even for compatible, you need to add keystone specific one. >> Hence thought dt property is better option. >> > > I will use compatible approach. > We have keystone compatible in k2hk-evm.dts, > so I need to add it only in the davinci-nand driver. > I will add the following: > > if (of_device_is_compatible(np, "ti,keystone-nand")) { > pdata->options |= NAND_NO_SUBPAGE_WRITE; > } > > ... > > static const struct of_device_id davinci_nand_of_match[] = { > {.compatible = "ti,davinci-nand", }, > {.compatible = "ti,keystone-nand", }, > {}, > }; > Looks good. I think you should go ahead and respin the patch with above. Regards, Santosh ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option 2014-03-20 17:37 ` Santosh Shilimkar 2014-03-20 17:44 ` Warner Losh @ 2014-03-20 18:42 ` Brian Norris 1 sibling, 0 replies; 15+ messages in thread From: Brian Norris @ 2014-03-20 18:42 UTC (permalink / raw) To: Santosh Shilimkar Cc: mark.rutland, devicetree, grygorii.strashko, linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, galak, Ivan Khoronzhuk, dwmw2, linux-arm-kernel On Thu, Mar 20, 2014 at 01:37:42PM -0400, Santosh Shilimkar wrote: > On Thursday 20 March 2014 01:29 PM, Brian Norris wrote: > > 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. > > > I got your name completely wrong. Sorry.... I see. Maybe you were just dropping letters from "BrianNorris" :) Regards, Brian ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 3/3] ARM: dts: k2hk-evm: disable subpage write for davinci nand device 2014-03-20 17:06 [PATCH 0/3] Fix NAND propeties for k2hk-evm Ivan Khoronzhuk 2014-03-20 17:06 ` [PATCH 1/3] ARM: dts: k2hk-evm: set ubifs partition size for 512M NAND Ivan Khoronzhuk 2014-03-20 17:06 ` [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option Ivan Khoronzhuk @ 2014-03-20 17:06 ` Ivan Khoronzhuk 2 siblings, 0 replies; 15+ messages in thread From: Ivan Khoronzhuk @ 2014-03-20 17:06 UTC (permalink / raw) To: dwmw2, computersforpeace, galak, santosh.shilimkar Cc: mark.rutland, devicetree, grygorii.strashko, linux, pawel.moll, ijc+devicetree, linux-doc, linux-kernel, robh+dt, linux-mtd, Murali Karicheri, rob, Ivan Khoronzhuk, linux-arm-kernel From: Murali Karicheri <m-karicheri2@ti.com> Add the property davinci-no-subpage-write to disable sub page write in the nand driver. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> --- arch/arm/boot/dts/k2hk-evm.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/k2hk-evm.dts b/arch/arm/boot/dts/k2hk-evm.dts index 949ef7d..b0498c140 100644 --- a/arch/arm/boot/dts/k2hk-evm.dts +++ b/arch/arm/boot/dts/k2hk-evm.dts @@ -118,6 +118,7 @@ nand-ecc-mode = "hw"; ti,davinci-ecc-bits = <4>; nand-on-flash-bbt; + ti,davinci-no-subpage-write; partition@0 { label = "u-boot"; -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2014-03-20 19:28 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-03-20 17:06 [PATCH 0/3] Fix NAND propeties for k2hk-evm Ivan Khoronzhuk 2014-03-20 17:06 ` [PATCH 1/3] ARM: dts: k2hk-evm: set ubifs partition size for 512M NAND Ivan Khoronzhuk 2014-03-20 17:06 ` [PATCH 2/3] mtd: davinci-nand: add dts property for NAND_NO_SUBPAGE_WRITE option Ivan Khoronzhuk 2014-03-20 17:12 ` Santosh Shilimkar 2014-03-20 17:29 ` Brian Norris 2014-03-20 17:37 ` Santosh Shilimkar 2014-03-20 17:44 ` Warner Losh 2014-03-20 18:02 ` Santosh Shilimkar 2014-03-20 18:09 ` Warner Losh 2014-03-20 18:54 ` Brian Norris 2014-03-20 19:11 ` Santosh Shilimkar 2014-03-20 19:26 ` Ivan Khoronzhuk 2014-03-20 19:28 ` Santosh Shilimkar 2014-03-20 18:42 ` Brian Norris 2014-03-20 17:06 ` [PATCH 3/3] ARM: dts: k2hk-evm: disable subpage write for davinci nand device Ivan Khoronzhuk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).