mbox series

[RFC,v3,0/3] support 512B ECC step size for Meson NAND

Message ID 20230711122129.2635558-1-AVKrasnov@sberdevices.ru
Headers show
Series support 512B ECC step size for Meson NAND | expand

Message

Arseniy Krasnov July 11, 2023, 12:21 p.m. UTC
Hello,

this patchset adds support for 512B ECC step size for Meson NAND. Current
implementation only supports 1024B. There are three patches:

1) Update for device tree bindings to replace 'const' type of field
   'nand-ecc-step-size' with 'enum' which contains 512 and 1024.

2) Update for device tree bindings to add dependency between properties
   'nand-ecc-strength' and 'nand-ecc-step-size'.

3) Update for Meson driver - new enum value for 512B ECC and reworked
   ECC capabilities structure to support both 512B and 1024B ECC. By
   default this driver uses 1024B ECC, 512B could be enabled in device
   tree.

Changelog:
v1 -> v2:
 * Add default value of 1024 to the bindings patch (0001).
 * Remove "Acked-by: Rob Herring <robh@kernel.org>" from the bindings
   patch (0001) due to added default value.
 * Remove invalid calculation of OOB bytes, available for ECC engine
   from patch 0002. This logic is incorrect from the origins, so I don't
   touch it in this patchset. It will be fixed by another patch, as in
   fact, it doesn't affect this patchset.

v2 -> v3:
 * Add new patch which adds dependency between 'nand-ecc-strength' and
   'nand-ecc-step-size' (0002).
 * Return "Acked-by: Rob Herring <robh@kernel.org>" to 0001.
 * Remove "default" value from 0001, due to dependency patch.
 * Remove example value from 0001, due to dependency patch.

Links:
v1:
https://lore.kernel.org/linux-mtd/20230628092937.538683-1-AVKrasnov@sberdevices.ru/
v2:
https://lore.kernel.org/linux-mtd/20230705065434.297040-1-AVKrasnov@sberdevices.ru/

Arseniy Krasnov (3):
  dt-bindings: nand: meson: support for 512B ECC step size
  dt-bindings: nand: meson: make ECC properties dependent
  mtd: rawnand: meson: support for 512B ECC step size

 .../bindings/mtd/amlogic,meson-nand.yaml      |  6 ++-
 drivers/mtd/nand/raw/meson_nand.c             | 45 ++++++++++++++-----
 2 files changed, 39 insertions(+), 12 deletions(-)

Comments

Miquel Raynal July 15, 2023, 4:15 p.m. UTC | #1
Hi Arseniy,

AVKrasnov@sberdevices.ru wrote on Tue, 11 Jul 2023 15:21:26 +0300:

> Hello,
> 
> this patchset adds support for 512B ECC step size for Meson NAND. Current
> implementation only supports 1024B. There are three patches:
> 
> 1) Update for device tree bindings to replace 'const' type of field
>    'nand-ecc-step-size' with 'enum' which contains 512 and 1024.
> 
> 2) Update for device tree bindings to add dependency between properties
>    'nand-ecc-strength' and 'nand-ecc-step-size'.
> 
> 3) Update for Meson driver - new enum value for 512B ECC and reworked
>    ECC capabilities structure to support both 512B and 1024B ECC. By
>    default this driver uses 1024B ECC, 512B could be enabled in device
>    tree.

This series does not apply correctly on nand/next, would you mind
rebasing (nand/next on linux-mtd) and sending it again?

BTW the "rfc" prefix is only needed for the "first" submission, when
you try something "new", otherwise it is no longer required.

Thanks,
Miquèl
Arseniy Krasnov July 15, 2023, 5:48 p.m. UTC | #2
Hello Miquel!

On 15.07.2023 19:15, Miquel Raynal wrote:
> Hi Arseniy,
> 
> AVKrasnov@sberdevices.ru wrote on Tue, 11 Jul 2023 15:21:26 +0300:
> 
>> Hello,
>>
>> this patchset adds support for 512B ECC step size for Meson NAND. Current
>> implementation only supports 1024B. There are three patches:
>>
>> 1) Update for device tree bindings to replace 'const' type of field
>>    'nand-ecc-step-size' with 'enum' which contains 512 and 1024.
>>
>> 2) Update for device tree bindings to add dependency between properties
>>    'nand-ecc-strength' and 'nand-ecc-step-size'.
>>
>> 3) Update for Meson driver - new enum value for 512B ECC and reworked
>>    ECC capabilities structure to support both 512B and 1024B ECC. By
>>    default this driver uses 1024B ECC, 512B could be enabled in device
>>    tree.
> 
> This series does not apply correctly on nand/next, would you mind
> rebasing (nand/next on linux-mtd) and sending it again?

Sure, as I see 0001 was applied to nand/next, so I can resend only 0002 and 0003,
as 0002 is the first patch which fails to apply?

> 
> BTW the "rfc" prefix is only needed for the "first" submission, when
> you try something "new", otherwise it is no longer required.

Ok, got it

> 
> Thanks,
> Miquèl

Thanks, Arseniy
Miquel Raynal July 16, 2023, 1:24 p.m. UTC | #3
Hi Arseniy,

avkrasnov@sberdevices.ru wrote on Sat, 15 Jul 2023 20:48:34 +0300:

> Hello Miquel!
> 
> On 15.07.2023 19:15, Miquel Raynal wrote:
> > Hi Arseniy,
> > 
> > AVKrasnov@sberdevices.ru wrote on Tue, 11 Jul 2023 15:21:26 +0300:
> >   
> >> Hello,
> >>
> >> this patchset adds support for 512B ECC step size for Meson NAND. Current
> >> implementation only supports 1024B. There are three patches:
> >>
> >> 1) Update for device tree bindings to replace 'const' type of field
> >>    'nand-ecc-step-size' with 'enum' which contains 512 and 1024.
> >>
> >> 2) Update for device tree bindings to add dependency between properties
> >>    'nand-ecc-strength' and 'nand-ecc-step-size'.
> >>
> >> 3) Update for Meson driver - new enum value for 512B ECC and reworked
> >>    ECC capabilities structure to support both 512B and 1024B ECC. By
> >>    default this driver uses 1024B ECC, 512B could be enabled in device
> >>    tree.  
> > 
> > This series does not apply correctly on nand/next, would you mind
> > rebasing (nand/next on linux-mtd) and sending it again?  
> 
> Sure, as I see 0001 was applied to nand/next, so I can resend only 0002 and 0003,
> as 0002 is the first patch which fails to apply?

Yes indeed.

> 
> > 
> > BTW the "rfc" prefix is only needed for the "first" submission, when
> > you try something "new", otherwise it is no longer required.  
> 
> Ok, got it
> 
> > 
> > Thanks,
> > Miquèl  
> 
> Thanks, Arseniy


Thanks,
Miquèl