Skip to content

Commit

Permalink
cmd: nand: Extend nand info to print ecc information
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Dario Binacchi <[email protected]>
Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Dario Binacchi <[email protected]>
  • Loading branch information
panicking authored and passgat committed Dec 10, 2022
1 parent 8f17040 commit 308bd74
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cmd/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 308bd74

Please sign in to comment.