MXS-NAND: Backport ecc.size from linux kernel
Subsystems (3)
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
The ecc.size for mxs NAND driver is set to 1 in Linux kernel and to 512 in U-Boot, which causes "ubi part" command malfunction due to wrong subpage size.
--- drivers/mtd/nand/mxs_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/mxs_nand.c +1 -1
@@ -1105,7 +1105,7 @@ int board_nand_init(struct nand_chip *nand) nand->ecc.layout = &fake_ecc_layout; nand->ecc.mode =NAND_ECC_HW ; nand->ecc.bytes =9 ; - nand->ecc.size =512 ; + nand->ecc.size =1 ;return 0 ;
Signature · 1 line
1.7.7.3
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
Hi Marek,
Quoted 2 lines · Marek Vasut
The ecc.size for mxs NAND driver is set to 1 in Linux kernel and to 512 in U-Boot, which causes "ubi part" command malfunction due to wrong subpage size.
[snip]
Subpage size is now reported correctly and ubifs works fine. Thanks!
--
Veli-Pekka Peltola
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
Quoted 7 lines
Hi Marek,
Quoted 3 lines · Marek Vasut
The ecc.size for mxs NAND driver is set to 1 in Linux kernel and to 512 in U-Boot, which causes "ubi part" command malfunction due to wrong subpage size.
Quoted 5 lines
[snip]
Subpage size is now reported correctly and ubifs works fine. Thanks!
Tested-by Veli-Pekka Peltola <[email protected]>
You're the guy doing the bluegiga mx28 board ? I think I noticed in linux kernel, are you for example working on mx28/device tree support too?
M
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
Quoted 2 lines · Marek Vasut
You're the guy doing the bluegiga mx28 board ? I think I noticed in linux kernel, are you for example working on mx28/device tree support too?
Yes, I have done something but most of kernel stuff related to our board is done by my colleague Lauri Hintsala. Currently device tree support is not in our task list. I don't know if someone is working on it. Shawn Guo (kernel maintainer for MX28) might know.
--
Veli-Pekka Peltola
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
In reply to Marek VasutQuoted 18 lines · Marek Vasut
The ecc.size for mxs NAND driver is set to 1 in Linux kernel and to 512 in U-Boot, which causes "ubi part" command malfunction due to wrong subpage size.
Signed-off-by Marek Vasut <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Detlev Zundel <[email protected]>Cc Stefan Roese <[email protected]>Cc Scott Wood <[email protected]>Cc Veli-Pekka Peltola <[email protected]>--- drivers/mtd/nand/mxs_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/mtd/nand/mxs_nand.c +0
-0
drivers/mtd/nand/mxs_nand.c int board_nand_init(struct nand_chip *nand) · line 1111
Quoted 8 lines
drivers/mtd/nand/mxs_nand.c +1
-1@@ -1105,7 +1105,7 @@ int board_nand_init(struct nand_chip *nand) nand->ecc.layout = &fake_ecc_layout; nand->ecc.mode =NAND_ECC_HW ; nand->ecc.bytes =9 ; - nand->ecc.size =512 ; + nand->ecc.size =1 ;return 0 ;
ecc.size = 1 doesn't make sense -- this is the block size over which ecc is calculated.
Where is this Linux driver? I don't see mxs_nand.c in Linux.
What specifically is happening in "ubi part" with ecc.size = 512?
-Scott
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
Quoted 26 lines · Marek Vasut
Quoted 25 lines
The ecc.size for mxs NAND driver is set to 1 in Linux kernel and to 512 in U-Boot, which causes "ubi part" command malfunction due to wrong subpage size.
Signed-off-by Marek Vasut <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Detlev Zundel <[email protected]>Cc Stefan Roese <[email protected]>Cc Scott Wood <[email protected]>Cc Veli-Pekka Peltola <[email protected]>---
drivers/mtd/nand/mxs_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/mtd/nand/mxs_nand.c +0
-0@@ -1105,7 +1105,7 @@ int board_nand_init(struct nand_chip *nand) nand->ecc.layout = &fake_ecc_layout; nand->ecc.mode =NAND_ECC_HW ; nand->ecc.bytes =9 ;
Quoted 7 lines
Quoted 4 lines
drivers/mtd/nand/mxs_nand.c +1
-1- nand->ecc.size =512 ; + nand->ecc.size =1 ;return 0;
ecc.size = 1 doesn't make sense -- this is the block size over which ecc is calculated.
And in a way it forces the subpage shift to be 0 ... we need to fix it in both later, but for this release, let's make it this way (in sync with linux).
Quoted 2 lines
Where is this Linux driver? I don't see
mxs_nand.cin Linux.
drivers/mtd/nand/gpmi-nand/*
Quoted 2 lines
What specifically is happening in "ubi part" with ecc.size = 512?
The driver doesn\t support subpage writes.
Quoted 2 lines
-Scott
M
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
Quoted 4 lines · Marek Vasut
Quoted 2 lines · Marek Vasut
What specifically is happening in "ubi part" with ecc.size = 512?
The driver doesn\t support subpage writes.
Is this meant to be a workaround for the NAND layer ignoring a driver setting NAND_NO_SUBPAGE_WRITE? I'd rather just fix that...
-Scott
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
Quoted 8 lines · Marek Vasut
Quoted 4 lines
Quoted 2 lines · Marek Vasut
What specifically is happening in "ubi part" with ecc.size = 512?
The driver doesn\t support subpage writes.
Is this meant to be a workaround for the NAND layer ignoring a driver setting
NAND_NO_SUBPAGE_WRITE? I'd rather just fix that...
Well it's like this in linux, it took me some time to find this out. I backported it, so probably.
M
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
In reply to Scott WoodQuoted 10 lines · Marek Vasut
Quoted 4 lines
Quoted 2 lines · Marek Vasut
What specifically is happening in "ubi part" with ecc.size = 512?
The driver doesn\t support subpage writes.
Is this meant to be a workaround for the NAND layer ignoring a driver setting
NAND_NO_SUBPAGE_WRITE? I'd rather just fix that...-Scott
Any news here ?
M
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
Quoted 4 lines · Marek Vasut
Quoted 4 lines · Marek Vasut
Quoted 3 lines
Quoted 2 lines · Marek Vasut
What specifically is happening in "ubi part" with ecc.size = 512?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
The driver doesn\t support subpage writes.
Is this meant to be a workaround for the NAND layer ignoring a driver setting
NAND_NO_SUBPAGE_WRITE? I'd rather just fix that...-Scott
Any news here ?
I just got back from end-of-year vacation; I'll look at it soon (will probably just remove the mask and trust the driver to not set flags that don't make sense). Thanks for the reminder.
-Scott
PATCH 1/1 MXS-NAND: Backport ecc.size from linux kernel
Quoted 7 lines · Marek Vasut
Quoted 6 lines
Quoted 6 lines · Marek Vasut
Quoted 4 lines
Quoted 2 lines · Marek Vasut
What specifically is happening in "ubi part" with ecc.size = 512?
The driver doesn\t support subpage writes.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Is this meant to be a workaround for the NAND layer ignoring a driver setting
NAND_NO_SUBPAGE_WRITE? I'd rather just fix that...-Scott
Any news here ?
I just got back from end-of-year vacation;
I hope you had good time :)
Quoted 3 lines
I'll look at it soon (will
probably just remove the mask and trust the driver to not set flags that don't make sense). Thanks for the reminder.
Naw, it should be fixed in linux too! We should probably start a discussion there.
Quoted 2 lines
-Scott