aboutsummaryrefslogtreecommitdiff
path: root/util/superiotool/winbond.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2007-09-20 23:37:56 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2007-09-20 23:37:56 +0000
commitb4db2209f9e01e1a013cc33356bceec57c3a3c80 (patch)
treeefd43f13e63088323dcbbffc9f431c692f3cd819 /util/superiotool/winbond.c
parent0702469f163e69257a7cf079eb40ae99f53c815b (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/winbond.c')
-rw-r--r--util/superiotool/winbond.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/util/superiotool/winbond.c b/util/superiotool/winbond.c
index ca2d1db4bc..0e8f2b86f8 100644
--- a/util/superiotool/winbond.c
+++ b/util/superiotool/winbond.c
@@ -126,23 +126,12 @@ const static struct superio_registers reg_table[] = {
{EOT}
};
-static void enter_conf_mode_winbond(uint16_t port)
-{
- outb(0x87, port);
- outb(0x87, port);
-}
-
-static void exit_conf_mode_winbond(uint16_t port)
-{
- outb(0xaa, port);
-}
-
void probe_idregs_winbond(uint16_t port)
{
uint16_t id;
uint8_t devid, rev;
- enter_conf_mode_winbond(port);
+ enter_conf_mode_winbond_fintek_ite_8787(port);
devid = regval(port, DEVICE_ID_REG);
rev = regval(port, DEVICE_REV_REG);
@@ -152,7 +141,7 @@ void probe_idregs_winbond(uint16_t port)
if (superio_unknown(reg_table, id)) {
no_superio_found(port);
- exit_conf_mode_winbond(port);
+ exit_conf_mode_winbond_fintek_ite_8787(port);
return;
}
@@ -162,6 +151,6 @@ void probe_idregs_winbond(uint16_t port)
/* TODO: Special notes in dump output for the MISC entries. */
dump_superio("Winbond", reg_table, port, id);
- exit_conf_mode_winbond(port);
+ exit_conf_mode_winbond_fintek_ite_8787(port);
}