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:
Maxim Polyakov 2021-06-30 16:14:53 +03:00 committed by Patrick Georgi
parent 421ce56f83
commit 8b35851e4c
10 changed files with 62 additions and 56 deletions

View File

@ -1,7 +1,9 @@
package cb
import "../../config"
import "../../platforms/common"
import (
"../../config"
"../../platforms/common"
)
type FieldMacros struct {}

View File

@ -1,11 +1,12 @@
package fields
import "../config"
import "../platforms/common"
import "./fsp"
import "./cb"
import "./raw"
import (
"../config"
"../platforms/common"
"./fsp"
"./cb"
"./raw"
)
// InterfaceSet - set the interface for decoding configuration
// registers DW0 and DW1.

View File

@ -1,7 +1,9 @@
package raw
import "fmt"
import "../../platforms/common"
import (
"fmt"
"../../platforms/common"
)
type FieldMacros struct {}

View File

@ -1,11 +1,12 @@
package main
import "flag"
import "fmt"
import "os"
import "./parser"
import "./config"
import (
"flag"
"fmt"
"os"
"./parser"
"./config"
)
// generateOutputFile - generates include file
// parser : parser data structure

View File

@ -5,15 +5,14 @@ import (
"fmt"
"strings"
"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
type PlatformSpecific interface {
GenMacro(id string, dw0 uint32, dw1 uint32, ownership uint8) string

View File

@ -1,12 +1,12 @@
package apl
import "fmt"
import "strconv"
// Local packages
import "../common"
import "../../config"
import "../../fields"
import (
"fmt"
"strconv"
"../common"
"../../config"
"../../fields"
)
const (
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc

View File

@ -1,13 +1,13 @@
package cnl
import "strings"
import "fmt"
// Local packages
import "../common"
import "../../config"
import "../../fields"
import "../snr"
import (
"strings"
"fmt"
"../common"
"../../config"
"../../fields"
"../snr"
)
const (
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc

View File

@ -1,9 +1,10 @@
package common
import "strconv"
import "sync"
import "../../config"
import (
"strconv"
"sync"
"../../config"
)
type Fields interface {
DecodeDW0()

View File

@ -1,12 +1,12 @@
package lbg
import "fmt"
// Local packages
import "../../config"
import "../../fields"
import "../common"
import "../snr"
import (
"fmt"
"../../config"
"../../fields"
"../common"
"../snr"
)
const (
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc

View File

@ -1,12 +1,12 @@
package snr
import "strings"
import "fmt"
// Local packages
import "../common"
import "../../config"
import "../../fields"
import (
"strings"
"fmt"
"../common"
"../../config"
"../../fields"
)
const (
PAD_CFG_DW0_RO_FIELDS = (0x1 << 27) | (0x1 << 24) | (0x3 << 21) | (0xf << 16) | 0xfc