* [PATCH] mtd: spi-nor: Print all JEDEC ID bytes on error
@ 2019-03-12 10:45 Geert Uytterhoeven
2019-03-19 16:29 ` Tudor.Ambarus
2019-03-21 16:47 ` Tudor.Ambarus
0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-03-12 10:45 UTC (permalink / raw)
To: Marek Vasut, Tudor Ambarus, David Woodhouse, Brian Norris,
Boris Brezillon, Richard Weinberger
Cc: linux-mtd, Geert Uytterhoeven
If identification of an SPI NOR FLASH fails, the JEDEC ID is printed,
which is stored in the first 3 bytes of the ID read from the FLASH.
However, the extended JEDEC ID, which is stored in the remaining bytes,
also matters, as it is used for identification of some FLASH types.
Print all (currently 6) ID bytes read to ease failure analysis and
debugging.
Suggested-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/mtd/spi-nor/spi-nor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index fae147452aff3499..028b21abee0da5dc 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -2071,8 +2071,8 @@ static const struct flash_info *spi_nor_read_id(struct spi_nor *nor)
return &spi_nor_ids[tmp];
}
}
- dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n",
- id[0], id[1], id[2]);
+ dev_err(nor->dev, "unrecognized JEDEC id bytes: %*ph\n",
+ SPI_NOR_MAX_ID_LEN, id);
return ERR_PTR(-ENODEV);
}
--
2.17.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: spi-nor: Print all JEDEC ID bytes on error
2019-03-12 10:45 [PATCH] mtd: spi-nor: Print all JEDEC ID bytes on error Geert Uytterhoeven
@ 2019-03-19 16:29 ` Tudor.Ambarus
2019-03-21 16:47 ` Tudor.Ambarus
1 sibling, 0 replies; 3+ messages in thread
From: Tudor.Ambarus @ 2019-03-19 16:29 UTC (permalink / raw)
To: geert+renesas, marek.vasut, dwmw2, computersforpeace, bbrezillon,
richard
Cc: linux-mtd
On 03/12/2019 12:45 PM, Geert Uytterhoeven wrote:
> If identification of an SPI NOR FLASH fails, the JEDEC ID is printed,
> which is stored in the first 3 bytes of the ID read from the FLASH.
> However, the extended JEDEC ID, which is stored in the remaining bytes,
> also matters, as it is used for identification of some FLASH types.
>
> Print all (currently 6) ID bytes read to ease failure analysis and
> debugging.
>
> Suggested-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> ---
> drivers/mtd/spi-nor/spi-nor.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index fae147452aff3499..028b21abee0da5dc 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -2071,8 +2071,8 @@ static const struct flash_info *spi_nor_read_id(struct spi_nor *nor)
> return &spi_nor_ids[tmp];
> }
> }
> - dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n",
> - id[0], id[1], id[2]);
> + dev_err(nor->dev, "unrecognized JEDEC id bytes: %*ph\n",
> + SPI_NOR_MAX_ID_LEN, id);
> return ERR_PTR(-ENODEV);
> }
>
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mtd: spi-nor: Print all JEDEC ID bytes on error
2019-03-12 10:45 [PATCH] mtd: spi-nor: Print all JEDEC ID bytes on error Geert Uytterhoeven
2019-03-19 16:29 ` Tudor.Ambarus
@ 2019-03-21 16:47 ` Tudor.Ambarus
1 sibling, 0 replies; 3+ messages in thread
From: Tudor.Ambarus @ 2019-03-21 16:47 UTC (permalink / raw)
To: geert+renesas, marek.vasut, dwmw2, computersforpeace, bbrezillon,
richard
Cc: linux-mtd
On 03/12/2019 12:45 PM, Geert Uytterhoeven wrote:
> If identification of an SPI NOR FLASH fails, the JEDEC ID is printed,
> which is stored in the first 3 bytes of the ID read from the FLASH.
> However, the extended JEDEC ID, which is stored in the remaining bytes,
> also matters, as it is used for identification of some FLASH types.
>
> Print all (currently 6) ID bytes read to ease failure analysis and
> debugging.
>
> Suggested-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> drivers/mtd/spi-nor/spi-nor.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to http://git.infradead.org/linux-mtd.git, spi-nor/next. Thanks.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-21 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 10:45 [PATCH] mtd: spi-nor: Print all JEDEC ID bytes on error Geert Uytterhoeven
2019-03-19 16:29 ` Tudor.Ambarus
2019-03-21 16:47 ` Tudor.Ambarus
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.