diff options
author | Maxim Polyakov <max.senia.poliak@gmail.com> | 2020-09-08 10:12:02 +0300 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-09-21 08:07:26 +0000 |
commit | 0a6f82835ecbc43b43ff8645f049eee2844a4d85 (patch) | |
tree | 6f70d8525930e78a13a50f055da83813126b88cd /util/intelp2m/parser | |
parent | 85e4c43b02da1561a6af589bdc21fdaa0f112777 (diff) |
util/intelp2m: Check keywords in common code
TEST = ./intelp2m -n -file inteltool.log;
./intelp2m -fld cb -file inteltool.log;
./intelp2m -fld fsp -file inteltool.log;
./intelp2m -fld raw -file inteltool.log.
Before and after the patch, gpio.h is no different.
Change-Id: I8af28960e41fcb97f03fe97c42cdddde07b3615a
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45167
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'util/intelp2m/parser')
-rw-r--r-- | util/intelp2m/parser/parser.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/intelp2m/parser/parser.go b/util/intelp2m/parser/parser.go index 8a58ab78a5..d4c04cd02b 100644 --- a/util/intelp2m/parser/parser.go +++ b/util/intelp2m/parser/parser.go @@ -7,6 +7,7 @@ import ( "strconv" ) +import "../platforms/common" import "../platforms/snr" import "../platforms/lbg" import "../platforms/apl" @@ -224,7 +225,8 @@ func (parser *ParserData) Parse() { scanner := bufio.NewScanner(config.InputRegDumpFile) for scanner.Scan() { parser.line = scanner.Text() - if strings.Contains(parser.line, "GPIO Community") || strings.Contains(parser.line, "GPIO Group") { + isIncluded, _ := common.KeywordsCheck(parser.line, "GPIO Community", "GPIO Group"); + if isIncluded { parser.communityGroupExtract() } else if !parser.padConfigurationExtract() && parser.platform.KeywordCheck(parser.line) { if parser.padInfoExtract() != 0 { |