util/intelp2m: use import once for all included modules
There is no need to repeat "import" for each module in GoLang. Use this keyword only once in each file for code cleanliness. Change-Id: Ibb24fafd409b31b174946a39ca1f810d59b87e76 Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55985 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
421ce56f83
commit
8b35851e4c
|
@ -1,7 +1,9 @@
|
||||||
package cb
|
package cb
|
||||||
|
|
||||||
import "../../config"
|
import (
|
||||||
import "../../platforms/common"
|
"../../config"
|
||||||
|
"../../platforms/common"
|
||||||
|
)
|
||||||
|
|
||||||
type FieldMacros struct {}
|
type FieldMacros struct {}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package fields
|
package fields
|
||||||
|
|
||||||
import "../config"
|
import (
|
||||||
import "../platforms/common"
|
"../config"
|
||||||
|
"../platforms/common"
|
||||||
import "./fsp"
|
"./fsp"
|
||||||
import "./cb"
|
"./cb"
|
||||||
import "./raw"
|
"./raw"
|
||||||
|
)
|
||||||
|
|
||||||
// InterfaceSet - set the interface for decoding configuration
|
// InterfaceSet - set the interface for decoding configuration
|
||||||
// registers DW0 and DW1.
|
// registers DW0 and DW1.
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package raw
|
package raw
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
import "../../platforms/common"
|
"fmt"
|
||||||
|
"../../platforms/common"
|
||||||
|
)
|
||||||
|
|
||||||
type FieldMacros struct {}
|
type FieldMacros struct {}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "flag"
|
import (
|
||||||
import "fmt"
|
"flag"
|
||||||
import "os"
|
"fmt"
|
||||||
|
"os"
|
||||||
import "./parser"
|
"./parser"
|
||||||
import "./config"
|
"./config"
|
||||||
|
)
|
||||||
|
|
||||||
// generateOutputFile - generates include file
|
// generateOutputFile - generates include file
|
||||||
// parser : parser data structure
|
// parser : parser data structure
|
||||||
|
|
|
@ -5,15 +5,14 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"../platforms/common"
|
||||||
|
"../platforms/snr"
|
||||||
|
"../platforms/lbg"
|
||||||
|
"../platforms/apl"
|
||||||
|
"../platforms/cnl"
|
||||||
|
"../config"
|
||||||
)
|
)
|
||||||
|
|
||||||
import "../platforms/common"
|
|
||||||
import "../platforms/snr"
|
|
||||||
import "../platforms/lbg"
|
|
||||||
import "../platforms/apl"
|
|
||||||
import "../platforms/cnl"
|
|
||||||
import "../config"
|
|
||||||
|
|
||||||
// PlatformSpecific - platform-specific interface
|
// PlatformSpecific - platform-specific interface
|
||||||
type PlatformSpecific interface {
|
type PlatformSpecific interface {
|
||||||
GenMacro(id string, dw0 uint32, dw1 uint32, ownership uint8) string
|
GenMacro(id string, dw0 uint32, dw1 uint32, ownership uint8) string
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package apl
|
package apl
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
import "strconv"
|
"fmt"
|
||||||
|
"strconv"
|
||||||
// Local packages
|
"../common"
|
||||||
import "../common"
|
"../../config"
|
||||||
import "../../config"
|
"../../fields"
|
||||||
import "../../fields"
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc
|
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package cnl
|
package cnl
|
||||||
|
|
||||||
import "strings"
|
import (
|
||||||
import "fmt"
|
"strings"
|
||||||
|
"fmt"
|
||||||
// Local packages
|
"../common"
|
||||||
import "../common"
|
"../../config"
|
||||||
import "../../config"
|
"../../fields"
|
||||||
import "../../fields"
|
"../snr"
|
||||||
import "../snr"
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc
|
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package common
|
package common
|
||||||
|
|
||||||
import "strconv"
|
import (
|
||||||
import "sync"
|
"strconv"
|
||||||
|
"sync"
|
||||||
import "../../config"
|
"../../config"
|
||||||
|
)
|
||||||
|
|
||||||
type Fields interface {
|
type Fields interface {
|
||||||
DecodeDW0()
|
DecodeDW0()
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package lbg
|
package lbg
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
|
"fmt"
|
||||||
// Local packages
|
"../../config"
|
||||||
import "../../config"
|
"../../fields"
|
||||||
import "../../fields"
|
"../common"
|
||||||
import "../common"
|
"../snr"
|
||||||
import "../snr"
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc
|
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package snr
|
package snr
|
||||||
|
|
||||||
import "strings"
|
import (
|
||||||
import "fmt"
|
"strings"
|
||||||
|
"fmt"
|
||||||
// Local packages
|
"../common"
|
||||||
import "../common"
|
"../../config"
|
||||||
import "../../config"
|
"../../fields"
|
||||||
import "../../fields"
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc
|
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc
|
||||||
|
|
Loading…
Reference in New Issue