2 * This file is part of the coreboot project.
4 * Copyright (C) 2010 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
31 #define BIOS_SIZE_1M 0
32 #define BIOS_SIZE_2M 1
33 #define BIOS_SIZE_4M 3
34 #define BIOS_SIZE_8M 7
36 /* In SB800, default ROM size is 1M Bytes, if your platform ROM
37 * bigger than 1M you have to set the ROM size outside CIMx module and
38 * before AGESA module get call.
41 #if CONFIG_COREBOOT_ROMSIZE_KB_1024 == 1
42 #define BIOS_SIZE BIOS_SIZE_1M
43 #elif CONFIG_COREBOOT_ROMSIZE_KB_2048 == 1
44 #define BIOS_SIZE BIOS_SIZE_2M
45 #elif CONFIG_COREBOOT_ROMSIZE_KB_4096 == 1
46 #define BIOS_SIZE BIOS_SIZE_4M
47 #elif CONFIG_COREBOOT_ROMSIZE_KB_8192 == 1
48 #define BIOS_SIZE BIOS_SIZE_8M
53 * @def SPREAD_SPECTRUM
55 * 0 - Disable Spread Spectrum function
56 * 1 - Enable Spread Spectrum function
58 #define SPREAD_SPECTRUM 0
70 * @brief bit[0-6] used to control USB
73 * Usb Ohci1 Contoller (Bus 0 Dev 18 Func0) is define at BIT0
74 * Usb Ehci1 Contoller (Bus 0 Dev 18 Func2) is define at BIT1
75 * Usb Ohci2 Contoller (Bus 0 Dev 19 Func0) is define at BIT2
76 * Usb Ehci2 Contoller (Bus 0 Dev 19 Func2) is define at BIT3
77 * Usb Ohci3 Contoller (Bus 0 Dev 22 Func0) is define at BIT4
78 * Usb Ehci3 Contoller (Bus 0 Dev 22 Func2) is define at BIT5
79 * Usb Ohci4 Contoller (Bus 0 Dev 20 Func5) is define at BIT6
81 #define USB_CINFIG 0x7F
85 * @breif bit[0-4] used for PCI Slots Clock Control,
88 * PCI SLOT 0 define at BIT0
89 * PCI SLOT 1 define at BIT1
90 * PCI SLOT 2 define at BIT2
91 * PCI SLOT 3 define at BIT3
92 * PCI SLOT 4 define at BIT4
94 #define PCI_CLOCK_CTRL 0x1F
97 * @def SATA_CONTROLLER
98 * @breif INCHIP Sata Controller
100 #ifndef SATA_CONTROLLER
101 #define SATA_CONTROLLER ENABLED
106 * @breif INCHIP Sata Controller Mode
107 * NOTE: DO NOT ALLOW SATA & IDE use same mode
110 #define SATA_MODE NATIVE_IDE_MODE
114 * @breif INCHIP Sata IDE Controller Mode
116 #define IDE_LEGACY_MODE 0
117 #define IDE_NATIVE_MODE 1
121 * @breif INCHIP Sata IDE Controller Mode
122 * NOTE: DO NOT ALLOW SATA & IDE use same mode
124 #ifndef SATA_IDE_MODE
125 #define SATA_IDE_MODE IDE_LEGACY_MODE
129 * @def EXTERNAL_CLOCK
130 * @brief 00/10: Reference clock from crystal oscillator via
131 * PAD_XTALI and PAD_XTALO
133 * @def INTERNAL_CLOCK
134 * @brief 01/11: Reference clock from internal clock through
135 * CP_PLL_REFCLK_P and CP_PLL_REFCLK_N via RDL
137 #define EXTERNAL_CLOCK 0x00
138 #define INTERNAL_CLOCK 0x01
140 /* NOTE: inagua have to using internal clock,
141 * otherwise can not detect sata drive
143 #define SATA_CLOCK_SOURCE INTERNAL_CLOCK
146 * @def SATA_PORT_MULT_CAP_RESERVED
149 #define SATA_PORT_MULT_CAP_RESERVED 1
153 * @brief Detect Azalia controller automatically.
155 * @def AZALIA_DISABLE
156 * @brief Disable Azalia controller.
159 * @brief Enable Azalia controller.
161 #define AZALIA_AUTO 0
162 #define AZALIA_DISABLE 1
163 #define AZALIA_ENABLE 2
166 * @breif INCHIP HDA controller
168 #ifndef AZALIA_CONTROLLER
169 #define AZALIA_CONTROLLER AZALIA_AUTO
173 * @def AZALIA_PIN_CONFIG
178 #ifndef AZALIA_PIN_CONFIG
179 #define AZALIA_PIN_CONFIG 1
183 * @def AZALIA_SDIN_PIN
185 * SDIN0 is define at BIT0 & BIT1
188 * 10 - As a Azalia SDIN pin
189 * SDIN1 is define at BIT2 & BIT3
190 * SDIN2 is define at BIT4 & BIT5
191 * SDIN3 is define at BIT6 & BIT7
193 #ifndef AZALIA_SDIN_PIN
194 //#define AZALIA_SDIN_PIN 0xAA
195 #define AZALIA_SDIN_PIN 0x2A
199 * @def GPP_CONTROLLER
201 #ifndef GPP_CONTROLLER
202 #define GPP_CONTROLLER ENABLED
207 * @brief GPP Link Configuration
208 * four possible configuration:
215 #define GPP_CFGMODE GPP_CFGMODE_X1111
219 * @brief South Bridge CIMx configuration
221 void sb800_cimx_config(AMDSBCFG *sb_cfg);
224 * @brief Entry point of Southbridge CIMx callout
226 * prototype UINT32 (*SBCIM_HOOK_ENTRY)(UINT32 Param1, UINT32 Param2, void* pConfig)
228 * @param[in] func Southbridge CIMx Function ID.
229 * @param[in] data Southbridge Input Data.
230 * @param[in] sb_cfg Southbridge configuration structure pointer.
232 u32 sb800_callout_entry(u32 func, u32 data, void* sb_cfg);