From 726282b44f15904b06f86f3d1d6b4d5d93bba76d Mon Sep 17 00:00:00 2001 From: Maxim Polyakov Date: Wed, 30 Sep 2020 16:46:11 +0300 Subject: util/intelp2m: Update output information format in the comments Update the information format in the comments above the macros in the generated gpio.h file: PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_39, UP_20K, DEEP, NF1, TxLASTRxE, DISPUPD), /* LPSS_UART0_TXD */ -->(i) /* GPIO_39 - LPSS_UART0_TXD */ --> (ii) /* DW0: 0x44000400, DW1: 0x00003100 */ --> (ii) /* DW0 : PAD_TRIG(OFF) - IGNORED */ --> (iii) /* _PAD_CFG_STRUCT(GPIO_39, PAD_FUNC(NF1) | PAD_RESET(DEEP) | PAD_TRIG(OFF), PAD_PULL(UP_20K) | PAD_IOSTERM(DISPUPD)), */ --> (iiii) PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_39, UP_20K, DEEP, NF1, TxLASTRxE, DISPUPD), Also, in the case of field macros: /* GPIO_39 - LPSS_UART0_TXD */ --> (ii) /* DW0: 0x44000400, DW1: 0x00003100 */ --> (ii) /* DW0 : PAD_TRIG(OFF) - IGNORED */ --> (iii) /* PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_39, UP_20K, DEEP, NF1, TxLASTRxE, DISPUPD), */ --> (iiii) PAD_CFG_STRUCT(GPIO_39, PAD_FUNC(NF1) | PAD_RESET(DEEP) | PAD_TRIG(OFF), PAD_PULL(UP_20K) | PAD_IOSTERM(DISPUPD)), By default, if do not use the -i... option, then additional information in comments will not be generated. TEST: git clone https://github.com/maxpoliak/inteltool-examples.git test ./intelp2m -n -file test/inteltool-asrock-h110m-stx.log ./intelp2m -fld cb -file test/inteltool-asrock-h110m-stx.log ./intelp2m -fld fsp -file test/inteltool-asrock-h110m-stx.log ./intelp2m -fld raw -file test/inteltool-asrock-h110m-stx.log Before and after (now with -i key) the patch, gpio.h is no different. Change-Id: I760f4aadece786ea455fb7569f42e06fefce2b61 Signed-off-by: Maxim Polyakov Reviewed-on: https://review.coreboot.org/c/coreboot/+/45168 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- util/intelp2m/config/config.go | 7 ++- util/intelp2m/description.md | 108 ++++++++++++-------------------- util/intelp2m/fields/cb/cb.go | 4 +- util/intelp2m/main.go | 41 ++++-------- util/intelp2m/parser/parser.go | 16 ++--- util/intelp2m/platforms/common/macro.go | 72 ++++++++++++--------- 6 files changed, 110 insertions(+), 138 deletions(-) (limited to 'util') diff --git a/util/intelp2m/config/config.go b/util/intelp2m/config/config.go index 724de8caa6..16fb4d6e01 100644 --- a/util/intelp2m/config/config.go +++ b/util/intelp2m/config/config.go @@ -82,11 +82,12 @@ func IsNonCheckingFlagUsed() bool { return nonCheckingFlag } -var infolevel uint8 = 0 -func InfoLevelSet(lvl uint8) { + +var infolevel int = 0 +func InfoLevelSet(lvl int) { infolevel = lvl } -func InfoLevelGet() uint8 { +func InfoLevelGet() int { return infolevel } diff --git a/util/intelp2m/description.md b/util/intelp2m/description.md index add9c2cf88..9ca56b979e 100644 --- a/util/intelp2m/description.md +++ b/util/intelp2m/description.md @@ -16,7 +16,6 @@ It is possible to use templates for parsing files of excellent inteltool.log. To specify such a pattern, use the option -t