AMD SB800: Drop component prefix from filenames.
[coreboot.git] / src / southbridge / amd / cimx_wrapper / sb800 / SBPLATFORM.h
1 /*\r
2  *****************************************************************************\r
3  *\r
4  * This file is part of the coreboot project.\r
5  *\r
6  * Copyright (C) 2010 Advanced Micro Devices, Inc.\r
7  *\r
8  * This program is free software; you can redistribute it and/or modify\r
9  * it under the terms of the GNU General Public License as published by\r
10  * the Free Software Foundation; version 2 of the License.\r
11  *\r
12  * This program is distributed in the hope that it will be useful,\r
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15  * GNU General Public License for more details.\r
16  *\r
17  * You should have received a copy of the GNU General Public License\r
18  * along with this program; if not, write to the Free Software\r
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA\r
20  * ***************************************************************************\r
21  *\r
22  */\r
23 \r
24 #ifndef  _AMD_SBPLATFORM_H_\r
25 #define  _AMD_SBPLATFORM_H_\r
26 \r
27 #include <southbridge/amd/cimx_wrapper/sb800/cbtypes.h>\r
28 typedef UINT64 PLACEHOLDER;\r
29 #include <southbridge/amd/cimx_wrapper/sb800/Amdlib.h>\r
30 #include <southbridge/amd/cimx_wrapper/sb800/Amd.h>\r
31 #include <vendorcode/amd/cimx/lib/amdlib32.h> //TODO merge with agesa wrapper\r
32 #include <vendorcode/amd/cimx/sb800/SB800.h>\r
33 #include <vendorcode/amd/cimx/sb800/SBTYPE.h>\r
34 #include <vendorcode/amd/cimx/sb800/ACPILIB.h>\r
35 #include <vendorcode/amd/cimx/sb800/SBDEF.h>\r
36 #include <vendorcode/amd/cimx/sb800/AMDSBLIB.h>\r
37 #include <vendorcode/amd/cimx/sb800/SBSUBFUN.h>\r
38 #include <vendorcode/amd/cimx/sb800/OEM.h>\r
39 \r
40 #ifdef NULL\r
41   #undef NULL\r
42 #endif\r
43 #define NULL            0\r
44 \r
45 #ifndef SBOEM_ACPI_RESTORE_SWSMI\r
46   #define SBOEM_BEFORE_PCI_RESTORE_SWSMI    0xD3\r
47   #define SBOEM_AFTER_PCI_RESTORE_SWSMI     0xD4\r
48 #endif\r
49 \r
50 #ifndef _AMD_NB_CIM_X_PROTOCOL_H_\r
51 \r
52 /// Extended PCI Address\r
53 typedef struct _EXT_PCI_ADDR {\r
54   UINT32                  Reg :16; ///< / PCI Register\r
55   UINT32                  Func:3;  ///< / PCI Function\r
56   UINT32                  Dev :5;  ///< / PCI Device\r
57   UINT32                  Bus :8;  ///< / PCI Address\r
58 } EXT_PCI_ADDR;\r
59 \r
60 /// PCI Address\r
61 typedef union _PCI_ADDR {\r
62   UINT32                  ADDR; ///< / 32 bit Address\r
63   EXT_PCI_ADDR            Addr; ///< / Extended PCI Address\r
64 } PCI_ADDR;\r
65 #endif\r
66 \r
67 #define FIXUP_PTR(ptr)  ptr\r
68 \r
69 //------------------------------------------------------------------------------------------------------------------------//\r
70 /**\r
71  * SB_CIMx_PARAMETER                0                1                   2            Defult Value When CIMx Take over\r
72  *  SpreadSpectrum         CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
73  * SpreadSpectrumType      CIMx take over   User (Setup Option) User (Setup Option)               Normal\r
74  *     HpetTimer           CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
75  *     HpetMsiDis          CIMx take over   User (Setup Option) User (Setup Option)               Enable (0x00)\r
76  *      IrConfig           CIMx take over   User (Setup Option) User (Setup Option)               Disable (0x00)\r
77  * SpiFastReadEnable       CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
78  * SpiFastReadSpeed        CIMx take over   User (Setup Option) User (Setup Option)               Disable (NULL)\r
79  *     NbSbGen2            CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
80  * AlinkPhyPllPowerDown    CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
81  * ResetCpuOnSyncFlood     CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
82  *     GppGen2             CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
83  *  GppMemWrImprove        CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
84  *    GppPortAspm          CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
85  *  GppLaneReversal        CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
86  *  GppPhyPllPowerDown     CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
87  *  UsbPhyPowerDown        CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
88  *  SBGecDebugBus          CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
89  *     SBGecPwr            CIMx take over   User (Setup Option) User (Setup Option)               Nerver Power down (0x11)\r
90  *   SataSetMaxGen2        CIMx take over   User (Setup Option) User (Setup Option)               Max Gen3 (0x00)\r
91  *   SataClkMode           CIMx take over   User (Setup Option) User (Setup Option)               0x90   int. 100Mhz\r
92  *  SataAggrLinkPmCap      CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
93  *  SataPortMultCap        CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
94  *   SataPscCap            CIMx take over   User (Setup Option) User (Setup Option)               Enable (0x00)\r
95  *   SataSscCap            CIMx take over   User (Setup Option) User (Setup Option)               Enable (0x00)\r
96  * SataFisBasedSwitching   CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
97  *   SataCccSupport        CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
98  *   SataMsiCapability     CIMx take over   User (Setup Option) User (Setup Option)               Enable\r
99  *   SataClkAutoOff        CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
100  *    AcDcMsg              CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
101  *   TimerTickTrack        CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
102  *  ClockInterruptTag      CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
103  *  OhciTrafficHanding     CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
104  *  EhciTrafficHanding     CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
105  *  FusionMsgCMultiCore    CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
106  *   FusionMsgCStage       CIMx take over   User (Setup Option) User (Setup Option)               Disable\r
107  */\r
108 #define SB_CIMx_PARAMETER  0x02\r
109 \r
110 // Generic \r
111 #define cimSpreadSpectrumDefault        TRUE\r
112 #define cimSpreadSpectrumTypeDefault    0x00      // Normal\r
113 #define cimHpetTimerDefault             TRUE\r
114 #define cimHpetMsiDisDefault            FALSE     // Enable\r
115 #define cimIrConfigDefault              0x00      // Disable\r
116 #define cimSpiFastReadEnableDefault     0x00      // Disable\r
117 #define cimSpiFastReadSpeedDefault      0x00      // NULL\r
118 // GPP/AB Controller \r
119 #define cimNbSbGen2Default              TRUE\r
120 #define cimAlinkPhyPllPowerDownDefault  TRUE\r
121 #define cimResetCpuOnSyncFloodDefault   TRUE\r
122 #define cimGppGen2Default               FALSE\r
123 #define cimGppMemWrImproveDefault       TRUE\r
124 #define cimGppPortAspmDefault           FALSE\r
125 #define cimGppLaneReversalDefault       FALSE\r
126 #define cimGppPhyPllPowerDownDefault    TRUE \r
127 // USB Controller\r
128 #define cimUsbPhyPowerDownDefault       FALSE\r
129 // GEC Controller\r
130 #define cimSBGecDebugBusDefault         FALSE\r
131 #define cimSBGecPwrDefault              0x03\r
132 // Sata Controller \r
133 #define cimSataSetMaxGen2Default        0x00\r
134 #define cimSATARefClkSelDefault         0x10\r
135 #define cimSATARefDivSelDefault         0x80\r
136 #define cimSataAggrLinkPmCapDefault     TRUE\r
137 #define cimSataPortMultCapDefault       TRUE\r
138 #define cimSataPscCapDefault            0x00      // Enable\r
139 #define cimSataSscCapDefault            0x00      // Enable\r
140 #define cimSataFisBasedSwitchingDefault FALSE \r
141 #define cimSataCccSupportDefault        FALSE\r
142 #define cimSataClkAutoOffDefault        FALSE\r
143 #define cimNativepciesupportDefault     FALSE\r
144 // Fusion Related \r
145 #define cimAcDcMsgDefault               FALSE\r
146 #define cimTimerTickTrackDefault        FALSE\r
147 #define cimClockInterruptTagDefault     FALSE\r
148 #define cimOhciTrafficHandingDefault    FALSE\r
149 #define cimEhciTrafficHandingDefault    FALSE\r
150 #define cimFusionMsgCMultiCoreDefault   FALSE\r
151 #define cimFusionMsgCStageDefault       FALSE\r
152 \r
153 #endif // _AMD_SBPLATFORM_H_\r