4 #include <variant/hardware.h>
7 void platform_calibrate_ccount(void)
9 u32 uninitialized_var(a);
10 u32 uninitialized_var(u);
12 u32 tstamp = S6_REG_GREG1 + S6_GREG1_GLOBAL_TIMER;
19 : "=&a"(u) : "a"(t), "a"(tstamp));
20 b = xtensa_get_ccount();
25 nsec_per_ccount = (LOOPS * 10000) / b;
26 ccount_per_jiffy = b * (100000UL / (LOOPS * HZ));