1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <northbridge/amd/agesa/state_machine.h>
8 static const PCIe_PORT_DESCRIPTOR PortList
[] = {
11 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 3, 3),
12 PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled
, ChannelTypeExt6db
, 2, 5,
20 /* Initialize Port descriptor (PCIe port, Lanes 1, PCI Device Number 2, ...) */
23 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 2, 2),
24 PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled
, ChannelTypeExt6db
, 2, 4,
32 /* Initialize Port descriptor (PCIe port, Lanes 2, PCI Device Number 2, ...) */
35 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 1, 1),
36 PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled
, ChannelTypeExt6db
, 2, 3,
44 /* Initialize Port descriptor (PCIe port, Lanes 3, PCI Device Number 2, ...) */
47 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 0, 0),
48 PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled
, ChannelTypeExt6db
, 2, 2,
56 /* Initialize Port descriptor (PCIe port, Lanes 4-7, PCI Device Number 4, ...) */
58 DESCRIPTOR_TERMINATE_LIST
,
59 PCIE_ENGINE_DATA_INITIALIZER(PciePortEngine
, 4, 7),
60 PCIE_PORT_DATA_INITIALIZER_V2(PortEnabled
, ChannelTypeExt6db
, 2, 1,
70 static const PCIe_COMPLEX_DESCRIPTOR PcieComplex
= {
71 .Flags
= DESCRIPTOR_TERMINATE_LIST
,
73 .PciePortList
= PortList
,
77 void board_BeforeInitEarly(struct sysinfo
*cb
, AMD_EARLY_PARAMS
*InitEarly
)
79 InitEarly
->GnbConfig
.PcieComplexList
= &PcieComplex
;
80 InitEarly
->PlatformConfig
.CStateMode
= CStateModeC6
;
81 InitEarly
->PlatformConfig
.CpbMode
= CpbModeAuto
;
84 void board_BeforeInitPost(struct sysinfo
*cb
, AMD_POST_PARAMS
*Post
)
87 * Bank interleaving does not work on this platform.
88 * Disable it so AGESA will return success.
90 Post
->MemConfig
.EnableBankIntlv
= FALSE
;
91 /* 4GB variants have ECC */
93 Post
->MemConfig
.EnableEccFeature
= TRUE
;
95 Post
->MemConfig
.EnableEccFeature
= FALSE
;