From 7a51e50582b65bb6ac54e8923470807b5975c6e1 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 1 Dec 2008 14:18:57 +0000 Subject: The Winbond Super I/O chips have another indirection of registers. The hwmon has generic registers and banked registers, mostly temperature handling, and SMI/GPIO stuff. Not all LDNs are switched via register offset 0x07, make it a parameter. Add support for dumping the hardware monitor of Winbond W83627THF/THG parts with the -e option. Signed-off-by: Stefan Reinauer Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3784 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/superiotool/superiotool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'util/superiotool/superiotool.c') diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c index 1bbe5feec7..9d3840f1f7 100644 --- a/util/superiotool/superiotool.c +++ b/util/superiotool/superiotool.c @@ -82,7 +82,7 @@ const char *get_superio_name(const struct superio_registers reg_table[], } static void dump_regs(const struct superio_registers reg_table[], - int i, int j, uint16_t port) + int i, int j, uint16_t port, uint8_t ldn_sel) { int k; const int16_t *idx; @@ -91,7 +91,7 @@ static void dump_regs(const struct superio_registers reg_table[], printf("LDN 0x%02x", reg_table[i].ldn[j].ldn); if (reg_table[i].ldn[j].name != NULL) printf(" (%s)", reg_table[i].ldn[j].name); - regwrite(port, 0x07, reg_table[i].ldn[j].ldn); + regwrite(port, ldn_sel, reg_table[i].ldn[j].ldn); } else { printf("Register dump:"); } @@ -131,7 +131,7 @@ static void dump_regs(const struct superio_registers reg_table[], void dump_superio(const char *vendor, const struct superio_registers reg_table[], - uint16_t port, uint16_t id) + uint16_t port, uint16_t id, uint8_t ldn_sel) { int i, j, no_dump_available = 1; @@ -149,7 +149,7 @@ void dump_superio(const char *vendor, if (reg_table[i].ldn[j].ldn == EOT) break; no_dump_available = 0; - dump_regs(reg_table, i, j, port); + dump_regs(reg_table, i, j, port, ldn_sel); } if (no_dump_available) -- cgit v1.2.3