summaryrefslogtreecommitdiff
path: root/src/southbridge/amd/amd8111/amd8111_early_ctrl.c
diff options
context:
space:
mode:
authorMarc Jones <marc.jones@amd.com>2007-12-19 01:36:46 +0000
committerMarc Jones <marc.jones@amd.com>2007-12-19 01:36:46 +0000
commit0da5cdeac2b787f5665c3cbc208c3c2adcf331c1 (patch)
treed8bfaaf4daebbfabcf2bc980f5639a852e28a4c9 /src/southbridge/amd/amd8111/amd8111_early_ctrl.c
parent8ae8c8822068ef1722c08073ffa4ecc25633cbee (diff)
downloadcoreboot-0da5cdeac2b787f5665c3cbc208c3c2adcf331c1.tar.xz
Additional early AMD8111 southbridge support for Barcelona platforms.
Check that the SMBus controller is found and stop on an error. Clean up and add additional path through the 8111 reset functions. Signed-off-by: Marc Jones <marc.jones@amd.com> Reviewed-by: Jordan Crouse <jordan.crouse@amd.com> Acked-by: Myles Watson <myles@pel.cs.byu.edu> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3015 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/amd/amd8111/amd8111_early_ctrl.c')
-rw-r--r--src/southbridge/amd/amd8111/amd8111_early_ctrl.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/southbridge/amd/amd8111/amd8111_early_ctrl.c b/src/southbridge/amd/amd8111/amd8111_early_ctrl.c
index 9d40076bea..0e34c31c1e 100644
--- a/src/southbridge/amd/amd8111/amd8111_early_ctrl.c
+++ b/src/southbridge/amd/amd8111/amd8111_early_ctrl.c
@@ -14,25 +14,33 @@ static unsigned get_sbdn(unsigned bus)
}
-static void hard_reset(void)
+static void enable_cf9_x(unsigned sbbusn, unsigned sbdn)
{
- device_t dev;
- unsigned bus;
+ device_t dev;
+ uint8_t byte;
+
+ dev = PCI_DEV(sbbusn, sbdn+1, 3); //ACPI
+ /* enable cf9 */
+ byte = pci_read_config8(dev, 0x41);
+ byte |= (1<<6) | (1<<5);
+ pci_write_config8(dev, 0x41, byte);
+}
- /* Find the device.
- * There can only be one 8111 on a hypertransport chain/bus.
- */
- bus = get_sbbusn(get_sblk());
- dev = pci_locate_device_on_bus(
- PCI_ID(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_ACPI),
- bus);
+static void enable_cf9(void)
+{
+ unsigned sblk = get_sblk();
+ unsigned sbbusn = get_sbbusn(sblk);
+ unsigned sbdn = get_sbdn(sbbusn);
- set_bios_reset();
+ enable_cf9_x(sbbusn, sbdn);
+}
- /* enable cf9 */
- pci_write_config8(dev, 0x41, 0xf1);
+static void hard_reset(void)
+{
+ set_bios_reset();
/* reset */
- outb(0x0e, 0x0cf9);
+ enable_cf9();
+ outb(0x0e, 0x0cf9); // make sure cf9 is enabled
}
static void enable_fid_change_on_sb(unsigned sbbusn, unsigned sbdn)