AMD K8 fam10: Refactor HT link connection test
Change-Id: I1e935a6b848a59f7f2e58779bceea599032de9e3 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8562 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com> Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
This commit is contained in:
@@ -507,6 +507,23 @@ 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,
|
||||
|
Reference in New Issue
Block a user