aboutsummaryrefslogtreecommitdiff
path: root/cmd/nand.c
diff options
context:
space:
mode:
authorMichael Trimarchi2022-09-22 15:39:37 +0200
committerDario Binacchi2022-12-10 11:11:25 +0100
commit308bd746639a7d144a9cf563ac7449312841386d (patch)
treea81fce7fe928edf3b40cc74433f0a767564ac926 /cmd/nand.c
parent8f170408774b30aa4ee91b3cc90ba09b564d4651 (diff)
cmd: nand: Extend nand info to print ecc information
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@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/all/20220922133937.277463-1-michael@amarulasolutions.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Diffstat (limited to 'cmd/nand.c')
-rw-r--r--cmd/nand.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/cmd/nand.c b/cmd/nand.c
index 5bb43794e90..9a723f57579 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);