diff options
Diffstat (limited to 'util/flashrom/spi.c')
-rw-r--r-- | util/flashrom/spi.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/util/flashrom/spi.c b/util/flashrom/spi.c index 9313850521..a322d31ae0 100644 --- a/util/flashrom/spi.c +++ b/util/flashrom/spi.c @@ -278,11 +278,17 @@ void generic_spi_write_disable() int probe_spi(struct flashchip *flash) { unsigned char readarr[3]; - uint8_t manuf_id; - uint16_t model_id; + uint32_t manuf_id; + uint32_t model_id; if (!generic_spi_rdid(readarr)) { - manuf_id = readarr[0]; - model_id = (readarr[1] << 8) | readarr[2]; + /* Check if this is a continuation vendor ID */ + if (readarr[0] == 0x7f) { + manuf_id = (readarr[0] << 8) | readarr[1]; + model_id = readarr[2]; + } else { + manuf_id = readarr[0]; + model_id = (readarr[1] << 8) | readarr[2]; + } printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, manuf_id, model_id); if (manuf_id == flash->manufacture_id && model_id == flash->model_id) { |