summaryrefslogtreecommitdiff
path: root/src/drivers/spi
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@gmx.at>2018-08-26 04:26:04 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-11-26 09:39:45 +0000
commit630a418feac478410d2f23f06cbf85000decc4d2 (patch)
treec6b3d392047e0ce8af60b296e60c36cefb602d77 /src/drivers/spi
parent8f95edcf9b9dcde5d098e2ec41d1f0c9bf924aa8 (diff)
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>
Diffstat (limited to 'src/drivers/spi')
-rw-r--r--src/drivers/spi/spi_flash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c
index 1b835a15ae..57bdaf4cb1 100644
--- a/src/drivers/spi/spi_flash.c
+++ b/src/drivers/spi/spi_flash.c
@@ -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. */