Lines Matching +full:clock +full:- +full:mult
1 /* SPDX-License-Identifier: GPL-2.0 */
36 * struct clocksource - hardware abstraction for a free running counter
37 * Provides mostly state-free accessors to the underlying hardware.
43 * @mult: Cycle to nanosecond multiplier
46 * @maxadj: Maximum adjustment value to mult (~11%)
49 * @archdata: Optional arch-specific data
59 * 1-99: Unfit for real use
61 * 100-199: Base level usability.
63 * 200-299: Good.
65 * 300-399: Desired.
67 * 400-499: Perfect
68 * The ideal clocksource. A must-use where
75 * @base: Hardware abstraction for clock on which a clocksource
103 u32 mult; member
139 * Clock source flags bits::
151 #define CLOCKSOURCE_MASK(bits) GENMASK_ULL((bits) - 1, 0)
156 * mult/2^shift = ns/cyc in clocksource_freq2mult()
157 * mult = ns/cyc * 2^shift in clocksource_freq2mult()
158 * mult = from/freq * 2^shift in clocksource_freq2mult()
159 * mult = from * 2^shift / freq in clocksource_freq2mult()
160 * mult = (from<<shift) / freq in clocksource_freq2mult()
171 * clocksource_khz2mult - calculates mult from khz and shift
184 * clocksource_hz2mult - calculates mult from hz and shift
198 * clocksource_cyc2ns - converts clocksource cycles to nanoseconds
200 * @mult: cycle to nanosecond multiplier
203 * Converts clocksource cycles to nanoseconds, using the given @mult and @shift.
208 * XXX - This could use some mult_lxl_ll() asm optimization
210 static inline s64 clocksource_cyc2ns(u64 cycles, u32 mult, u32 shift) in clocksource_cyc2ns() argument
212 return ((u64) cycles * mult) >> shift; in clocksource_cyc2ns()
228 clocks_calc_max_nsecs(u32 mult, u32 shift, u32 maxadj, u64 mask, u64 *max_cycles);
230 clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
276 extern int timekeeping_notify(struct clocksource *clock);
316 * struct clocksource_base - hardware abstraction for clock on which a clocksource
323 * @freq_khz: Nominal frequency of the base clock in kHz
324 * @offset: Offset between the base clock and the clocksource
325 * @numerator: Numerator of the clock ratio between base clock and the clocksource
326 * @denominator: Denominator of the clock ratio between base clock and the clocksource