10 #include <linux/export.h>
25 static u64 octeon_udelay_factor;
26 static u64 octeon_ndelay_factor;
35 octeon_ndelay_factor = (octeon_udelay_factor * 0x10000ull) / 1000ull;
42 rdiv = rst_boot.
s.c_mul;
43 sdiv = rst_boot.
s.pnr_mul;
44 f = (0x8000000000000000ull / sdiv) * 2;
62 asm(
"" :
"+r" (loops));
72 ipd_clk_count *= rdiv;
74 asm(
"dmultu\t%[cnt],%[f]\n\t"
76 : [
cnt]
"+r" (ipd_clk_count)
92 .name =
"OCTEON_CVMCOUNT",
93 .read = octeon_cvmcount_read,
102 unsigned long long rv;
108 "dmultu\t%[cnt],%[mult]\n\t"
109 "nor\t%[t1],$0,%[shift]\n\t"
112 "dsll\t%[t2],%[t2],1\n\t"
113 "dsrlv\t%[rv],%[t3],%[shift]\n\t"
114 "dsllv\t%[t1],%[t2],%[t1]\n\t"
115 "or\t%[rv],%[t1],%[rv]\n\t"
116 : [rv]
"=&r" (rv), [t1]
"=&r" (t1), [
t2]
"=&r" (
t2), [t3]
"=&r" (t3)
124 clocksource_mips.
rating = 300;
134 inc = us * octeon_udelay_factor;
148 inc = ((ns * octeon_ndelay_factor) >> 16);
185 asm(
"dmultu\t%[cnt],%[f]\n\t"