Signed-off-by: Michael Karcher <[email protected]>
---
 board_enable.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/board_enable.c b/board_enable.c
index 940ecb9..9c88f0b 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);
-- 
1.7.1


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to