Lines Matching defs:div
50 static void calc_dividers(u32 div, u32 *pre, u32 *post, u32 maxpost)
54 min_pre = (div - 1) / maxpost + 1;
58 if (div > (temp_pre * maxpost))
61 if (div < (temp_pre * temp_pre))
64 err = div % temp_pre;
79 *post = (div + *pre - 1) / *pre;
83 static void calc_dividers_3_6(u32 div, u32 *pre, u32 *post)
85 if (div >= 512) {
88 } else if (div >= 64) {
89 calc_dividers(div, pre, post, 64);
90 } else if (div <= 8) {
91 *pre = div;
95 *post = div;
100 static void calc_dividers_3_3(u32 div, u32 *pre, u32 *post)
102 if (div >= 64) {
104 } else if (div > 8) {
105 calc_dividers(div, pre, post, 8);
108 *post = div;
183 unsigned long div = ((pdr4 >> 10) & 0x3f) + 1;
186 return get_rate_arm() / div;
188 return get_rate_ppll() / div;
194 unsigned long div, rate;
204 div = pdr3 & 0x3f;
207 div = (pdr3 >> 8) & 0x3f;
210 div = (pdr3 >> 16) & 0x3f;
214 return rate / (div + 1);
288 unsigned long div;
291 div = (pdr4 >> 16) & 0x3f;
292 return get_rate_arm() / (div + 1);
294 div = (pdr0 >> 12) & 0x7;
295 return get_rate_ahb(NULL) / (div + 1);