Lines Matching refs:tmr_ctrl

203 	u32 tmr_ctrl, integral_period;  in netc_timer_get_integral_period()  local
205 tmr_ctrl = netc_timer_rd(priv, NETC_TMR_CTRL); in netc_timer_get_integral_period()
206 integral_period = FIELD_GET(TMR_CTRL_TCLK_PERIOD, tmr_ctrl); in netc_timer_get_integral_period()
528 u32 tmr_ctrl; in netc_timer_enable_extts() local
538 tmr_ctrl = netc_timer_rd(priv, NETC_TMR_CTRL); in netc_timer_enable_extts()
540 tmr_ctrl |= TMR_ETEP(index); in netc_timer_enable_extts()
542 tmr_ctrl &= ~TMR_ETEP(index); in netc_timer_enable_extts()
544 netc_timer_wr(priv, NETC_TMR_CTRL, tmr_ctrl); in netc_timer_enable_extts()
622 u32 tmr_ctrl; in netc_timer_perout_loopback() local
626 tmr_ctrl = netc_timer_rd(priv, NETC_TMR_CTRL); in netc_timer_perout_loopback()
628 tmr_ctrl |= TMR_CTRL_PPL(index); in netc_timer_perout_loopback()
630 tmr_ctrl &= ~TMR_CTRL_PPL(index); in netc_timer_perout_loopback()
632 netc_timer_wr(priv, NETC_TMR_CTRL, tmr_ctrl); in netc_timer_perout_loopback()
643 u32 tmr_ctrl, old_tmr_ctrl; in netc_timer_adjust_period() local
649 tmr_ctrl = u32_replace_bits(old_tmr_ctrl, integral_period, in netc_timer_adjust_period()
651 if (tmr_ctrl != old_tmr_ctrl) { in netc_timer_adjust_period()
653 netc_timer_wr(priv, NETC_TMR_CTRL, tmr_ctrl); in netc_timer_adjust_period()
762 u32 tmr_ctrl, fiper_ctrl; in netc_timer_init() local
771 tmr_ctrl = FIELD_PREP(TMR_CTRL_CK_SEL, priv->clk_select) | in netc_timer_init()
773 netc_timer_wr(priv, NETC_TMR_CTRL, tmr_ctrl); in netc_timer_init()
794 tmr_ctrl |= FIELD_PREP(TMR_CTRL_TCLK_PERIOD, integral_period) | in netc_timer_init()
796 netc_timer_wr(priv, NETC_TMR_CTRL, tmr_ctrl); in netc_timer_init()