mbox series

[v2,00/10] Backport BRCMNAND changes from Linux

Message ID 20230211152909.1436133-1-linus.walleij@linaro.org
Headers show
Series Backport BRCMNAND changes from Linux | expand

Message

Linus Walleij Feb. 11, 2023, 3:28 p.m. UTC
Hunting down a bug on my system I took to back-porting
all reasonable changes from the Linux brcmnand driver that
were not yet in the U-Boot derivative.

I noticed that a simple diff -ur between brcmnand.c
between the file in Linux and U-Boot was possible to see
what differs. Combining this with some git log --oneline
manual comparison, fuzzing and manual intervention I
backported a set of relevant patches from Linux that
compiles and WorksForMe(TM).

The diff between Linux and U-Boot is much smaller after
this, the main missing part are subsystem cosmetics
changes and the EDU DMA mode support.

This was as much as I could bite off in one go.

All patches countersigned-off and marked as [backported].

ChangeLog v1->v2:
- Drop the patch to use the new OOB data layout helpers
  "mtd: nand: brcm: switch to mtd_ooblayout_ops"
- Drop all patches depending on the previous patch, in
  total 4 patches.

Claire Lin (1):
  mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page
    bitfips

Kamal Dasu (3):
  mtd: rawnand: brcmnand: Refactored code to introduce helper functions
  mtd: rawnand: brcmnand: Add support for v7.3 controller
  mtd: nand: brcmnand: Add support for flash-dma v0

Álvaro Fernández Rojas (6):
  mtd: rawnand: brcmnand: correctly verify erased pages
  mtd: rawnand: brcmnand: rename v4 registers
  mtd: rawnand: brcmnand: fix CS0 layout
  mtd: rawnand: brcmnand: rename page sizes
  mtd: rawnand: brcmnand: support v2.1-v2.2 controllers
  mtd: rawnand: brcmnand: fix OOB R/W with Hamming ECC

 drivers/mtd/nand/raw/brcmnand/brcmnand.c | 353 +++++++++++++++++------
 1 file changed, 268 insertions(+), 85 deletions(-)

Comments

William Zhang Feb. 22, 2023, 1:28 a.m. UTC | #1
Hi Linus.

On 02/11/2023 07:28 AM, Linus Walleij wrote:
> Hunting down a bug on my system I took to back-porting
> all reasonable changes from the Linux brcmnand driver that
> were not yet in the U-Boot derivative.
> 
> I noticed that a simple diff -ur between brcmnand.c
> between the file in Linux and U-Boot was possible to see
> what differs. Combining this with some git log --oneline
> manual comparison, fuzzing and manual intervention I
> backported a set of relevant patches from Linux that
> compiles and WorksForMe(TM).
> 
> The diff between Linux and U-Boot is much smaller after
> this, the main missing part are subsystem cosmetics
> changes and the EDU DMA mode support.
> 
> This was as much as I could bite off in one go.
> 
> All patches countersigned-off and marked as [backported].
> 
> ChangeLog v1->v2:
> - Drop the patch to use the new OOB data layout helpers
>    "mtd: nand: brcm: switch to mtd_ooblayout_ops"
> - Drop all patches depending on the previous patch, in
>    total 4 patches.
> 
> Claire Lin (1):
>    mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page
>      bitfips
> 
> Kamal Dasu (3):
>    mtd: rawnand: brcmnand: Refactored code to introduce helper functions
>    mtd: rawnand: brcmnand: Add support for v7.3 controller
>    mtd: nand: brcmnand: Add support for flash-dma v0
> 
> Álvaro Fernández Rojas (6):
>    mtd: rawnand: brcmnand: correctly verify erased pages
>    mtd: rawnand: brcmnand: rename v4 registers
>    mtd: rawnand: brcmnand: fix CS0 layout
>    mtd: rawnand: brcmnand: rename page sizes
>    mtd: rawnand: brcmnand: support v2.1-v2.2 controllers
>    mtd: rawnand: brcmnand: fix OOB R/W with Hamming ECC
> 
>   drivers/mtd/nand/raw/brcmnand/brcmnand.c | 353 +++++++++++++++++------
>   1 file changed, 268 insertions(+), 85 deletions(-)
> 

Sorry for the delay.  Finally I got some time to try your patches on a 
BCM63158 based board with NAND controller 7.1. It works fine.
Michael Nazzareno Trimarchi Feb. 22, 2023, 1:21 p.m. UTC | #2
Hi

On Wed, Feb 22, 2023 at 2:28 AM William Zhang
<william.zhang@broadcom.com> wrote:
>
> Hi Linus.
>
> On 02/11/2023 07:28 AM, Linus Walleij wrote:
> > Hunting down a bug on my system I took to back-porting
> > all reasonable changes from the Linux brcmnand driver that
> > were not yet in the U-Boot derivative.
> >
> > I noticed that a simple diff -ur between brcmnand.c
> > between the file in Linux and U-Boot was possible to see
> > what differs. Combining this with some git log --oneline
> > manual comparison, fuzzing and manual intervention I
> > backported a set of relevant patches from Linux that
> > compiles and WorksForMe(TM).
> >
> > The diff between Linux and U-Boot is much smaller after
> > this, the main missing part are subsystem cosmetics
> > changes and the EDU DMA mode support.
> >
> > This was as much as I could bite off in one go.
> >
> > All patches countersigned-off and marked as [backported].
> >
> > ChangeLog v1->v2:
> > - Drop the patch to use the new OOB data layout helpers
> >    "mtd: nand: brcm: switch to mtd_ooblayout_ops"
> > - Drop all patches depending on the previous patch, in
> >    total 4 patches.
> >
> > Claire Lin (1):
> >    mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page
> >      bitfips
> >
> > Kamal Dasu (3):
> >    mtd: rawnand: brcmnand: Refactored code to introduce helper functions
> >    mtd: rawnand: brcmnand: Add support for v7.3 controller
> >    mtd: nand: brcmnand: Add support for flash-dma v0
> >
> > Álvaro Fernández Rojas (6):
> >    mtd: rawnand: brcmnand: correctly verify erased pages
> >    mtd: rawnand: brcmnand: rename v4 registers
> >    mtd: rawnand: brcmnand: fix CS0 layout
> >    mtd: rawnand: brcmnand: rename page sizes
> >    mtd: rawnand: brcmnand: support v2.1-v2.2 controllers
> >    mtd: rawnand: brcmnand: fix OOB R/W with Hamming ECC
> >
> >   drivers/mtd/nand/raw/brcmnand/brcmnand.c | 353 +++++++++++++++++------
> >   1 file changed, 268 insertions(+), 85 deletions(-)
> >
>
> Sorry for the delay.  Finally I got some time to try your patches on a
> BCM63158 based board with NAND controller 7.1. It works fine.

We will queue this week, thank you

Michael