Small coding style fixes and documentation updates (trivial).
authorUwe Hermann <uwe@hermann-uwe.de>
Sat, 1 Mar 2008 18:49:39 +0000 (18:49 +0000)
committerUwe Hermann <uwe@hermann-uwe.de>
Sat, 1 Mar 2008 18:49:39 +0000 (18:49 +0000)
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

util/superiotool/README
util/superiotool/ite.c
util/superiotool/superiotool.8
util/superiotool/superiotool.c
util/superiotool/superiotool.h

index 24845b51858a16f40004459f4e94d99987f32ce6..cd7d566b21fe144b9cc4ccc92e80ebbfa1a21040 100644 (file)
@@ -30,10 +30,10 @@ Installation
 Usage
 -----
 
- $ superiotool [-d] [-l] [-V] [-v] [-h]
+ $ superiotool [-d] [-e] [-l] [-V] [-v] [-h]
 
  -d | --dump            Dump Super I/O register contents
- -e | --extra-dump      Dump Secondary registers too (like EC registers etc.)
+ -e | --extra-dump      Dump secondary registers too (e.g. EC registers)
  -l | --list-supported  Show the list of supported Super I/O chips
  -V | --verbose         Verbose mode
  -v | --version         Show the superiotool version
index 9d3a263a577f676f911c9511dcdbec1ba1a68a78..784c4efcdab73324d58fc41f38bd7ed14122ffb4 100644 (file)
@@ -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);
        }
 }
index 65a302a1a6d28e886358a45f9ff7f71bb65fc20d..35046d1809c53ab1462a760c748db08dbb044507 100644 (file)
@@ -77,8 +77,8 @@ detailed information about the
 Dump extra secondary register contents too, if available. Only in combination
 with the
 .B --dump
-option. This option will, for instance, dump the Environmental Controller
-configuration registers for the ITE IT8716f chip. The format is similar to
+option. This option will, for instance, dump the environmental controller (EC)
+configuration registers for the ITE IT8716F chip. The format is similar to
 the output of the
 .B --dump
 option.
index 1edaf30f8679a215ea5d4e4f8e8c436234971260..637c0b089e4059b61a6e103a8a3294aed3d0db3f 100644 (file)
@@ -158,8 +158,7 @@ void probing_for(const char *vendor, const char *info, uint16_t port)
                return;
 
        /* Yes, there's no space between '%s' and 'at'! */
-       printf("Probing for %s Super I/O %sat 0x%x...\n",
-              vendor, info, port);
+       printf("Probing for %s Super I/O %sat 0x%x...\n", vendor, info, port);
 }
 
 /** Print a list of all supported chips from the given vendor. */
index 2ee9019b4c2f06eb6f31d27872e914a6f2bf9359..6961325388ebf691f6282d149b76db90bffeb640 100644 (file)
@@ -30,9 +30,9 @@
 #include <getopt.h>
 #include <sys/io.h>
 
-#define USAGE "Usage: superiotool [-d] [-l] [-V] [-v] [-h]\n\n\
+#define USAGE "Usage: superiotool [-d] [-e] [-l] [-V] [-v] [-h]\n\n\
   -d | --dump            Dump Super I/O register contents\n\
-  -e | --extra-dump      Dump Secondary registers too (like EC registers etc.)\n\
+  -e | --extra-dump      Dump secondary registers too (e.g. EC registers)\n\
   -l | --list-supported  Show the list of supported Super I/O chips\n\
   -V | --verbose         Verbose mode\n\
   -v | --version         Show the superiotool version\n\