summaryrefslogtreecommitdiff
path: root/util/superiotool/superiotool.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/superiotool.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/superiotool.c')
-rw-r--r--util/superiotool/superiotool.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c
index 8aea0a02d9..0a253ad623 100644
--- a/util/superiotool/superiotool.c
+++ b/util/superiotool/superiotool.c
@@ -37,6 +37,18 @@ void regwrite(uint16_t port, uint8_t reg, uint8_t val)
outb(val, port + 1);
}
+void enter_conf_mode_winbond_fintek_ite_8787(uint16_t port)
+{
+ outb(0x87, port);
+ outb(0x87, port);
+}
+
+void exit_conf_mode_winbond_fintek_ite_8787(uint16_t port)
+{
+ outb(0xaa, port); /* Fintek, Winbond */
+ regwrite(port, 0x02, 0x02); /* ITE */
+}
+
int superio_unknown(const struct superio_registers reg_table[], uint16_t id)
{
return !strncmp(get_superio_name(reg_table, id), "<unknown>", 9);