diff options
-rw-r--r-- | src/device/hypertransport.c | 43 | ||||
-rw-r--r-- | src/include/device/hypertransport.h | 10 |
2 files changed, 1 insertions, 52 deletions
diff --git a/src/device/hypertransport.c b/src/device/hypertransport.c index 03e3375b91..afa94fbe78 100644 --- a/src/device/hypertransport.c +++ b/src/device/hypertransport.c @@ -466,30 +466,6 @@ end_of_chain: return next_unitid; } -unsigned int hypertransport_scan_chain(struct bus *bus) -{ - int i; - unsigned int max_devfn; - u32 ht_unitid_base[4]; - - for (i = 0; i < 4; i++) - ht_unitid_base[i] = 0x20; - - if (bus->secondary == 0) - max_devfn = (CONFIG_CDB << 3) - 1; - else - max_devfn = (0x20 << 3) - 1; - - unsigned int next_unitid = do_hypertransport_scan_chain(bus, 0, max_devfn, - ht_unitid_base, offset_unit_id(bus->secondary == 0)); - - bus->hcdn_reg = 0; - for (i = 0; i < 4; i++) - bus->hcdn_reg |= (ht_unitid_base[i] & 0xff) << (i*8); - - return next_unitid; -} - /** * Scan a PCI bridge and the buses behind the bridge. * @@ -515,28 +491,11 @@ static void hypertransport_scan_chain_x(struct bus *bus, pci_scan_bus(bus, 0x00, ((next_unitid - 1) << 3) | 7); } -void ht_scan_bridge(struct device *dev) +static void ht_scan_bridge(struct device *dev) { do_pci_scan_bridge(dev, hypertransport_scan_chain_x); } -bool ht_is_non_coherent_link(struct bus *link) -{ - u32 link_type; - do { - link_type = pci_read_config32(link->dev, link->cap + 0x18); - } while (link_type & ConnectionPending); - - if (!(link_type & LinkConnected)) - return false; - - do { - link_type = pci_read_config32(link->dev, link->cap + 0x18); - } while (!(link_type & InitComplete)); - - return !!(link_type & NonCoherent); -} - /** Default device operations for hypertransport bridges */ static struct pci_operations ht_bus_ops_pci = { .set_subsystem = 0, diff --git a/src/include/device/hypertransport.h b/src/include/device/hypertransport.h index bc8ccd48a4..382731fe86 100644 --- a/src/include/device/hypertransport.h +++ b/src/include/device/hypertransport.h @@ -3,16 +3,6 @@ #include <device/hypertransport_def.h> -/* TODO: Check HT specs for better names for these. */ -#define LinkConnected (1 << 0) -#define InitComplete (1 << 1) -#define NonCoherent (1 << 2) -#define ConnectionPending (1 << 4) -bool ht_is_non_coherent_link(struct bus *link); - -unsigned int hypertransport_scan_chain(struct bus *bus); -void ht_scan_bridge(struct device *dev); - extern struct device_operations default_ht_ops_bus; #define HT_IO_HOST_ALIGN 4096 |