Enables parsing Meteor Lake inteltool output into gpio.h pad macros. Change-Id: Iaebd51d587507e68c6f263b92dc61cb6c0411bf8 Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81916 Reviewed-by: Maxim <max.senia.poliak@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
		
			
				
	
	
		
			24 lines
		
	
	
		
			915 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			915 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package mtl
 | |
| 
 | |
| import "review.coreboot.org/coreboot.git/util/intelp2m/platforms/common"
 | |
| 
 | |
| // 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) {
 | |
| 	return common.KeywordsCheck(line,
 | |
| 		"GPP_V", "GPP_C", "GPP_A", "GPP_E", "GPP_H", "GPP_F", "GPP_S",
 | |
| 		"GPP_B", "GPP_D", "GPD", "VGPIO_USB", "VGPIO_PCIE")
 | |
| 
 | |
| }
 | |
| 
 | |
| // 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 (PlatformSpecific) KeywordCheck(line string) bool {
 | |
| 	isIncluded, _ := common.KeywordsCheck(line, "GPP_", "GPD", "VGPIO")
 | |
| 	return isIncluded
 | |
| }
 |