summaryrefslogtreecommitdiff
path: root/util/superiotool/superiotool.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2008-12-01 14:18:57 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-12-01 14:18:57 +0000
commit7a51e50582b65bb6ac54e8923470807b5975c6e1 (patch)
tree9dcf146604016608951ec22602c1782e5d467f9a /util/superiotool/superiotool.c
parentb4eb4fb6b06878c25a43458ff11cd3939d97c60e (diff)
downloadcoreboot-7a51e50582b65bb6ac54e8923470807b5975c6e1.tar.xz
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 <stepan@coresystems.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3784 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool/superiotool.c')
-rw-r--r--util/superiotool/superiotool.c8
1 files changed, 4 insertions, 4 deletions
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)