AGESA boards: Clean up Ids.h and Filecode.h includes
[coreboot.git] / src / mainboard / amd / lamar / OemCustomize.c
blob32f8c23a819637e4636cd99eaaf7d317ea499e7b
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2012 Advanced Micro Devices, Inc.
5 * 2013 - 2014 Sage Electronic Engineering, LLC
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
17 #include <northbridge/amd/pi/agesawrapper.h>
20 static const PCIe_PORT_DESCRIPTOR PortList [] = {
23 * Lanes to pins to PCI device mapping can be found in section 2.12 of the
24 * BIOS and Kernel Developer's Guide for AMD Family 15h Models 30h-3Fh
27 { /* PCIe x16 Connector J119, DP4/5/6, GFX[15:0], Lanes [31:16], PCI 00:02.1 */
29 PCIE_ENGINE_DATA_INITIALIZER (PciePortEngine, 16, 31),
30 PCIE_PORT_DATA_INITIALIZER_V2 (
31 PortEnabled,
32 ChannelTypeExt6db, 0, 0,
33 HotplugDisabled,
34 PcieGenMaxSupported,
35 PcieGenMaxSupported,
36 AspmDisabled,
37 175,
42 { /* PCIe x4 Connector J118, GPP[3:0], Lanes [11:8], PCI 00:03.2 */
44 PCIE_ENGINE_DATA_INITIALIZER (PciePortEngine, 8, 11),
45 PCIE_PORT_DATA_INITIALIZER_V2 (
46 PortEnabled,
47 ChannelTypeExt6db, 0, 0,
48 HotplugDisabled,
49 PcieGenMaxSupported,
50 PcieGenMaxSupported,
51 AspmDisabled,
52 176,
57 { /* PCIe x4 Connector J120, GPP[7:4], Lanes [15:12] */
58 DESCRIPTOR_TERMINATE_LIST,
59 PCIE_ENGINE_DATA_INITIALIZER (
60 IS_ENABLED(CONFIG_ENABLE_DP3_DAUGHTER_CARD_IN_J120) ? PcieUnusedEngine : PciePortEngine,
61 12, 15
63 PCIE_PORT_DATA_INITIALIZER_V2 (
64 PortEnabled,
65 ChannelTypeExt6db, 0, 0,
66 HotplugDisabled,
67 PcieGenMaxSupported, PcieGenMaxSupported,
68 AspmDisabled,
69 177,
76 static const PCIe_DDI_DESCRIPTOR DdiList [] = {
77 { /* DP3 */
79 PCIE_ENGINE_DATA_INITIALIZER (
80 IS_ENABLED(CONFIG_ENABLE_DP3_DAUGHTER_CARD_IN_J120) ? PcieDdiEngine : PcieUnusedEngine,
81 12, 15
83 PCIE_DDI_DATA_INITIALIZER (ConnectorTypeDP, Aux4, Hdp4)
86 { /* DP2 */
88 PCIE_ENGINE_DATA_INITIALIZER (PcieDdiEngine, 36, 39),
89 PCIE_DDI_DATA_INITIALIZER (ConnectorTypeDP, Aux3, Hdp3)
92 { /* DP1 */
94 PCIE_ENGINE_DATA_INITIALIZER (PcieDdiEngine, 32, 35),
95 PCIE_DDI_DATA_INITIALIZER (ConnectorTypeDP, Aux2, Hdp2)
98 { /* DP0 */
99 DESCRIPTOR_TERMINATE_LIST,
100 PCIE_ENGINE_DATA_INITIALIZER (PcieDdiEngine, 4, 7),
101 PCIE_DDI_DATA_INITIALIZER (ConnectorTypeDP, Aux1, Hdp1)
105 static const PCIe_COMPLEX_DESCRIPTOR PcieComplex = {
106 .Flags = DESCRIPTOR_TERMINATE_LIST,
107 .SocketId = 0,
108 .PciePortList = PortList,
109 .DdiLinkList = DdiList
112 /*---------------------------------------------------------------------------------------*/
114 * OemCustomizeInitEarly
116 * Description:
117 * This stub function will call the host environment through the binary block
118 * interface (call-out port) to provide a user hook opportunity
120 * Parameters:
121 * @param[in] *InitEarly
123 * @retval VOID
126 /*---------------------------------------------------------------------------------------*/
127 VOID
128 OemCustomizeInitEarly (
129 IN OUT AMD_EARLY_PARAMS *InitEarly
132 InitEarly->GnbConfig.PcieComplexList = &PcieComplex;