drivers/spi: store detected flash IDs
Change-Id: I36de9ba6c5967dddd08a71a522cf680d6e146fae Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/c/28347 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
8f95edcf9b
commit
630a418fea
|
@ -343,8 +343,11 @@ int spi_flash_generic_probe(const struct spi_slave *spi,
|
|||
for (i = 0; i < ARRAY_SIZE(flashes); ++i)
|
||||
if (flashes[i].shift == shift && flashes[i].idcode == *idp) {
|
||||
/* we have a match, call probe */
|
||||
if (flashes[i].probe(spi, idp, flash) == 0)
|
||||
if (flashes[i].probe(spi, idp, flash) == 0) {
|
||||
flash->vendor = idp[0];
|
||||
flash->model = (idp[1] << 8) | idp[2];
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* No match, return error. */
|
||||
|
|
|
@ -89,6 +89,8 @@ struct spi_flash_ops {
|
|||
|
||||
struct spi_flash {
|
||||
struct spi_slave spi;
|
||||
u8 vendor;
|
||||
u16 model;
|
||||
const char *name;
|
||||
u32 size;
|
||||
u32 sector_size;
|
||||
|
|
Loading…
Reference in New Issue