From 6b4ad4304a57fdcfd6147370235896406f229e61 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 23 Sep 2007 13:17:29 +0000 Subject: Minor fixes/improvements in the Fintek code (trivial). Signed-off-by: Uwe Hermann Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2802 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/superiotool/fintek.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'util/superiotool/fintek.c') diff --git a/util/superiotool/fintek.c b/util/superiotool/fintek.c index f7f0a7c5c8..6a7d785e8b 100644 --- a/util/superiotool/fintek.c +++ b/util/superiotool/fintek.c @@ -25,6 +25,8 @@ #define VENDOR_ID_BYTE1_REG 0x23 #define VENDOR_ID_BYTE2_REG 0x24 +#define FINTEK_VENDOR_ID 0x3419 + const static struct superio_registers reg_table[] = { {0x0604, "F71805", { {EOT}}}, @@ -38,17 +40,7 @@ static void dump_readable_fintek(uint16_t port, uint16_t did) if (!dump_readable) return; - switch (did) { - case 0x0604: - printf("Fintek F71805\n"); - break; - case 0x4103: - printf("Fintek F71872\n"); - break; - default: - printf("Unknown Fintek Super I/O: did=0x%04x\n", did); - return; - } + printf("Human-readable register dump:\n"); printf("Flash write is %s.\n", regval(port, 0x28) & 0x80 ? "enabled" : "disabled"); @@ -117,7 +109,7 @@ void probe_idregs_fintek(uint16_t port) vid = regval(port, VENDOR_ID_BYTE1_REG); vid |= (regval(port, VENDOR_ID_BYTE2_REG) << 8); - if (vid != 0x3419) { + if (vid != FINTEK_VENDOR_ID || superio_unknown(reg_table, did)) { no_superio_found(port); exit_conf_mode_winbond_fintek_ite_8787(port); return; -- cgit v1.2.3