aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/tb.h
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2019-01-08 18:55:09 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2019-04-18 11:18:51 +0300
commit8b0110d9d10d211fc8a0e2cbb2db4533af30d36e (patch)
tree7a105d555bee929a43ef65d16374d378a3d72b6a /drivers/thunderbolt/tb.h
parentthunderbolt: Do not allocate switch if depth is greater than 6 (diff)
downloadlinux-dev-8b0110d9d10d211fc8a0e2cbb2db4533af30d36e.tar.xz
linux-dev-8b0110d9d10d211fc8a0e2cbb2db4533af30d36e.zip
thunderbolt: Enable TMU access when accessing port space on legacy devices
Light Ridge and Eagle Ridge both need to have TMU access enabled before port space can be fully accessed so make sure it happens on those. This allows us to get rid of the offset quirk in tb_port_find_cap(). Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tb.h')
-rw-r--r--drivers/thunderbolt/tb.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index 93c1ea21feeb..a166265dfcf9 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -436,6 +436,16 @@ static inline struct tb_switch *tb_to_switch(struct device *dev)
return NULL;
}
+static inline bool tb_switch_is_lr(const struct tb_switch *sw)
+{
+ return sw->config.device_id == PCI_DEVICE_ID_INTEL_LIGHT_RIDGE;
+}
+
+static inline bool tb_switch_is_er(const struct tb_switch *sw)
+{
+ return sw->config.device_id == PCI_DEVICE_ID_INTEL_EAGLE_RIDGE;
+}
+
int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged);
int tb_port_add_nfc_credits(struct tb_port *port, int credits);
int tb_port_clear_counter(struct tb_port *port, int counter);