summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/tmu.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2022-10-10 18:52:24 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2023-06-09 12:07:23 +0300
commitbdc6660e553ae74b2bf2689b69ee0b28d383c63f (patch)
tree738cb8205c58c3e146cc288cb12eebc75f48b676 /drivers/thunderbolt/tmu.c
parent9650de737992cad35f48e19d7004a0ad2673dae1 (diff)
downloadlinux-bdc6660e553ae74b2bf2689b69ee0b28d383c63f.tar.gz
linux-bdc6660e553ae74b2bf2689b69ee0b28d383c63f.tar.bz2
linux-bdc6660e553ae74b2bf2689b69ee0b28d383c63f.zip
thunderbolt: Do not call CLx functions from TMU code
There is really no need to call any of the CLx functions in the TMU code so remove all these checks. This makes the TMU enable/disable flows easier to follow as well. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tmu.c')
-rw-r--r--drivers/thunderbolt/tmu.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/thunderbolt/tmu.c b/drivers/thunderbolt/tmu.c
index 6988704c845c..7d06bacf24ff 100644
--- a/drivers/thunderbolt/tmu.c
+++ b/drivers/thunderbolt/tmu.c
@@ -383,14 +383,6 @@ out:
*/
int tb_switch_tmu_disable(struct tb_switch *sw)
{
- /*
- * No need to disable TMU on devices that don't support CLx since
- * on these devices e.g. Alpine Ridge and earlier, the TMU mode
- * HiFi bi-directional is enabled by default and we don't change it.
- */
- if (!tb_switch_clx_is_supported(sw))
- return 0;
-
/* Already disabled? */
if (sw->tmu.rate == TB_SWITCH_TMU_RATE_OFF)
return 0;
@@ -648,25 +640,10 @@ int tb_switch_tmu_enable(struct tb_switch *sw)
bool unidirectional = sw->tmu.unidirectional_request;
int ret;
- /*
- * No need to enable TMU on devices that don't support CLx since on
- * these devices e.g. Alpine Ridge and earlier, the TMU mode HiFi
- * bi-directional is enabled by default.
- */
- if (!tb_switch_clx_is_supported(sw))
- return 0;
-
if (tb_switch_tmu_is_enabled(sw))
return 0;
if (tb_switch_is_titan_ridge(sw) && unidirectional) {
- /*
- * Titan Ridge supports CL0s and CL1 only. CL0s and CL1 are
- * enabled and supported together.
- */
- if (!tb_switch_clx_is_enabled(sw, TB_CL1))
- return -EOPNOTSUPP;
-
ret = tb_switch_tmu_disable_objections(sw);
if (ret)
return ret;