diff options
author | Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> | 2010-06-29 14:44:40 +0000 |
---|---|---|
committer | Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> | 2010-06-29 14:44:40 +0000 |
commit | 979d925223ac976a6530c61afc12c12410e9546c (patch) | |
tree | 83687cd2bb0ed4000e874870844077e14a803f82 | |
parent | ea36c9cb5c64c5aa02c15512bbb091ed5ee6fae4 (diff) | |
download | flashrom-979d925223ac976a6530c61afc12c12410e9546c.tar.gz flashrom-979d925223ac976a6530c61afc12c12410e9546c.tar.bz2 flashrom-979d925223ac976a6530c61afc12c12410e9546c.zip |
Check that the expected winbond Super I/O was found
Corresponding to flashrom svn r1064.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-rw-r--r-- | board_enable.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/board_enable.c b/board_enable.c index 940ecb92..9c88f0b1 100644 --- a/board_enable.c +++ b/board_enable.c @@ -264,6 +264,11 @@ static int winbond_gpio_set(uint16_t base, enum winbond_id chipid, msg_perr("\nERROR: No supported Winbond Super I/O found\n"); return -1; } + if (chip->device_id != chipid) { + msg_perr("\nERROR: Found Winbond chip with ID 0x%x, " + "expected %x\n", chip->device_id, chipid); + return -1; + } if (bit >= 8 || port == 0 || port > chip->gpio_port_count) { msg_perr("\nERROR: winbond_gpio_set: Invalid GPIO number %d\n", pin); |