| 1 |
package lbg |
| 2 |
|
| 3 |
import ( |
| 4 |
"review.coreboot.org/coreboot.git/util/intelp2m/logs" |
| 5 |
"review.coreboot.org/coreboot.git/util/intelp2m/platforms/common" |
| 6 |
"review.coreboot.org/coreboot.git/util/intelp2m/platforms/common/register/bits" |
| 7 |
"review.coreboot.org/coreboot.git/util/intelp2m/platforms/snr" |
| 8 |
) |
| 9 |
|
| 10 |
const ( |
| 11 |
DW0Mask uint32 = (0b1 << 27) | (0b1 << 24) | (0b11 << 21) | (0b1111 << 16) | 0b11111100 |
| 12 |
DW1Mask uint32 = 0b11111101111111111100001111111111 |
| 13 |
) |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
var GPPGroups = []string{"GPP_", "GPD"} |
| 18 |
|
| 19 |
var remapping = common.ResetSources{ |
| 20 |
0b00: bits.RstCfgRSMRST << bits.DW0PadRstCfg, |
| 21 |
0b01: bits.RstCfgDEEP << bits.DW0PadRstCfg, |
| 22 |
0b10: bits.RstCfgPLTRST << bits.DW0PadRstCfg, |
| 23 |
} |
| 24 |
|
| 25 |
type BasePlatform struct { |
| 26 |
|
| 27 |
snr.BasePlatform |
| 28 |
} |
| 29 |
|
| 30 |
func InitBasePlatform(dw0, dw0mask uint32, dw1, dw1mask uint32) BasePlatform { |
| 31 |
return BasePlatform{snr.InitBasePlatform(dw0, dw0mask, dw1, dw1mask)} |
| 32 |
} |
| 33 |
|
| 34 |
func GetPlatform(dw0, dw1 uint32) common.PlatformIf { |
| 35 |
p := InitBasePlatform(dw0, DW0Mask, dw1, DW1Mask) |
| 36 |
return &p |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
func (p *BasePlatform) RemapResetSource(m *common.Macro) { |
| 41 |
if err := p.UpdateResetSource(remapping); err != nil { |
| 42 |
logs.Errorf("remap reset source for %s: %v", m.GetPadId(), err) |
| 43 |
} |
| 44 |
} |