diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2007-09-18 23:30:24 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2007-09-18 23:30:24 +0000 |
commit | d754d2c6c4970e686d004ea4d39c5e6599abf46f (patch) | |
tree | bcc0de9ddd23ce1f2417b677ee33e007229bfce8 /util/superiotool/superiotool.c | |
parent | 6ff6af762158147b3c47bd1701a389622bd043a5 (diff) | |
download | coreboot-d754d2c6c4970e686d004ea4d39c5e6599abf46f.tar.gz coreboot-d754d2c6c4970e686d004ea4d39c5e6599abf46f.tar.bz2 coreboot-d754d2c6c4970e686d004ea4d39c5e6599abf46f.zip |
Make the code a bit more generic (trivial). Different Super I/Os
use different config ports.
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@2782 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool/superiotool.c')
-rw-r--r-- | util/superiotool/superiotool.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c index a5dcb2e75318..3514b2441598 100644 --- a/util/superiotool/superiotool.c +++ b/util/superiotool/superiotool.c @@ -97,22 +97,18 @@ void dump_superio(const char *name, const struct superio_registers reg_table[], int main(int argc, char *argv[]) { + int i, j; + if (iopl(3) < 0) { perror("iopl"); exit(1); } - probe_idregs_simple(0x2e); - probe_idregs_simple(0x4e); - - probe_idregs_fintek(0x2e); - probe_idregs_fintek(0x4e); - - probe_idregs_ite(0x2e); - probe_idregs_ite(0x4e); - - probe_idregs_smsc(0x3f0); - probe_idregs_smsc(0x370); + for (i = 0; i < ARRAY_SIZE(superio_ports_table); i++) { + for (j = 0; superio_ports_table[i].ports[j] != EOT; j++) + superio_ports_table[i].probe_idregs( + superio_ports_table[i].ports[j]); + } return 0; } |