diff options
author | Stefan Reinauer <stepan@coreboot.org> | 2010-12-30 16:57:58 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-12-30 16:57:58 +0000 |
commit | d7ce71d58f7dc2bdc9c0dd8eb7b804f0194071fa (patch) | |
tree | 12b726c7828555886e5f3b2e6b9d174e9e485361 /util/superiotool/winbond.c | |
parent | 84be0f59b7158d5d60e1d7d61786d0a6e449d682 (diff) | |
download | coreboot-d7ce71d58f7dc2bdc9c0dd8eb7b804f0194071fa.tar.xz |
superiotool: Don't skip probing on a port if a a chip was detected on another port.
Only skip probing if chip was found on the same port already to avoid
duplicates.
Signed-off-by: Stefan Reinauer <stepan@coreboot.org>
Acked-by: Stefan Reinauer <stepan@coreboot.org>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6222 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool/winbond.c')
-rw-r--r-- | util/superiotool/winbond.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/util/superiotool/winbond.c b/util/superiotool/winbond.c index 279e389d4d..451b61d79f 100644 --- a/util/superiotool/winbond.c +++ b/util/superiotool/winbond.c @@ -625,6 +625,8 @@ static void enter_conf_mode_winbond_86(uint16_t port) OUTB(0x86, port); } +static int chip_found_at_port; + static void probe_idregs_winbond_helper(const char *init, uint16_t port) { uint16_t id, hwmport; @@ -662,6 +664,7 @@ static void probe_idregs_winbond_helper(const char *init, uint16_t port) printf("Found Winbond %s (id=0x%02x, rev=0x%02x) at 0x%x\n", get_superio_name(reg_table, id), devid, rev, port); chip_found = 1; + chip_found_at_port = 1; dump_superio("Winbond", reg_table, port, id, LDN_SEL); @@ -688,25 +691,27 @@ static void probe_idregs_winbond_helper(const char *init, uint16_t port) void probe_idregs_winbond(uint16_t port) { + chip_found_at_port = 0; + enter_conf_mode_winbond_88(port); probe_idregs_winbond_helper("(init=0x88) ", port); exit_conf_mode_winbond_fintek_ite_8787(port); - if (chip_found) return; + if (chip_found_at_port) return; enter_conf_mode_winbond_89(port); probe_idregs_winbond_helper("(init=0x89) ", port); exit_conf_mode_winbond_fintek_ite_8787(port); - if (chip_found) return; + if (chip_found_at_port) return; enter_conf_mode_winbond_86(port); probe_idregs_winbond_helper("(init=0x86,0x86) ", port); exit_conf_mode_winbond_fintek_ite_8787(port); - if (chip_found) return; + if (chip_found_at_port) return; enter_conf_mode_winbond_fintek_ite_8787(port); probe_idregs_winbond_helper("(init=0x87,0x87) ", port); exit_conf_mode_winbond_fintek_ite_8787(port); - if (chip_found) return; + if (chip_found_at_port) return; } void print_winbond_chips(void) |