diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2007-09-20 23:37:56 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2007-09-20 23:37:56 +0000 |
commit | b4db2209f9e01e1a013cc33356bceec57c3a3c80 (patch) | |
tree | efd43f13e63088323dcbbffc9f431c692f3cd819 /util/superiotool/ite.c | |
parent | 0702469f163e69257a7cf079eb40ae99f53c815b (diff) |
Decouple the ITE code from fintek.c, it doesn't belong there.
Add common 'enter configuration mode' function for most Winbond/Fintek/ITE
chips which use the 0x87 0x87 sequence for that reason.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2794 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool/ite.c')
-rw-r--r-- | util/superiotool/ite.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/util/superiotool/ite.c b/util/superiotool/ite.c index 610516a980..1a65e2cff2 100644 --- a/util/superiotool/ite.c +++ b/util/superiotool/ite.c @@ -226,12 +226,10 @@ static void exit_conf_mode_ite(uint16_t port) regwrite(port, 0x02, 0x02); } -void probe_idregs_ite(uint16_t port) +static void probe_idregs_ite_helper(uint16_t port) { uint16_t id, chipver; - enter_conf_mode_ite(port); - id = regval(port, CHIP_ID_BYTE1_REG) << 8; id |= regval(port, CHIP_ID_BYTE2_REG); chipver = regval(port, CHIP_VERSION_REG) & 0x0f; /* Only bits 3..0 */ @@ -246,7 +244,16 @@ void probe_idregs_ite(uint16_t port) get_superio_name(reg_table, id), id, chipver, port); dump_superio("ITE", reg_table, port, id); +} +void probe_idregs_ite(uint16_t port) +{ + enter_conf_mode_ite(port); + probe_idregs_ite_helper(port); exit_conf_mode_ite(port); + + enter_conf_mode_winbond_fintek_ite_8787(port); + probe_idregs_ite_helper(port); + exit_conf_mode_winbond_fintek_ite_8787(port); } |