From 5eeead2d73d2daa2361d0272db41e85e1de79a6c Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 9 Aug 2020 14:13:56 -0500 Subject: util/intelp2m: Add support for Cannonlake-LP SoCs Add support for Cannonlake-LP SoCs (Whiskeylake-U, Coffeelake-U, Cometlake-U) as a separate parsing profile, copying the existing 'Sunrise' profile and adjusting for differences in reset mapping and GPIO macro generation Test: convert inteltool GPIO log dump into coreboot macros for an out-of-tree CML-U board. Change-Id: I86296697ee892af7aa0818fb608b6d68fad2f307 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/44457 Tested-by: build bot (Jenkins) Reviewed-by: Maxim Polyakov --- util/intelp2m/platforms/cnl/template.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 util/intelp2m/platforms/cnl/template.go (limited to 'util/intelp2m/platforms/cnl/template.go') diff --git a/util/intelp2m/platforms/cnl/template.go b/util/intelp2m/platforms/cnl/template.go new file mode 100644 index 0000000000..f1a17413bc --- /dev/null +++ b/util/intelp2m/platforms/cnl/template.go @@ -0,0 +1,33 @@ +package cnl + +import "strings" + +type InheritanceTemplate interface { + + KeywordCheck(line string) bool +} + +// GroupNameExtract - This function extracts the group ID, if it exists in a row +// line : string from the configuration file +// return +// bool : true if the string contains a group identifier +// string : group identifier +func (PlatformSpecific) GroupNameExtract(line string) (bool, string) { + for _, groupKeyword := range []string{ + "GPP_A", "GPP_B", "GPP_G", + "GPP_D", "GPP_F", "GPP_H", + "GPD", "GPP_C", "GPP_E", + } { + if strings.Contains(line, groupKeyword) { + return true, groupKeyword + } + } + return false, "" +} + +// KeywordCheck - This function is used to filter parsed lines of the configuration file and +// returns true if the keyword is contained in the line. +// line : string from the configuration file +func (platform PlatformSpecific) KeywordCheck(line string) bool { + return platform.InheritanceTemplate.KeywordCheck(line) +} -- cgit v1.2.3