[PATCH] mtd: nand: Show reserved block in chip.erase

Dario Binacchi dario.binacchi at amarulasolutions.com
Mon Feb 27 18:24:24 CET 2023


Hi Michael,

On Mon, Feb 27, 2023 at 4:01 PM Dario Binacchi
<dario.binacchi at amarulasolutions.com> wrote:
>
> From: Michael Trimarchi <michael at amarulasolutions.com>
>
> The "nand chip.erase" command always printed as bad blocks even in the
> case of reserved blocks. Reserved blocks are used for storing bad block
> tables. The patch displays "bbt reserved" when printing reserved blocks in
> "nand chip.erase" command.
>
> Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>
> Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> ---
>
>  drivers/mtd/nand/raw/nand_util.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c
> index b2345dca7f71..72cc24f40376 100644
> --- a/drivers/mtd/nand/raw/nand_util.c
> +++ b/drivers/mtd/nand/raw/nand_util.c
> @@ -113,9 +113,10 @@ int nand_erase_opts(struct mtd_info *mtd,
>                         int ret = mtd_block_isbad(mtd, erase.addr);
>                         if (ret > 0) {
>                                 if (!opts->quiet)
> -                                       printf("\rSkipping bad block at  "
> +                                       printf("\rSkipping %s at  "
>                                                "0x%08llx                 "
>                                                "                         \n",
> +                                              ret == 1 ? "bad block" : "bbt reserved",
>                                                erase.addr);
>
>                                 if (!opts->spread)
> --
> 2.32.0
>

Applied to nand-next,

Thanks and regards

Dario

-- 

Dario Binacchi

Senior Embedded Linux Developer

dario.binacchi at amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info at amarulasolutions.com

www.amarulasolutions.com


More information about the U-Boot mailing list