Lines Matching refs:estar
116 static void us2e_transition(unsigned long estar, unsigned long new_bits, in us2e_transition() argument
120 estar &= ~ESTAR_MODE_DIV_MASK; in us2e_transition()
125 write_hbreg(HBIRD_ESTAR_MODE_ADDR, estar | new_bits); in us2e_transition()
129 write_hbreg(HBIRD_ESTAR_MODE_ADDR, estar | new_bits); in us2e_transition()
132 us2e_transition(estar, ESTAR_MODE_DIV_2, clock_tick, in us2e_transition()
134 us2e_transition(estar, new_bits, clock_tick, in us2e_transition()
137 us2e_transition(estar, ESTAR_MODE_DIV_2, clock_tick, in us2e_transition()
139 us2e_transition(estar, new_bits, clock_tick, in us2e_transition()
143 write_hbreg(HBIRD_ESTAR_MODE_ADDR, estar | new_bits); in us2e_transition()
145 write_hbreg(HBIRD_ESTAR_MODE_ADDR, estar | new_bits); in us2e_transition()
198 static unsigned long estar_to_divisor(unsigned long estar) in estar_to_divisor() argument
202 switch (estar & ESTAR_MODE_DIV_MASK) { in estar_to_divisor()
227 unsigned long *estar = arg; in __us2e_freq_get() local
229 *estar = read_hbreg(HBIRD_ESTAR_MODE_ADDR); in __us2e_freq_get()
234 unsigned long clock_tick, estar; in us2e_freq_get() local
237 if (smp_call_function_single(cpu, __us2e_freq_get, &estar, 1)) in us2e_freq_get()
240 return clock_tick / estar_to_divisor(estar); in us2e_freq_get()
248 unsigned long clock_tick, divisor, old_divisor, estar; in __us2e_freq_target() local
255 estar = read_hbreg(HBIRD_ESTAR_MODE_ADDR); in __us2e_freq_target()
257 old_divisor = estar_to_divisor(estar); in __us2e_freq_target()
260 us2e_transition(estar, new_bits, clock_tick * 1000, in __us2e_freq_target()