Lines Matching +full:bi +full:- +full:directional

1 // SPDX-License-Identifier: GPL-2.0
18 switch (sw->tmu.rate) { in tb_switch_tmu_mode_name()
26 if (sw->tmu.unidirectional) in tb_switch_tmu_mode_name()
27 return "uni-directional, HiFi"; in tb_switch_tmu_mode_name()
28 return "bi-directional, HiFi"; in tb_switch_tmu_mode_name()
33 return "uni-directional, normal"; in tb_switch_tmu_mode_name()
46 sw->tmu.cap + TMU_RTR_CS_0, 1); in tb_switch_tmu_ucap_supported()
59 sw->tmu.cap + TMU_RTR_CS_3, 1); in tb_switch_tmu_rate_read()
73 sw->tmu.cap + TMU_RTR_CS_3, 1); in tb_switch_tmu_rate_write()
81 sw->tmu.cap + TMU_RTR_CS_3, 1); in tb_switch_tmu_rate_write()
90 ret = tb_port_read(port, &data, TB_CFG_PORT, port->cap_tmu + offset, 1); in tb_port_tmu_write()
98 port->cap_tmu + offset, 1); in tb_port_tmu_write()
106 if (!port->sw->tmu.has_ucap) in tb_port_tmu_set_unidirectional()
124 port->cap_tmu + TMU_ADP_CS_3, 1); in tb_port_tmu_is_unidirectional()
137 sw->tmu.cap + TMU_RTR_CS_0, 1); in tb_switch_tmu_set_time_disruption()
147 sw->tmu.cap + TMU_RTR_CS_0, 1); in tb_switch_tmu_set_time_disruption()
151 * tb_switch_tmu_init() - Initialize switch TMU structures
168 sw->tmu.cap = ret; in tb_switch_tmu_init()
175 port->cap_tmu = cap; in tb_switch_tmu_init()
182 sw->tmu.rate = ret; in tb_switch_tmu_init()
184 sw->tmu.has_ucap = tb_switch_tmu_ucap_supported(sw); in tb_switch_tmu_init()
185 if (sw->tmu.has_ucap) { in tb_switch_tmu_init()
186 tb_sw_dbg(sw, "TMU: supports uni-directional mode\n"); in tb_switch_tmu_init()
191 sw->tmu.unidirectional = in tb_switch_tmu_init()
195 sw->tmu.unidirectional = false; in tb_switch_tmu_init()
203 * tb_switch_tmu_post_time() - Update switch local time
211 struct tb_switch *root_switch = sw->tb->root_switch; in tb_switch_tmu_post_time()
223 if (!root_switch->tmu.cap) in tb_switch_tmu_post_time()
227 root_switch->tmu.cap + TMU_RTR_CS_1, in tb_switch_tmu_post_time()
248 post_local_time_offset = sw->tmu.cap + TMU_RTR_CS_22; in tb_switch_tmu_post_time()
249 post_time_offset = sw->tmu.cap + TMU_RTR_CS_24; in tb_switch_tmu_post_time()
278 } while (--retries && post_time); in tb_switch_tmu_post_time()
281 ret = -ETIMEDOUT; in tb_switch_tmu_post_time()
293 * tb_switch_tmu_disable() - Disable TMU of a switch
306 if (sw->tmu.rate == TB_SWITCH_TMU_RATE_OFF) in tb_switch_tmu_disable()
309 if (sw->tmu.unidirectional) { in tb_switch_tmu_disable()
325 sw->tmu.unidirectional = false; in tb_switch_tmu_disable()
326 sw->tmu.rate = TB_SWITCH_TMU_RATE_OFF; in tb_switch_tmu_disable()
333 * tb_switch_tmu_enable() - Enable TMU on a switch
336 * Enables TMU of a switch to be in bi-directional, HiFi mode. In this mode
353 /* Change mode to bi-directional */ in tb_switch_tmu_enable()
354 if (tb_route(sw) && sw->tmu.unidirectional) { in tb_switch_tmu_enable()
378 sw->tmu.unidirectional = false; in tb_switch_tmu_enable()
379 sw->tmu.rate = TB_SWITCH_TMU_RATE_HIFI; in tb_switch_tmu_enable()