Alexander Couzens has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35609 )
Change subject: util/inteltool: export gpio config ......................................................................
util/inteltool: export gpio config
TODO: add a switch for inteltool to print this version
Change-Id: I16d625f6a844bc328fd95d4661ed56db246ca76b Signed-off-by: Alexander Couzens lynxis@fe80.eu --- M util/inteltool/gpio_groups.c 1 file changed, 7 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/35609/1
diff --git a/util/inteltool/gpio_groups.c b/util/inteltool/gpio_groups.c index 321cf97..2310c5e 100644 --- a/util/inteltool/gpio_groups.c +++ b/util/inteltool/gpio_groups.c @@ -2179,7 +2179,7 @@ { size_t p;
- printf("%s\n", group->display); + printf("/* %s */\n", group->display);
for (p = 0; p < group->pad_count; ++p, pad_cfg += pad_stepping) { const uint32_t dw0 = read_pcr32(pid, pad_cfg); @@ -2187,7 +2187,11 @@ const char *const pad_name = group->pad_names[p * group->func_count];
- printf("0x%04zx: 0x%016"PRIx64" %-12s %-20s\n", pad_cfg, + printf("\t// %s,\n", decode_pad_mode(group, p, dw0)); + printf("\t_PAD_CFG_STRUCT(%s\t0x%08x, 0x%08x),\n", + pad_name[0] == '*' ? &pad_name[1] : pad_name, dw0, dw1); + + fprintf(stderr, "0x%04zx: 0x%016"PRIx64" %-12s %-20s\n", pad_cfg, (uint64_t)dw1 << 32 | dw0, pad_name[0] == '*' ? &pad_name[1] : pad_name, decode_pad_mode(group, p, dw0)); @@ -2200,7 +2204,7 @@ size_t group, pad_count; size_t pad_cfg; /* offset in bytes under this communities PCR port */
- printf("%s\n\nPCR Port ID: 0x%06zx\n\n", + printf("/* %s\n\nPCR Port ID: 0x%06zx */\n\n", community->name, (size_t)community->pcr_port_id << 16);
for (group = 0, pad_count = 0; group < community->group_count; ++group)