* [PATCH] mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag
@ 2022-08-15 8:01 Pali Rohár
2022-08-15 21:49 ` Michael Nazzareno Trimarchi
0 siblings, 1 reply; 5+ messages in thread
From: Pali Rohár @ 2022-08-15 8:01 UTC (permalink / raw)
To: Dario Binacchi, Michael Trimarchi; +Cc: Scott Wood, u-boot
Subpage write support for freescale eLBC NAND controller driver is
implemented in U-Boot and was fixes in the commit d3963721d93f ("nand: Sync
with Linux v4.1").
So remove NAND_NO_SUBPAGE_WRITE flag from the fsl_elbc_nand.c driver. This
partially revert commit cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE
to eLBC and IFC drivers"), only eLBC driver part.
With this change U-Boot with default settings can read from NAND UBIFS
image created on Linux with Linux default settings. Prior this change
U-Boot was unable to read from NAND UBIFS images created with Linux default
settings due to differnet UBI geometry.
Linux kernel fsl_elbc_nand.c driver also does not set NAND_NO_SUBPAGE_WRITE
flag and has implemented subpage write support.
Fixes: cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFC drivers")
Fixes: d3963721d93f ("nand: Sync with Linux v4.1")
Signed-off-by: Pali Rohár <pali@kernel.org>
---
See also email thread:
https://lore.kernel.org/u-boot/20220807120027.2zz43afbqtqljhul@pali/t/#u
---
drivers/mtd/nand/raw/fsl_elbc_nand.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c
index 48a3687f2728..e28670a4724a 100644
--- a/drivers/mtd/nand/raw/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
@@ -732,7 +732,6 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr, struct udevice *dev)
nand->bbt_md = &bbt_mirror_descr;
/* set up nand options */
- nand->options = NAND_NO_SUBPAGE_WRITE;
nand->bbt_options = NAND_BBT_USE_FLASH;
nand->controller = &elbc_ctrl->controller;
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag
2022-08-15 8:01 [PATCH] mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag Pali Rohár
@ 2022-08-15 21:49 ` Michael Nazzareno Trimarchi
2022-08-15 21:55 ` Pali Rohár
0 siblings, 1 reply; 5+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-08-15 21:49 UTC (permalink / raw)
To: Pali Rohár; +Cc: Dario Binacchi, Scott Wood, U-Boot-Denx
Hi
Il lun 15 ago 2022, 10:01 Pali Rohár <pali@kernel.org> ha scritto:
> Subpage write support for freescale eLBC NAND controller driver is
> implemented in U-Boot and was fixes in the commit d3963721d93f ("nand: Sync
> with Linux v4.1").
>
> So remove NAND_NO_SUBPAGE_WRITE flag from the fsl_elbc_nand.c driver. This
> partially revert commit cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE
> to eLBC and IFC drivers"), only eLBC driver part.
>
> With this change U-Boot with default settings can read from NAND UBIFS
> image created on Linux with Linux default settings. Prior this change
> U-Boot was unable to read from NAND UBIFS images created with Linux default
> settings due to differnet UBI geometry.
>
> Linux kernel fsl_elbc_nand.c driver also does not set NAND_NO_SUBPAGE_WRITE
> flag and has implemented subpage write support.
>
> Fixes: cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFC
> drivers")
> Fixes: d3963721d93f ("nand: Sync with Linux v4.1")
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
> See also email thread:
> https://lore.kernel.org/u-boot/20220807120027.2zz43afbqtqljhul@pali/t/#u
> ---
> drivers/mtd/nand/raw/fsl_elbc_nand.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c
> b/drivers/mtd/nand/raw/fsl_elbc_nand.c
> index 48a3687f2728..e28670a4724a 100644
> --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c
> +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
> @@ -732,7 +732,6 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr,
> struct udevice *dev)
> nand->bbt_md = &bbt_mirror_descr;
>
> /* set up nand options */
> - nand->options = NAND_NO_SUBPAGE_WRITE;
> nand->bbt_options = NAND_BBT_USE_FLASH;
>
> nand->controller = &elbc_ctrl->controller;
>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
I was following the thread. Please confirm that you was able to test
Michael
> --
> 2.20.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag
2022-08-15 21:49 ` Michael Nazzareno Trimarchi
@ 2022-08-15 21:55 ` Pali Rohár
2022-08-16 8:33 ` Michael Nazzareno Trimarchi
0 siblings, 1 reply; 5+ messages in thread
From: Pali Rohár @ 2022-08-15 21:55 UTC (permalink / raw)
To: Michael Nazzareno Trimarchi; +Cc: Dario Binacchi, Scott Wood, U-Boot-Denx
On Monday 15 August 2022 23:49:17 Michael Nazzareno Trimarchi wrote:
> Hi
>
> Il lun 15 ago 2022, 10:01 Pali Rohár <pali@kernel.org> ha scritto:
>
> > Subpage write support for freescale eLBC NAND controller driver is
> > implemented in U-Boot and was fixes in the commit d3963721d93f ("nand: Sync
> > with Linux v4.1").
> >
> > So remove NAND_NO_SUBPAGE_WRITE flag from the fsl_elbc_nand.c driver. This
> > partially revert commit cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE
> > to eLBC and IFC drivers"), only eLBC driver part.
> >
> > With this change U-Boot with default settings can read from NAND UBIFS
> > image created on Linux with Linux default settings. Prior this change
> > U-Boot was unable to read from NAND UBIFS images created with Linux default
> > settings due to differnet UBI geometry.
> >
> > Linux kernel fsl_elbc_nand.c driver also does not set NAND_NO_SUBPAGE_WRITE
> > flag and has implemented subpage write support.
> >
> > Fixes: cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFC
> > drivers")
> > Fixes: d3963721d93f ("nand: Sync with Linux v4.1")
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> > ---
> > See also email thread:
> > https://lore.kernel.org/u-boot/20220807120027.2zz43afbqtqljhul@pali/t/#u
> > ---
> > drivers/mtd/nand/raw/fsl_elbc_nand.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c
> > b/drivers/mtd/nand/raw/fsl_elbc_nand.c
> > index 48a3687f2728..e28670a4724a 100644
> > --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c
> > +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
> > @@ -732,7 +732,6 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr,
> > struct udevice *dev)
> > nand->bbt_md = &bbt_mirror_descr;
> >
> > /* set up nand options */
> > - nand->options = NAND_NO_SUBPAGE_WRITE;
> > nand->bbt_options = NAND_BBT_USE_FLASH;
> >
> > nand->controller = &elbc_ctrl->controller;
> >
>
> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
>
> I was following the thread. Please confirm that you was able to test
Yes, I have tested this change on P2020 based board Turris 1.1. And
finally U-Boot by default was able to access UBI created by mainline
Linux with default parameters, just by calling 'ubi part rootfs'.
UBI created by sub-page of size 2048 can be still also read by U-Boot by
calling 'ubi part rootfs 2048'. For this purpose I already provided
distroboot patch to easily specify UBI header offset (which is by
default sub-page size):
https://lore.kernel.org/u-boot/20220807190422.20157-1-pali@kernel.org/
> Michael
>
> > --
> > 2.20.1
> >
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag
2022-08-15 21:55 ` Pali Rohár
@ 2022-08-16 8:33 ` Michael Nazzareno Trimarchi
2022-08-22 9:55 ` Michael Nazzareno Trimarchi
0 siblings, 1 reply; 5+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-08-16 8:33 UTC (permalink / raw)
To: Pali Rohár; +Cc: Dario Binacchi, Scott Wood, U-Boot-Denx
Hi
Il lun 15 ago 2022, 23:55 Pali Rohár <pali@kernel.org> ha scritto:
> On Monday 15 August 2022 23:49:17 Michael Nazzareno Trimarchi wrote:
> > Hi
> >
> > Il lun 15 ago 2022, 10:01 Pali Rohár <pali@kernel.org> ha scritto:
> >
> > > Subpage write support for freescale eLBC NAND controller driver is
> > > implemented in U-Boot and was fixes in the commit d3963721d93f ("nand:
> Sync
> > > with Linux v4.1").
> > >
> > > So remove NAND_NO_SUBPAGE_WRITE flag from the fsl_elbc_nand.c driver.
> This
> > > partially revert commit cb04c7723429 ("nand/fsl: add
> NAND_NO_SUBPAGE_WRITE
> > > to eLBC and IFC drivers"), only eLBC driver part.
> > >
> > > With this change U-Boot with default settings can read from NAND UBIFS
> > > image created on Linux with Linux default settings. Prior this change
> > > U-Boot was unable to read from NAND UBIFS images created with Linux
> default
> > > settings due to differnet UBI geometry.
> > >
> > > Linux kernel fsl_elbc_nand.c driver also does not set
> NAND_NO_SUBPAGE_WRITE
> > > flag and has implemented subpage write support.
> > >
> > > Fixes: cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and
> IFC
> > > drivers")
> > > Fixes: d3963721d93f ("nand: Sync with Linux v4.1")
> > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > > ---
> > > See also email thread:
> > >
> https://lore.kernel.org/u-boot/20220807120027.2zz43afbqtqljhul@pali/t/#u
> > > ---
> > > drivers/mtd/nand/raw/fsl_elbc_nand.c | 1 -
> > > 1 file changed, 1 deletion(-)
> > >
> > > diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c
> > > b/drivers/mtd/nand/raw/fsl_elbc_nand.c
> > > index 48a3687f2728..e28670a4724a 100644
> > > --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c
> > > +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
> > > @@ -732,7 +732,6 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr,
> > > struct udevice *dev)
> > > nand->bbt_md = &bbt_mirror_descr;
> > >
> > > /* set up nand options */
> > > - nand->options = NAND_NO_SUBPAGE_WRITE;
> > > nand->bbt_options = NAND_BBT_USE_FLASH;
> > >
> > > nand->controller = &elbc_ctrl->controller;
> > >
> >
> > Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
> >
> > I was following the thread. Please confirm that you was able to test
>
> Yes, I have tested this change on P2020 based board Turris 1.1. And
> finally U-Boot by default was able to access UBI created by mainline
> Linux with default parameters, just by calling 'ubi part rootfs'.
> UBI created by sub-page of size 2048 can be still also read by U-Boot by
> calling 'ubi part rootfs 2048'. For this purpose I already provided
> distroboot patch to easily specify UBI header offset (which is by
> default sub-page size):
> https://lore.kernel.org/u-boot/20220807190422.20157-1-pali@kernel.org/
Acked-By: Michael Trimarchi<michael@amarulasolutions.com>
I will send pull request tomorrow to Tom
Michael
>
>
> > Michael
> >
> > > --
> > > 2.20.1
> > >
> > >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag
2022-08-16 8:33 ` Michael Nazzareno Trimarchi
@ 2022-08-22 9:55 ` Michael Nazzareno Trimarchi
0 siblings, 0 replies; 5+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-08-22 9:55 UTC (permalink / raw)
To: Pali Rohár; +Cc: Dario Binacchi, Scott Wood, U-Boot-Denx
On Tue, Aug 16, 2022 at 10:33 AM Michael Nazzareno Trimarchi
<michael@amarulasolutions.com> wrote:
>
> Hi
>
> Il lun 15 ago 2022, 23:55 Pali Rohár <pali@kernel.org> ha scritto:
>>
>> On Monday 15 August 2022 23:49:17 Michael Nazzareno Trimarchi wrote:
>> > Hi
>> >
>> > Il lun 15 ago 2022, 10:01 Pali Rohár <pali@kernel.org> ha scritto:
>> >
>> > > Subpage write support for freescale eLBC NAND controller driver is
>> > > implemented in U-Boot and was fixes in the commit d3963721d93f ("nand: Sync
>> > > with Linux v4.1").
>> > >
>> > > So remove NAND_NO_SUBPAGE_WRITE flag from the fsl_elbc_nand.c driver. This
>> > > partially revert commit cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE
>> > > to eLBC and IFC drivers"), only eLBC driver part.
>> > >
>> > > With this change U-Boot with default settings can read from NAND UBIFS
>> > > image created on Linux with Linux default settings. Prior this change
>> > > U-Boot was unable to read from NAND UBIFS images created with Linux default
>> > > settings due to differnet UBI geometry.
>> > >
>> > > Linux kernel fsl_elbc_nand.c driver also does not set NAND_NO_SUBPAGE_WRITE
>> > > flag and has implemented subpage write support.
>> > >
>> > > Fixes: cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFC
>> > > drivers")
>> > > Fixes: d3963721d93f ("nand: Sync with Linux v4.1")
>> > > Signed-off-by: Pali Rohár <pali@kernel.org>
>> > > ---
>> > > See also email thread:
>> > > https://lore.kernel.org/u-boot/20220807120027.2zz43afbqtqljhul@pali/t/#u
>> > > ---
>> > > drivers/mtd/nand/raw/fsl_elbc_nand.c | 1 -
>> > > 1 file changed, 1 deletion(-)
>> > >
>> > > diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c
>> > > b/drivers/mtd/nand/raw/fsl_elbc_nand.c
>> > > index 48a3687f2728..e28670a4724a 100644
>> > > --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c
>> > > +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
>> > > @@ -732,7 +732,6 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr,
>> > > struct udevice *dev)
>> > > nand->bbt_md = &bbt_mirror_descr;
>> > >
>> > > /* set up nand options */
>> > > - nand->options = NAND_NO_SUBPAGE_WRITE;
>> > > nand->bbt_options = NAND_BBT_USE_FLASH;
>> > >
>> > > nand->controller = &elbc_ctrl->controller;
>> > >
>> >
>> > Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
>> >
>> > I was following the thread. Please confirm that you was able to test
>>
>> Yes, I have tested this change on P2020 based board Turris 1.1. And
>> finally U-Boot by default was able to access UBI created by mainline
>> Linux with default parameters, just by calling 'ubi part rootfs'.
>> UBI created by sub-page of size 2048 can be still also read by U-Boot by
>> calling 'ubi part rootfs 2048'. For this purpose I already provided
>> distroboot patch to easily specify UBI header offset (which is by
>> default sub-page size):
>> https://lore.kernel.org/u-boot/20220807190422.20157-1-pali@kernel.org/
>
>
>
> Acked-By: Michael Trimarchi<michael@amarulasolutions.com>
>
> I will send pull request tomorrow to Tom
>
Applied thanks
> Michael
>>
>>
>>
>> > Michael
>> >
>> > > --
>> > > 2.20.1
>> > >
>> > >
--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-08-22 9:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-15 8:01 [PATCH] mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag Pali Rohár
2022-08-15 21:49 ` Michael Nazzareno Trimarchi
2022-08-15 21:55 ` Pali Rohár
2022-08-16 8:33 ` Michael Nazzareno Trimarchi
2022-08-22 9:55 ` Michael Nazzareno Trimarchi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.