Lines Matching refs:cycles
96 u64 cycles; in berlin_pwm_config() local
98 cycles = clk_get_rate(bpc->clk); in berlin_pwm_config()
99 cycles *= period_ns; in berlin_pwm_config()
100 do_div(cycles, NSEC_PER_SEC); in berlin_pwm_config()
102 if (cycles > BERLIN_PWM_MAX_TCNT) { in berlin_pwm_config()
104 cycles >>= 12; // Prescaled by 4096 in berlin_pwm_config()
106 if (cycles > BERLIN_PWM_MAX_TCNT) in berlin_pwm_config()
110 period = cycles; in berlin_pwm_config()
111 cycles *= duty_ns; in berlin_pwm_config()
112 do_div(cycles, period_ns); in berlin_pwm_config()
113 duty = cycles; in berlin_pwm_config()