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>
This commit is contained in:
Arthur Heymans
2019-11-20 23:52:21 +01:00
committed by Patrick Georgi
parent 07b402b3b9
commit eb2e0b56ee
2 changed files with 1 additions and 52 deletions

View File

@@ -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,

View File

@@ -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