summaryrefslogtreecommitdiff
path: root/util/superiotool
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@google.com>2010-08-09 23:13:13 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2010-08-09 23:13:13 +0000
commit2ad6d55e38c51acc4191ea5578caebe3287f6521 (patch)
treec2ca1d504b06e09f7ff0b405d6e66a96f6a301c5 /util/superiotool
parent9bf7810dacc34e791431f5511b6ed6febda29940 (diff)
downloadcoreboot-2ad6d55e38c51acc4191ea5578caebe3287f6521.tar.xz
Some chips do not require enter/exit sequences. This causes them to be
detected and printed multiple times in probe_idregs_* functions where a simple series of enter --> probe/print --> exit calls are made. This patch adds a simple check after each set of those calls to make the functions quit after a chip is found. Signed-off-by: David Hendricks <dhendrix@google.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5689 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool')
-rw-r--r--util/superiotool/ite.c7
-rw-r--r--util/superiotool/winbond.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/util/superiotool/ite.c b/util/superiotool/ite.c
index 52efa5332c..f7b6d7efef 100644
--- a/util/superiotool/ite.c
+++ b/util/superiotool/ite.c
@@ -755,30 +755,37 @@ void probe_idregs_ite(uint16_t port)
enter_conf_mode_ite_legacy(port, initkey_it8661f);
probe_idregs_ite_helper("(init=legacy/it8661f) ", port);
exit_conf_mode_ite(port);
+ if (chip_found) return;
enter_conf_mode_ite_legacy(port, initkey_it8671f);
probe_idregs_ite_helper("(init=legacy/it8671f) ", port);
exit_conf_mode_ite(port);
+ if (chip_found) return;
} else {
enter_conf_mode_ite(port);
probe_idregs_ite_helper("(init=standard) ", port);
exit_conf_mode_ite(port);
+ if (chip_found) return;
enter_conf_mode_ite_it8502e(port);
probe_idregs_ite_helper("(init=it8502e) ", port);
exit_conf_mode_ite(port);
+ if (chip_found) return;
enter_conf_mode_ite_it8761e(port);
probe_idregs_ite_helper("(init=it8761e) ", port);
exit_conf_mode_ite(port);
+ if (chip_found) return;
enter_conf_mode_ite_it8228e(port);
probe_idregs_ite_helper("(init=it8228e) ", port);
exit_conf_mode_ite(port);
+ if (chip_found) return;
enter_conf_mode_winbond_fintek_ite_8787(port);
probe_idregs_ite_helper("(init=0x87,0x87) ", port);
exit_conf_mode_winbond_fintek_ite_8787(port);
+ if (chip_found) return;
}
}
diff --git a/util/superiotool/winbond.c b/util/superiotool/winbond.c
index fd132bfa2a..fe051be6bb 100644
--- a/util/superiotool/winbond.c
+++ b/util/superiotool/winbond.c
@@ -614,18 +614,22 @@ void probe_idregs_winbond(uint16_t port)
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;
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;
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;
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;
}
void print_winbond_chips(void)