From b4db2209f9e01e1a013cc33356bceec57c3a3c80 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 20 Sep 2007 23:37:56 +0000 Subject: 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 Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2794 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/superiotool/superiotool.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'util/superiotool/superiotool.c') 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), "", 9); -- cgit v1.2.3