Home
last modified time | relevance | path

Searched refs:divisor (Results 1 – 25 of 220) sorted by relevance

123456789

/linux/arch/arm/lib/
A Dlib1funcs.S48 mov \divisor, \divisor, lsl \result
59 moveq \divisor, \divisor, lsl #3
69 movlo \divisor, \divisor, lsl #4
77 movlo \divisor, \divisor, lsl #1
100 movne \divisor, \divisor, lsr #4
116 movhs \divisor, \divisor, lsr #16
121 movhs \divisor, \divisor, lsr #8
125 movhs \divisor, \divisor, lsr #4
156 movlo \divisor, \divisor, lsl #4
164 movlo \divisor, \divisor, lsl #1
[all …]
/linux/lib/math/
A Ddiv64.c80 if (divisor > 0) in div_s64_rem()
84 if (divisor < 0) in div_s64_rem()
106 u32 high = divisor >> 32; in div64_u64_rem()
121 if (*remainder >= divisor) { in div64_u64_rem()
123 *remainder -= divisor; in div64_u64_rem()
144 u64 div64_u64(u64 dividend, u64 divisor) in div64_u64() argument
146 u32 high = divisor >> 32; in div64_u64()
150 quot = div_u64(dividend, divisor); in div64_u64()
157 if ((dividend - quot * divisor) >= divisor) in div64_u64()
172 s64 div64_s64(s64 dividend, s64 divisor) in div64_s64() argument
[all …]
/linux/include/linux/
A Dmath64.h28 *remainder = dividend % divisor; in div_u64_rem()
29 return dividend / divisor; in div_u64_rem()
42 *remainder = dividend % divisor; in div_s64_rem()
43 return dividend / divisor; in div_s64_rem()
56 *remainder = dividend % divisor; in div64_u64_rem()
57 return dividend / divisor; in div64_u64_rem()
69 return dividend / divisor; in div64_u64()
81 return dividend / divisor; in div64_s64()
275 rl.l.high = do_div(rh.ll, divisor); in mul_u64_u32_div()
278 do_div(rl.ll, divisor); in mul_u64_u32_div()
[all …]
A Dmath.h85 #define DIV_ROUND_CLOSEST(x, divisor)( \ argument
88 typeof(divisor) __d = divisor; \
90 ((typeof(divisor))-1) > 0 || \
100 #define DIV_ROUND_CLOSEST_ULL(x, divisor)( \ argument
102 typeof(divisor) __d = divisor; \
/linux/arch/alpha/lib/
A Ddivide.S56 #define divisor $1 macro
104 bis $25,$25,divisor
109 LONGIFY(divisor)
125 1: cmpult divisor,modulus,compare
126 s8addq divisor,$31,divisor
130 1: cmpult divisor,modulus,compare
131 blt divisor, 2f
132 addq divisor,divisor,divisor
141 cmpule divisor,modulus,compare
142 subq modulus,divisor,tmp1
[all …]
A Dev6-divide.S66 #define divisor $1 macro
114 bis $25,$25,divisor # E :
120 LONGIFY(divisor) # E : U L L U
127 beq divisor, 9f /* div by zero */
145 s8addq divisor,$31,divisor # E :
152 blt divisor, 2f # U : U L U L
154 addq divisor,divisor,divisor # E :
172 cmpule divisor,modulus,compare # E :
173 subq modulus,divisor,tmp1 # E :
178 srl divisor,1,divisor # U :
[all …]
/linux/drivers/cpufreq/
A Dsparc-us2e-cpufreq.c125 if (old_divisor == 2 && divisor == 1) { in us2e_transition()
133 } else if (old_divisor == 1 && divisor > 2) { in us2e_transition()
137 2, divisor); in us2e_transition()
138 } else if (old_divisor > 2 && divisor == 1) { in us2e_transition()
142 2, divisor); in us2e_transition()
143 } else if (old_divisor < divisor) { in us2e_transition()
146 } else if (old_divisor > divisor) { in us2e_transition()
254 divisor = index_to_divisor(*index); in __us2e_freq_target()
255 new_freq /= divisor; in __us2e_freq_target()
261 if (old_divisor != divisor) { in __us2e_freq_target()
[all …]
/linux/lib/mpi/
A Dmpi-div.c22 int divisor_sign = divisor->sign; in mpi_fdiv_r()
29 if (rem == divisor) { in mpi_fdiv_r()
30 temp_divisor = mpi_copy(divisor); in mpi_fdiv_r()
31 divisor = temp_divisor; in mpi_fdiv_r()
34 mpi_tdiv_r(rem, dividend, divisor); in mpi_fdiv_r()
37 mpi_add(rem, rem, divisor); in mpi_fdiv_r()
52 int divisor_sign = divisor->sign; in mpi_fdiv_qr()
55 if (quot == divisor || rem == divisor) { in mpi_fdiv_qr()
56 temp_divisor = mpi_copy(divisor); in mpi_fdiv_qr()
57 divisor = temp_divisor; in mpi_fdiv_qr()
[all …]
/linux/drivers/acpi/acpica/
A Dutmath.c267 if (divisor == 0) { in acpi_ut_short_divide()
316 union uint64_overlay divisor; in acpi_ut_divide() local
334 divisor.full = in_divisor; in acpi_ut_divide()
336 if (divisor.part.hi == 0) { in acpi_ut_divide()
361 normalized_divisor = divisor; in acpi_ut_divide()
384 partial1 = quotient.part.lo * divisor.part.hi; in acpi_ut_divide()
396 remainder.full -= divisor.full; in acpi_ut_divide()
400 remainder.full -= divisor.full; in acpi_ut_divide()
452 if (divisor == 0) { in acpi_ut_short_divide()
460 *out_quotient = in_dividend / divisor; in acpi_ut_short_divide()
[all …]
/linux/drivers/iio/common/hid-sensors/
A Dhid-sensor-attributes.c78 if (divisor == 0) { in simple_div()
82 *whole = dividend/divisor; in simple_div()
83 rem = dividend % divisor; in simple_div()
85 while (rem <= divisor) { in simple_div()
97 *val1 = no / divisor; in split_micro_fraction()
133 int divisor; in convert_to_vtf_format() local
358 int divisor; in adjust_exponent_nano() local
373 x = scale1 / divisor; in adjust_exponent_nano()
386 *val0 = scale0 / divisor; in adjust_exponent_nano()
387 rem = scale0 % divisor; in adjust_exponent_nano()
[all …]
/linux/Documentation/devicetree/bindings/clock/ti/
A Ddivider.txt8 the register is one less than the actual divisor value. E.g:
10 register value actual divisor value
17 ti,index-starts-at-one - valid divisor values start at 1, not the default
19 register value actual divisor value
24 ti,index-power-of-two - valid divisor values are powers of two. E.g:
25 register value actual divisor value
34 Which will map the resulting values to a divisor table by their index:
35 register value actual divisor value
38 2 <invalid divisor, skipped>
65 - ti,min-div : min divisor for dividing the input clock rate, only
[all …]
/linux/arch/h8300/lib/
A Dudivsi3.S31 shlr.l er2 ; make divisor < 2^16
35 shlr.l #2,er2 ; make divisor < 2^16
41 shlr.l #2,er2 ; make divisor < 2^16
56 ;; er1 contains divisor
57 ;; er2 contains shifted divisor
64 mulxu.w r0,er2 ; er2 = upper (AQ - 1) * divisor
68 sub.l er2,er3 ; er3 = dividend - (AQ - 1) * divisor
70 cmp.l er1,er3 ; is divisor < remainder?
/linux/sound/soc/codecs/
A Dtlv320aic26.c70 int fsref, divisor, wlen, pval, jval, dval, qval; in aic26_hw_params() local
79 case 8000: fsref = 48000; divisor = AIC26_DIV_6; break; in aic26_hw_params()
80 case 11025: fsref = 44100; divisor = AIC26_DIV_4; break; in aic26_hw_params()
81 case 12000: fsref = 48000; divisor = AIC26_DIV_4; break; in aic26_hw_params()
82 case 16000: fsref = 48000; divisor = AIC26_DIV_3; break; in aic26_hw_params()
83 case 22050: fsref = 44100; divisor = AIC26_DIV_2; break; in aic26_hw_params()
84 case 24000: fsref = 48000; divisor = AIC26_DIV_2; break; in aic26_hw_params()
85 case 32000: fsref = 48000; divisor = AIC26_DIV_1_5; break; in aic26_hw_params()
86 case 44100: fsref = 44100; divisor = AIC26_DIV_1; break; in aic26_hw_params()
87 case 48000: fsref = 48000; divisor = AIC26_DIV_1; break; in aic26_hw_params()
[all …]
/linux/arch/mips/cavium-octeon/executive/
A Dcvmx-helper-jtag.c50 uint32_t divisor = cvmx_sysinfo_get()->cpu_clock_hz / (25 * 1000000); in cvmx_helper_qlm_jtag_init() local
51 divisor = (divisor - 1) >> 2; in cvmx_helper_qlm_jtag_init()
53 while (divisor) { in cvmx_helper_qlm_jtag_init()
55 divisor = divisor >> 1; in cvmx_helper_qlm_jtag_init()
/linux/drivers/clk/
A Dclk-vt8500.c135 u32 divisor; in vt8500_dclk_round_rate() local
140 divisor = *prate / rate; in vt8500_dclk_round_rate()
143 if (rate * divisor < *prate) in vt8500_dclk_round_rate()
144 divisor++; in vt8500_dclk_round_rate()
151 divisor = 64 * ((divisor / 64) + 1); in vt8500_dclk_round_rate()
154 return *prate / divisor; in vt8500_dclk_round_rate()
161 u32 divisor; in vt8500_dclk_set_rate() local
167 divisor = parent_rate / rate; in vt8500_dclk_set_rate()
170 divisor = 0; in vt8500_dclk_set_rate()
178 divisor = 0x20 + (divisor / 64); in vt8500_dclk_set_rate()
[all …]
/linux/arch/x86/include/asm/
A Ddiv64.h43 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in div_u64_rem() argument
53 if (upper >= divisor) { in div_u64_rem()
54 d.v32[1] = upper / divisor; in div_u64_rem()
55 upper %= divisor; in div_u64_rem()
58 "rm" (divisor), "0" (d.v32[0]), "1" (upper)); in div_u64_rem()
/linux/arch/x86/kernel/
A Dearly_printk.c130 static __init void early_serial_hw_init(unsigned divisor) in early_serial_hw_init() argument
141 serial_out(early_serial_base, DLL, divisor & 0xff); in early_serial_hw_init()
142 serial_out(early_serial_base, DLH, (divisor >> 8) & 0xff); in early_serial_hw_init()
150 unsigned divisor; in early_serial_init() local
184 divisor = 115200 / baud; in early_serial_init()
191 early_serial_hw_init(divisor); in early_serial_init()
219 unsigned divisor; in early_pci_serial_init() local
313 divisor = 115200 / baud; in early_pci_serial_init()
316 early_serial_hw_init(divisor); in early_pci_serial_init()
/linux/drivers/comedi/drivers/
A Dcomedi_8254.c341 i8254->divisor = i8254->next_div & 0xffff; in comedi_8254_update_divisors()
441 unsigned int divisor; in comedi_8254_ns_to_timer() local
446 divisor = DIV_ROUND_CLOSEST(*nanosec, i8254->osc_base); in comedi_8254_ns_to_timer()
449 divisor = DIV_ROUND_UP(*nanosec, i8254->osc_base); in comedi_8254_ns_to_timer()
452 divisor = *nanosec / i8254->osc_base; in comedi_8254_ns_to_timer()
455 if (divisor < 2) in comedi_8254_ns_to_timer()
456 divisor = 2; in comedi_8254_ns_to_timer()
457 if (divisor > I8254_MAX_COUNT) in comedi_8254_ns_to_timer()
458 divisor = I8254_MAX_COUNT; in comedi_8254_ns_to_timer()
460 *nanosec = divisor * i8254->osc_base; in comedi_8254_ns_to_timer()
[all …]
A Daddi_apci_3120.c276 unsigned int divisor; in apci3120_ns_to_timer() local
293 if (divisor > 0x00ffffff) in apci3120_ns_to_timer()
294 divisor = 0x00ffffff; in apci3120_ns_to_timer()
297 if (divisor > 0xffff) in apci3120_ns_to_timer()
298 divisor = 0xffff; in apci3120_ns_to_timer()
301 if (divisor < 2) in apci3120_ns_to_timer()
302 divisor = 2; in apci3120_ns_to_timer()
304 return divisor; in apci3120_ns_to_timer()
541 unsigned int divisor; in apci3120_ai_cmd() local
709 unsigned int divisor; in apci3120_ai_insn_read() local
[all …]
A Dadv_pci1760.c179 unsigned int divisor; in pci1760_pwm_ns_to_div() local
183 divisor = DIV_ROUND_CLOSEST(ns, PCI1760_PWM_TIMEBASE); in pci1760_pwm_ns_to_div()
186 divisor = DIV_ROUND_UP(ns, PCI1760_PWM_TIMEBASE); in pci1760_pwm_ns_to_div()
189 divisor = ns / PCI1760_PWM_TIMEBASE; in pci1760_pwm_ns_to_div()
195 if (divisor < 1) in pci1760_pwm_ns_to_div()
196 divisor = 1; in pci1760_pwm_ns_to_div()
197 if (divisor > 0xffff) in pci1760_pwm_ns_to_div()
198 divisor = 0xffff; in pci1760_pwm_ns_to_div()
200 return divisor; in pci1760_pwm_ns_to_div()
/linux/arch/powerpc/lib/
A Ddiv64.S22 divwu r7,r5,r4 # if dividend.hi >= divisor,
23 mullw r0,r7,r4 # quotient.hi = dividend.hi / divisor
24 subf. r5,r0,r5 # dividend.hi %= divisor
31 srw r10,r10,r0 # the divisor right the same amount,
41 mulhwu r9,r11,r4 # multiply the estimate by the divisor,
42 subfc r6,r10,r6 # take the product from the divisor,
/linux/drivers/cpuidle/governors/
A Dmenu.c172 int i, divisor; in get_typical_interval() local
184 divisor = 0; in get_typical_interval()
189 divisor++; in get_typical_interval()
205 if (divisor == INTERVALS) in get_typical_interval()
208 avg = div_u64(sum, divisor); in get_typical_interval()
219 if (divisor == INTERVALS) in get_typical_interval()
222 do_div(variance, divisor); in get_typical_interval()
237 if ((((u64)avg*avg > variance*36) && (divisor * 4 >= INTERVALS * 3)) in get_typical_interval()
252 if ((divisor * 4) <= INTERVALS * 3) in get_typical_interval()
/linux/drivers/usb/serial/
A Doti6858.c114 (((a)->divisor == (priv)->pending_setup.divisor) \
181 __le16 divisor; member
228 new_setup->divisor = priv->pending_setup.divisor; in setup_line()
404 __le16 divisor; in oti6858_set_termios() local
410 divisor = priv->pending_setup.divisor; in oti6858_set_termios()
439 divisor = 0; in oti6858_set_termios()
447 divisor = cpu_to_le16(new_divisor); in oti6858_set_termios()
489 if (divisor != priv->pending_setup.divisor in oti6858_set_termios()
492 priv->pending_setup.divisor = divisor; in oti6858_set_termios()
522 buf->divisor = cpu_to_le16(0x009c); /* 38400 bps */ in oti6858_open()
[all …]
/linux/arch/x86/boot/
A Dstring.c201 static inline u64 __div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) in __div_u64_rem() argument
211 if (upper >= divisor) { in __div_u64_rem()
212 d.v32[1] = upper / divisor; in __div_u64_rem()
213 upper %= divisor; in __div_u64_rem()
216 "rm" (divisor), "0" (d.v32[0]), "1" (upper)); in __div_u64_rem()
220 static inline u64 __div_u64(u64 dividend, u32 divisor) in __div_u64() argument
224 return __div_u64_rem(dividend, divisor, &remainder); in __div_u64()
/linux/Documentation/devicetree/bindings/clock/
A Dvt8500.txt44 - divisor-reg : shall be the register offset from PMC base for the divisor
47 - divisor-mask : shall be the mask for the divisor register. Defaults to 0x1f
70 divisor-reg = <0x328>;
71 divisor-mask = <0x3f>;

Completed in 42 milliseconds

123456789