summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-11-20 23:52:21 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-22 10:41:10 +0000
commiteb2e0b56ee4646655c485bf8c71587fd362194f7 (patch)
treeeb56e3283523c67c9e7bf16b76c632851fd3fe8b
parent07b402b3b9a54551201c66c0c9d7d6e393d57a74 (diff)
device/hypertransport: Drop unused code
Change-Id: I6a8b176fa6f8832f6f7bb37118861d530fdefd5e Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37066 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/device/hypertransport.c43
-rw-r--r--src/include/device/hypertransport.h10
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