2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 Advanced Micro Devices, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33 #define BIOS_SIZE_1M 0
34 #define BIOS_SIZE_2M 1
35 #define BIOS_SIZE_4M 3
36 #define BIOS_SIZE_8M 7
38 /* In SB800, default ROM size is 1M Bytes, if your platform ROM
39 * bigger than 1M you have to set the ROM size outside CIMx module and
40 * before AGESA module get call.
43 #if CONFIG_COREBOOT_ROMSIZE_KB_1024 == 1
44 #define BIOS_SIZE BIOS_SIZE_1M
45 #elif CONFIG_COREBOOT_ROMSIZE_KB_2048 == 1
46 #define BIOS_SIZE BIOS_SIZE_2M
47 #elif CONFIG_COREBOOT_ROMSIZE_KB_4096 == 1
48 #define BIOS_SIZE BIOS_SIZE_4M
49 #elif CONFIG_COREBOOT_ROMSIZE_KB_8192 == 1
50 #define BIOS_SIZE BIOS_SIZE_8M
55 * @def SPREAD_SPECTRUM
57 * 0 - Disable Spread Spectrum function
58 * 1 - Enable Spread Spectrum function
60 #define SPREAD_SPECTRUM 0
72 * @brief bit[0-6] used to control USB
75 * Usb Ohci1 Contoller (Bus 0 Dev 18 Func0) is define at BIT0
76 * Usb Ehci1 Contoller (Bus 0 Dev 18 Func2) is define at BIT1
77 * Usb Ohci2 Contoller (Bus 0 Dev 19 Func0) is define at BIT2
78 * Usb Ehci2 Contoller (Bus 0 Dev 19 Func2) is define at BIT3
79 * Usb Ohci3 Contoller (Bus 0 Dev 22 Func0) is define at BIT4
80 * Usb Ehci3 Contoller (Bus 0 Dev 22 Func2) is define at BIT5
81 * Usb Ohci4 Contoller (Bus 0 Dev 20 Func5) is define at BIT6
83 #define USB_CINFIG 0x7F
87 * @breif bit[0-4] used for PCI Slots Clock Control,
90 * PCI SLOT 0 define at BIT0
91 * PCI SLOT 1 define at BIT1
92 * PCI SLOT 2 define at BIT2
93 * PCI SLOT 3 define at BIT3
94 * PCI SLOT 4 define at BIT4
96 #define PCI_CLOCK_CTRL 0x1F
99 * @def SATA_CONTROLLER
100 * @breif INCHIP Sata Controller
102 #ifndef SATA_CONTROLLER
103 #define SATA_CONTROLLER CIMX_OPTION_ENABLED
108 * @breif INCHIP Sata Controller Mode
109 * NOTE: DO NOT ALLOW SATA & IDE use same mode
112 #define SATA_MODE AHCI_MODE
116 * @breif INCHIP Sata IDE Controller Mode
118 #define IDE_LEGACY_MODE 0
119 #define IDE_NATIVE_MODE 1
123 * @breif INCHIP Sata IDE Controller Mode
124 * NOTE: DO NOT ALLOW SATA & IDE use same mode
126 #ifndef SATA_IDE_MODE
127 #define SATA_IDE_MODE IDE_LEGACY_MODE
131 * @def EXTERNAL_CLOCK
132 * @brief 00/10: Reference clock from crystal oscillator via
133 * PAD_XTALI and PAD_XTALO
135 * @def INTERNAL_CLOCK
136 * @brief 01/11: Reference clock from internal clock through
137 * CP_PLL_REFCLK_P and CP_PLL_REFCLK_N via RDL
139 #define EXTERNAL_CLOCK 0x00
140 #define INTERNAL_CLOCK 0x01
142 /* NOTE: inagua have to using internal clock,
143 * otherwise can not detect sata drive
145 #define SATA_CLOCK_SOURCE INTERNAL_CLOCK
148 * @def SATA_PORT_MULT_CAP_RESERVED
151 #define SATA_PORT_MULT_CAP_RESERVED 1
156 * @brief Detect Azalia controller automatically.
158 * @def AZALIA_DISABLE
159 * @brief Disable Azalia controller.
162 * @brief Enable Azalia controller.
164 #define AZALIA_AUTO 0
165 #define AZALIA_DISABLE 1
166 #define AZALIA_ENABLE 2
169 * @breif INCHIP HDA controller
171 #ifndef AZALIA_CONTROLLER
172 #define AZALIA_CONTROLLER AZALIA_AUTO
176 * @def AZALIA_PIN_CONFIG
181 #ifndef AZALIA_PIN_CONFIG
182 #define AZALIA_PIN_CONFIG 1
186 * @def AZALIA_SDIN_PIN
188 * SDIN0 is define at BIT0 & BIT1
191 * 10 - As a Azalia SDIN pin
192 * SDIN1 is define at BIT2 & BIT3
193 * SDIN2 is define at BIT4 & BIT5
194 * SDIN3 is define at BIT6 & BIT7
196 #ifndef AZALIA_SDIN_PIN
197 //#define AZALIA_SDIN_PIN 0xAA
198 #define AZALIA_SDIN_PIN 0x2A
202 * @def GPP_CONTROLLER
204 #ifndef GPP_CONTROLLER
205 #define GPP_CONTROLLER CIMX_OPTION_ENABLED
210 * @brief GPP Link Configuration
211 * four possible configuration:
218 #define GPP_CFGMODE GPP_CFGMODE_X1111
223 * @brief South Bridge CIMx configuration
226 void sb800_cimx_config(AMDSBCFG *sb_cfg);
229 * @brief Entry point of Southbridge CIMx callout
231 * prototype UINT32 (*SBCIM_HOOK_ENTRY)(UINT32 Param1, UINT32 Param2, void* pConfig)
233 * @param[in] func Southbridge CIMx Function ID.
234 * @param[in] data Southbridge Input Data.
235 * @param[in] sb_cfg Southbridge configuration structure pointer.
238 u32 sb800_callout_entry(u32 func, u32 data, void* sb_cfg);