summaryrefslogtreecommitdiff
path: root/util/superiotool/ite.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2008-03-01 18:49:39 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-03-01 18:49:39 +0000
commiteec5ff4ccb48a640e8a289f1faabee4ff2587005 (patch)
treec2c415ff277eaaf60bea55c2b2bbd2482c990c6c /util/superiotool/ite.c
parenta04027efcac0d2f7c88e726bc0bf47fa337ca085 (diff)
downloadcoreboot-eec5ff4ccb48a640e8a289f1faabee4ff2587005.tar.xz
Small coding style fixes and documentation updates (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@3121 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool/ite.c')
-rw-r--r--util/superiotool/ite.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/util/superiotool/ite.c b/util/superiotool/ite.c
index 9d3a263a57..784c4efcda 100644
--- a/util/superiotool/ite.c
+++ b/util/superiotool/ite.c
@@ -379,7 +379,7 @@ static void exit_conf_mode_ite(uint16_t port)
static void probe_idregs_ite_helper(const char *init, uint16_t port)
{
- uint16_t id, chipver;
+ uint16_t id, chipver, ecport;
probing_for("ITE", init, port);
@@ -400,13 +400,16 @@ static void probe_idregs_ite_helper(const char *init, uint16_t port)
dump_superio("ITE", reg_table, port, id);
if (extra_dump) {
- uint16_t ecport;
- regwrite(port, 0x07, 0x04); /*EC LDN*/
+ regwrite(port, 0x07, 0x04); /* Select LDN 4 (EC). */
+
+ /* Get EC base address (stored in LDN 4, index 0x60/0x61). */
ecport = regval(port, 0x60) << 8;
ecport |= regval(port, 0x61);
+
+ /* EC address register = EC base address + 5. */
ecport += 5;
- printf("Environment Controller (0x%04x)\n",ecport);
+ printf("Environment controller (0x%04x)\n", ecport);
dump_superio("ITE-EC", ec_table, ecport, id);
}
}