diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2007-09-19 00:03:14 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2007-09-19 00:03:14 +0000 |
commit | de24a0e58557ac7913e2f8174710f50e4697b1bd (patch) | |
tree | d09db121810e5c61fd12650defb033b9c2c0bed7 /util/superiotool/superiotool.c | |
parent | d754d2c6c4970e686d004ea4d39c5e6599abf46f (diff) |
Use uint16_t and friends where appropriate (trivial).
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@2783 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool/superiotool.c')
-rw-r--r-- | util/superiotool/superiotool.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c index 3514b24415..e95f1baac6 100644 --- a/util/superiotool/superiotool.c +++ b/util/superiotool/superiotool.c @@ -22,23 +22,23 @@ #include "superiotool.h" -unsigned char regval(unsigned short port, unsigned char reg) +uint8_t regval(uint16_t port, uint8_t reg) { outb(reg, port); return inb(port + 1); } -void regwrite(unsigned short port, unsigned char reg, unsigned char val) +void regwrite(uint16_t port, uint8_t reg, uint8_t val) { outb(reg, port); outb(val, port + 1); } void dump_superio(const char *name, const struct superio_registers reg_table[], - unsigned short port, unsigned short id) + uint16_t port, uint16_t id) { int i, j, k; - signed short *idx; + int *idx; printf("%s ", name); @@ -46,33 +46,32 @@ void dump_superio(const char *name, const struct superio_registers reg_table[], if (reg_table[i].superio_id == EOT) break; - if ((unsigned short)reg_table[i].superio_id != id) + if ((uint16_t)reg_table[i].superio_id != id) continue; printf("%s\n", reg_table[i].name); - for (j = 0;; j++) { + for (j = 0; /* Nothing */; j++) { if (reg_table[i].ldn[j].ldn == EOT) break; if (reg_table[i].ldn[j].ldn != NOLDN) { - printf("Switching to LDN 0x%01x\n", + printf("Switching to LDN 0x%02x\n", reg_table[i].ldn[j].ldn); - regwrite(port, 0x07, - reg_table[i].ldn[j].ldn); + regwrite(port, 0x07, reg_table[i].ldn[j].ldn); } idx = reg_table[i].ldn[j].idx; printf("idx "); - for (k = 0;; k++) { + for (k = 0; /* Nothing */; k++) { if (idx[k] == EOT) break; printf("%02x ", idx[k]); } printf("\nval "); - for (k = 0;; k++) { + for (k = 0; /* Nothing */; k++) { if (idx[k] == EOT) break; printf("%02x ", regval(port, idx[k])); @@ -80,7 +79,7 @@ void dump_superio(const char *name, const struct superio_registers reg_table[], printf("\ndef "); idx = reg_table[i].ldn[j].def; - for (k = 0;; k++) { + for (k = 0; /* Nothing */; k++) { if (idx[k] == EOT) break; else if (idx[k] == NANA) |