mtd: spi-nor: remember full JEDEC flash ID
authorMichael Walle <michael@walle.cc>
Wed, 10 Aug 2022 22:06:50 +0000 (00:06 +0200)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Mon, 21 Nov 2022 13:37:15 +0000 (15:37 +0200)
commit28ef7670414e309d8bbee41f9389b7e21a58572c
tree3849ef8e4e474ca45c9479cd5631c5a3cf7495fb
parent0d9270f2762b8a2bd0df7c4a2e7e651703783793
mtd: spi-nor: remember full JEDEC flash ID

At the moment, we print the JEDEC ID that is stored in our database. The
generic flash support won't have such an entry in our database. To find
out the JEDEC ID later we will have to cache it. There is also another
advantage: If the flash is found in the database, the ID could be
truncated because the ID of the entry is used which can be shorter. Some
flashes still holds valuable information in the bytes after the JEDEC ID
and come in handy during debugging of when coping with INFO6() entries.
These are not accessible for now.

Save a copy of the ID bytes after reading and display it via debugfs.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Link: https://lore.kernel.org/r/20220810220654.1297699-4-michael@walle.cc
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/debugfs.c
include/linux/mtd/spi-nor.h