[PATCH] cmd: nand: Extend nand info to print ecc information

Tom Rini trini at konsulko.com
Fri Oct 21 15:14:41 CEST 2022


On Fri, Oct 21, 2022 at 03:05:48PM +0200, Michael Nazzareno Trimarchi wrote:
> HI Tom
> 
> On Thu, Sep 22, 2022 at 3:43 PM Dario Binacchi
> <dario.binacchi at amarulasolutions.com> wrote:
> >
> > Hi Michael,
> >
> > On Thu, Sep 22, 2022 at 3:39 PM Michael Trimarchi
> > <michael at amarulasolutions.com> wrote:
> > >
> > > Extract the information about ecc strength and ecc step size
> > > from mtd controller. This information is usefull to check if
> > > what we think as ecc is what we really configured.
> > >
> > > Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>
> > > ---
> > >  cmd/nand.c | 14 ++++++++------
> > >  1 file changed, 8 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/cmd/nand.c b/cmd/nand.c
> > > index e730484d0b..9a9794684b 100644
> > > --- a/cmd/nand.c
> > > +++ b/cmd/nand.c
> > > @@ -417,12 +417,14 @@ static void nand_print_and_set_info(int idx)
> > >                 printf("%dx ", chip->numchips);
> > >         printf("%s, sector size %u KiB\n",
> > >                mtd->name, mtd->erasesize >> 10);
> > > -       printf("  Page size   %8d b\n", mtd->writesize);
> > > -       printf("  OOB size    %8d b\n", mtd->oobsize);
> > > -       printf("  Erase size  %8d b\n", mtd->erasesize);
> > > -       printf("  subpagesize %8d b\n", chip->subpagesize);
> > > -       printf("  options     0x%08x\n", chip->options);
> > > -       printf("  bbt options 0x%08x\n", chip->bbt_options);
> > > +       printf("  Page size     %8d b\n", mtd->writesize);
> > > +       printf("  OOB size      %8d b\n", mtd->oobsize);
> > > +       printf("  Erase size    %8d b\n", mtd->erasesize);
> > > +       printf("  ecc strength  %8d bits\n", mtd->ecc_strength);
> > > +       printf("  ecc step size %8d b\n", mtd->ecc_step_size);
> > > +       printf("  subpagesize   %8d b\n", chip->subpagesize);
> > > +       printf("  options       0x%08x\n", chip->options);
> > > +       printf("  bbt options   0x%08x\n", chip->bbt_options);
> > >
> > >         /* Set geometry info */
> > >         env_set_hex("nand_writesize", mtd->writesize);
> > > --
> > > 2.34.1
> > >
> >
> > Reviewed-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> >
> 
> Can I pick it up?

Yes.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221021/d9620597/attachment.sig>


More information about the U-Boot mailing list