summaryrefslogtreecommitdiff
path: root/src/device/hypertransport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/hypertransport.c')
-rw-r--r--src/device/hypertransport.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/device/hypertransport.c b/src/device/hypertransport.c
index 584ac78457..5aea5e62c4 100644
--- a/src/device/hypertransport.c
+++ b/src/device/hypertransport.c
@@ -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,