util/intelp2m: Fix typos
Change-Id: I7210fb44ed54d365181ca23c6b92d2269dc8a697 Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45007 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
308c1b7976
commit
0310279411
|
@ -23,9 +23,9 @@ the coreboot project.
|
||||||
0 - inteltool.log (default)
|
0 - inteltool.log (default)
|
||||||
1 - gpio.h
|
1 - gpio.h
|
||||||
2 - your template
|
2 - your template
|
||||||
(shell)$ ./intelp2m -t 1 -file coreboot/src/mainboard/youboard/gpio.h
|
(shell)$ ./intelp2m -t 1 -file coreboot/src/mainboard/yourboard/gpio.h
|
||||||
```
|
```
|
||||||
You can also add add a template to 'parser/template.go' for your file type with
|
You can also add a template to 'parser/template.go' for your file type with
|
||||||
the configuration of the pads.
|
the configuration of the pads.
|
||||||
|
|
||||||
platform type is set using the -p option (Sunrise by default):
|
platform type is set using the -p option (Sunrise by default):
|
||||||
|
@ -35,7 +35,7 @@ platform type is set using the -p option (Sunrise by default):
|
||||||
snr - Sunrise PCH with Skylake/Kaby Lake CPU
|
snr - Sunrise PCH with Skylake/Kaby Lake CPU
|
||||||
lbg - Lewisburg PCH with Xeon SP CPU
|
lbg - Lewisburg PCH with Xeon SP CPU
|
||||||
apl - Apollo Lake SoC
|
apl - Apollo Lake SoC
|
||||||
cnl - CannonLake-LP or Whiskeylake/Coffelake/Cometlake-U SoC
|
cnl - CannonLake-LP or Whiskeylake/Coffeelake/Cometlake-U SoC
|
||||||
(default "snr")
|
(default "snr")
|
||||||
|
|
||||||
(shell)$ ./intelp2m -p <platform> -file path/to/inteltool.log
|
(shell)$ ./intelp2m -p <platform> -file path/to/inteltool.log
|
||||||
|
|
|
@ -19,11 +19,11 @@ type field struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate - wrapper for generating bitfield macros string
|
// generate - wrapper for generating bitfield macros string
|
||||||
// fileds : field structure
|
// fields : field structure
|
||||||
func generate(fileds ...*field) {
|
func generate(fields ...*field) {
|
||||||
macro := common.GetMacro()
|
macro := common.GetMacro()
|
||||||
var allhidden bool = true
|
var allhidden bool = true
|
||||||
for _, field := range fileds {
|
for _, field := range fields {
|
||||||
if field.unhide {
|
if field.unhide {
|
||||||
allhidden = false
|
allhidden = false
|
||||||
macro.Or()
|
macro.Or()
|
||||||
|
|
|
@ -15,10 +15,10 @@ type field struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate - wrapper for generating bitfield macros string
|
// generate - wrapper for generating bitfield macros string
|
||||||
// fileds : field structure
|
// fields : field structure
|
||||||
func generate(fileds ...*field) {
|
func generate(fields ...*field) {
|
||||||
macro := common.GetMacro()
|
macro := common.GetMacro()
|
||||||
for _, field := range fileds {
|
for _, field := range fields {
|
||||||
if field.override != nil {
|
if field.override != nil {
|
||||||
// override if necessary
|
// override if necessary
|
||||||
field.override(field.configmap, field.value)
|
field.override(field.configmap, field.value)
|
||||||
|
|
|
@ -67,9 +67,9 @@ func main() {
|
||||||
"\tsnr - Sunrise PCH or Skylake/Kaby Lake SoC\n"+
|
"\tsnr - Sunrise PCH or Skylake/Kaby Lake SoC\n"+
|
||||||
"\tlbg - Lewisburg PCH with Xeon SP\n"+
|
"\tlbg - Lewisburg PCH with Xeon SP\n"+
|
||||||
"\tapl - Apollo Lake SoC\n"+
|
"\tapl - Apollo Lake SoC\n"+
|
||||||
"\tcnl - CannonLake-LP or Whiskeylake/Coffelake/Cometlake-U SoC\n")
|
"\tcnl - CannonLake-LP or Whiskeylake/Coffeelake/Cometlake-U SoC\n")
|
||||||
|
|
||||||
filedstyle := flag.String("fld", "none", "set fileds macros style:\n"+
|
fieldstyle := flag.String("fld", "none", "set fields macros style:\n"+
|
||||||
"\tcb - use coreboot style for bit fields macros\n"+
|
"\tcb - use coreboot style for bit fields macros\n"+
|
||||||
"\tfsp - use fsp style\n"+
|
"\tfsp - use fsp style\n"+
|
||||||
"\traw - do not convert, print as is\n")
|
"\traw - do not convert, print as is\n")
|
||||||
|
@ -106,8 +106,8 @@ func main() {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.FldStyleSet(*filedstyle) != 0 {
|
if config.FldStyleSet(*fieldstyle) != 0 {
|
||||||
fmt.Printf("Error! Unknown bit fields style option -%s!\n", *filedstyle)
|
fmt.Printf("Error! Unknown bit fields style option -%s!\n", *fieldstyle)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue