mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag
Subsystems (2)
PATCH 1/1 mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag
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.
---
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(-)
drivers/mtd/nand/raw/fsl_elbc_nand.c +0 -1
@@ -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;
Signature · 1 line
2.20.1
Hi
Il lun 15 ago 2022, 10:01 Pali Rohár <[email protected]> ha scritto:
Quoted 40 lines
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_WRITEflag from thefsl_elbc_nand.cdriver. This partially revert commitcb04c7723429("nand/fsl: addNAND_NO_SUBPAGE_WRITEto 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.cdriver also does not setNAND_NO_SUBPAGE_WRITEflag and has implemented subpage write support.Fixes cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFCdrivers")
Fixes d3963721d93f ("nand: Sync with Linux v4.1")Signed-off-by Pali Rohár <[email protected]>---
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(-)drivers/mtd/nand/raw/fsl_elbc_nand.c +0
-1@@ -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 ;
Quoted 2 lines
nand->controller = &elbc_ctrl->controller;
I was following the thread. Please confirm that you was able to test
Michael
Quoted 4 lines
--
2.20.1
Quoted 44 lines · On Monday 15 August 2022 23:49:17 Michael Nazzareno Trimarchi wrote:
Hi
Il lun 15 ago 2022, 10:01 Pali Rohár <[email protected]> ha scritto:
Quoted 40 lines
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_WRITEflag from thefsl_elbc_nand.cdriver. This partially revert commitcb04c7723429("nand/fsl: addNAND_NO_SUBPAGE_WRITEto 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.cdriver also does not setNAND_NO_SUBPAGE_WRITEflag and has implemented subpage write support.Fixes cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFCdrivers")
Fixes d3963721d93f ("nand: Sync with Linux v4.1")Signed-off-by Pali Rohár <[email protected]>---
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(-)drivers/mtd/nand/raw/fsl_elbc_nand.c +0
-1@@ -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 ;
Quoted 6 lines
Quoted 2 lines
nand->controller = &elbc_ctrl->controller;Reviewed-by Michael Trimarchi <[email protected]>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/[email protected]/
Quoted 6 lines
Michael
Quoted 4 lines
--
2.20.1
Michael Nazzareno Trimarchi
Acked-byHi
Il lun 15 ago 2022, 23:55 Pali Rohár <[email protected]> ha scritto:
Quoted 59 lines · On Monday 15 August 2022 23:49:17 Michael Nazzareno Trimarchi wrote:
Quoted 6 lines
Hi
Il lun 15 ago 2022, 10:01 Pali Rohár <[email protected]> ha scritto:
Quoted 2 lines
Subpage write support for freescale eLBC NAND controller driver is implemented in U-Boot and was fixes in the commit
d3963721d93f("nand:Sync
Quoted 3 lines
Quoted 3 lines
with Linux v4.1").
So remove
NAND_NO_SUBPAGE_WRITEflag from thefsl_elbc_nand.cdriver.This
Quoted 1 line
Quoted 1 line
partially revert commit
cb04c7723429("nand/fsl: add
NAND_NO_SUBPAGE_WRITEQuoted 5 lines
Quoted 5 lines
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
Quoted 3 lines
Quoted 3 lines
settings due to differnet UBI geometry.
Linux kernel
fsl_elbc_nand.cdriver also does not set
NAND_NO_SUBPAGE_WRITEQuoted 3 lines
Quoted 3 lines
flag and has implemented subpage write support.
Fixes cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC andIFC
Quoted 6 lines
Quoted 6 lines
drivers")
Fixes d3963721d93f ("nand: Sync with Linux v4.1")Signed-off-by Pali Rohár <[email protected]>---
See also email thread:https://lore.kernel.org/u-boot/20220807120027.2zz43afbqtqljhul@pali/t/#u
Quoted 17 lines
Quoted 17 lines
--- drivers/mtd/nand/raw/fsl_elbc_nand.c | 1 - 1 file changed, 1 deletion(-)drivers/mtd/nand/raw/fsl_elbc_nand.c +0
-1@@ -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 ;Quoted 6 lines
Quoted 2 lines
nand->controller = &elbc_ctrl->controller;Reviewed-by Michael Trimarchi <[email protected]>I was following the thread. Please confirm that you was able to test
Quoted 8 lines
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/[email protected]/
I will send pull request tomorrow to Tom
Michael
Quoted 9 lines
Quoted 8 lines
Michael
Quoted 4 lines
--
2.20.1
Quoted 68 lines · Michael Nazzareno Trimarchi
Hi
Il lun 15 ago 2022, 23:55 Pali Rohár <[email protected]> ha scritto:
Quoted 53 lines · On Monday 15 August 2022 23:49:17 Michael Nazzareno Trimarchi wrote:
Quoted 44 lines
Hi
Il lun 15 ago 2022, 10:01 Pali Rohár <[email protected]> ha scritto:
Quoted 40 lines
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_WRITEflag from thefsl_elbc_nand.cdriver. This partially revert commitcb04c7723429("nand/fsl: addNAND_NO_SUBPAGE_WRITEto 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.cdriver also does not setNAND_NO_SUBPAGE_WRITEflag and has implemented subpage write support.Fixes cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFCdrivers")
Fixes d3963721d93f ("nand: Sync with Linux v4.1")Signed-off-by Pali Rohár <[email protected]>---
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(-)drivers/mtd/nand/raw/fsl_elbc_nand.c +0
-1@@ -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 ;Quoted 6 lines
Quoted 2 lines
nand->controller = &elbc_ctrl->controller;Reviewed-by Michael Trimarchi <[email protected]>I was following the thread. Please confirm that you was able to test
Quoted 8 lines
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/[email protected]/
Quoted 4 lines
Acked-by Michael Trimarchi<[email protected]>I will send pull request tomorrow to Tom
Applied thanks
Quoted 10 lines
Michael
Quoted 9 lines
Quoted 9 lines
Michael
Quoted 4 lines
--
2.20.1
Signature · 11 lines
Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 [email protected] __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 [email protected] www.amarulasolutions.com