diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2015-01-03 02:52:10 +0100 |
---|---|---|
committer | Idwer Vollering <vidwer@gmail.com> | 2015-01-08 17:49:58 +0100 |
commit | aa3dd5d5db2bb3a9825a3c5104f28699f7b43f87 (patch) | |
tree | 5d86df2f6c7d45826c2be8f4fcdcd9c2f18752da /util/inteltool/inteltool.c | |
parent | 97398464695e17f76add7a5dcbf4622cec17826a (diff) |
inteltool: add `-s` to dump spi bar and bios_cntl registers
Change-Id: I3bb5dc23885af8c992456ee5e4bd374cd4b813bf
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: http://review.coreboot.org/8049
Reviewed-by: Philipp Deppenwiese <zaolin@das-labor.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/inteltool/inteltool.c')
-rw-r--r-- | util/inteltool/inteltool.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c index ffed606842..38ab061517 100644 --- a/util/inteltool/inteltool.c +++ b/util/inteltool/inteltool.c @@ -209,10 +209,11 @@ void print_version(void) void print_usage(const char *name) { - printf("usage: %s [-vh?gGrpmedPMa]\n", name); + printf("usage: %s [-vh?gGrpmedPMas]\n", name); printf("\n" " -v | --version: print the version\n" " -h | --help: print this help\n\n" + " -s | --spi: dump southbridge spi and bios_cntrl registers\n" " -g | --gpio: dump southbridge GPIO registers\n" " -G | --gpio-diffs: show GPIO differences from defaults\n" " -r | --rcba: dump southbridge RCBA registers\n" @@ -240,6 +241,7 @@ int main(int argc, char *argv[]) int dump_gpios = 0, dump_mchbar = 0, dump_rcba = 0; int dump_pmbase = 0, dump_epbar = 0, dump_dmibar = 0; int dump_pciexbar = 0, dump_coremsrs = 0, dump_ambs = 0; + int dump_spi = 0; int show_gpio_diffs = 0; static struct option long_options[] = { @@ -255,11 +257,12 @@ int main(int argc, char *argv[]) {"pciexpress", 0, 0, 'P'}, {"msrs", 0, 0, 'M'}, {"ambs", 0, 0, 'A'}, + {"spi", 0, 0, 's'}, {"all", 0, 0, 'a'}, {0, 0, 0, 0} }; - while ((opt = getopt_long(argc, argv, "vh?gGrpmedPMaA", + while ((opt = getopt_long(argc, argv, "vh?gGrpmedPMaAs", long_options, &option_index)) != EOF) { switch (opt) { case 'v': @@ -304,10 +307,14 @@ int main(int argc, char *argv[]) dump_pciexbar = 1; dump_coremsrs = 1; dump_ambs = 1; + dump_spi = 1; break; case 'A': dump_ambs = 1; break; + case 's': + dump_spi = 1; + break; case 'h': case '?': default: @@ -454,6 +461,10 @@ int main(int argc, char *argv[]) if (dump_ambs) { print_ambs(nb, pacc); } + + if (dump_spi) { + print_spi(sb); + } /* Clean up */ pci_free_dev(nb); // pci_free_dev(sb); // TODO: glibc detected "double free or corruption" |