From d4b278c02c1da92219ebeb34204b9768934aeca3 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Wed, 4 Oct 2006 20:46:15 +0000 Subject: AMD Rev F support git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2435 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/devices/hypertransport.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/devices/hypertransport.c') diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c index 6d37ab5764..f0bd817bf4 100644 --- a/src/devices/hypertransport.c +++ b/src/devices/hypertransport.c @@ -3,7 +3,6 @@ */ - #include #include #include @@ -78,9 +77,11 @@ static unsigned ht_read_freq_cap(device_t dev, unsigned pos) /* AMD K8 Unsupported 1Ghz? */ if ((dev->vendor == PCI_VENDOR_ID_AMD) && (dev->device == 0x1100)) { #if K8_HT_FREQ_1G_SUPPORT == 1 + #if K8_REV_F_SUPPORT == 0 if (is_cpu_pre_e0()) { // only e0 later suupport 1GHz HT freq_cap &= ~(1 << HT_FREQ_1000Mhz); } + #endif #else freq_cap &= ~(1 << HT_FREQ_1000Mhz); #endif @@ -450,8 +451,8 @@ unsigned int hypertransport_scan_chain(struct bus *bus, } flags &= ~0x1f; /* mask out base Unit ID */ - flags |= next_unitid & 0x1f; - pci_write_config16(dev, pos + PCI_CAP_FLAGS, flags); + flags |= next_unitid & 0x1f; + pci_write_config16(dev, pos + PCI_CAP_FLAGS, flags); /* Update the Unitd id in the device structure */ static_count = 1; @@ -490,7 +491,6 @@ unsigned int hypertransport_scan_chain(struct bus *bus, dev->vendor, dev->device, (dev->enabled? "enabled": "disabled"), next_unitid); - } while((last_unitid != next_unitid) && (next_unitid <= (max_devfn >> 3))); end_of_chain: #if OPT_HT_LINK == 1 @@ -560,9 +560,17 @@ unsigned int hypertransport_scan_chain(struct bus *bus, * * @return The maximum bus number found, after scanning all subordinate busses */ +unsigned int hypertransport_scan_chain_x(struct bus *bus, + unsigned min_devfn, unsigned max_devfn, unsigned int max) +{ + unsigned ht_unitid_base[4]; + unsigned offset_unitid = 1; + return hypertransport_scan_chain(bus, min_devfn, max_devfn, max, ht_unitid_base, offset_unitid); +} + unsigned int ht_scan_bridge(struct device *dev, unsigned int max) { - return do_pci_scan_bridge(dev, max, hypertransport_scan_chain); + return do_pci_scan_bridge(dev, max, hypertransport_scan_chain_x); } -- cgit v1.2.3