Home
last modified time | relevance | path

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

1234

/drivers/acpi/acpica/
Dutmath.c91 u32 divisor, u64 *out_quotient, u32 *out_remainder) in acpi_ut_short_divide() argument
101 if (divisor == 0) { in acpi_ut_short_divide()
112 ACPI_DIV_64_BY_32(0, dividend_ovl.part.hi, divisor, in acpi_ut_short_divide()
114 ACPI_DIV_64_BY_32(remainder32, dividend_ovl.part.lo, divisor, in acpi_ut_short_divide()
149 union uint64_overlay divisor; in acpi_ut_divide() local
167 divisor.full = in_divisor; in acpi_ut_divide()
169 if (divisor.part.hi == 0) { in acpi_ut_divide()
180 ACPI_DIV_64_BY_32(0, dividend.part.hi, divisor.part.lo, in acpi_ut_divide()
182 ACPI_DIV_64_BY_32(partial1, dividend.part.lo, divisor.part.lo, in acpi_ut_divide()
193 normalized_divisor = divisor; in acpi_ut_divide()
[all …]
/drivers/cpufreq/
Dsparc-us2e-cpufreq.c87 unsigned long old_divisor, unsigned long divisor) in frob_mem_refresh() argument
92 refr_count /= (MCTRL0_REFR_CLKS_P_CNT * divisor * 1000000000UL); in frob_mem_refresh()
119 unsigned long old_divisor, unsigned long divisor) in us2e_transition() argument
128 if (old_divisor == 2 && divisor == 1) { in us2e_transition()
131 frob_mem_refresh(0, clock_tick, old_divisor, divisor); in us2e_transition()
132 } else if (old_divisor == 1 && divisor == 2) { in us2e_transition()
133 frob_mem_refresh(1, clock_tick, old_divisor, divisor); in us2e_transition()
136 } else if (old_divisor == 1 && divisor > 2) { in us2e_transition()
140 2, divisor); in us2e_transition()
141 } else if (old_divisor > 2 && divisor == 1) { in us2e_transition()
[all …]
/drivers/cpuidle/governors/
Dmenu.c199 static u64 div_round64(u64 dividend, u32 divisor) in div_round64() argument
201 return div_u64(dividend + (divisor / 2), divisor); in div_round64()
212 int i, divisor; in get_typical_interval() local
223 divisor = 0; in get_typical_interval()
228 divisor++; in get_typical_interval()
233 if (divisor == INTERVALS) in get_typical_interval()
236 do_div(avg, divisor); in get_typical_interval()
247 if (divisor == INTERVALS) in get_typical_interval()
250 do_div(stddev, divisor); in get_typical_interval()
266 if (((avg > stddev * 6) && (divisor * 4 >= INTERVALS * 3)) in get_typical_interval()
[all …]
/drivers/clk/
Dclk-vt8500.c144 u32 divisor; in vt8500_dclk_round_rate() local
149 divisor = *prate / rate; in vt8500_dclk_round_rate()
152 if (rate * divisor < *prate) in vt8500_dclk_round_rate()
153 divisor++; in vt8500_dclk_round_rate()
159 if ((cdev->div_mask == 0x3F) && (divisor > 31)) { in vt8500_dclk_round_rate()
160 divisor = 64 * ((divisor / 64) + 1); in vt8500_dclk_round_rate()
163 return *prate / divisor; in vt8500_dclk_round_rate()
170 u32 divisor; in vt8500_dclk_set_rate() local
176 divisor = parent_rate / rate; in vt8500_dclk_set_rate()
178 if (divisor == cdev->div_mask + 1) in vt8500_dclk_set_rate()
[all …]
/drivers/usb/serial/
Doti6858.c79 __le16 divisor; /* baud rate = 96000000 / (16 * divisor), LE */ member
117 (((a)->divisor == (priv)->pending_setup.divisor) \
181 __le16 divisor; member
228 new_setup->divisor = priv->pending_setup.divisor; in setup_line()
409 __le16 divisor; in oti6858_set_termios() local
415 divisor = priv->pending_setup.divisor; in oti6858_set_termios()
444 divisor = 0; in oti6858_set_termios()
452 divisor = cpu_to_le16(new_divisor); in oti6858_set_termios()
494 if (divisor != priv->pending_setup.divisor in oti6858_set_termios()
497 priv->pending_setup.divisor = divisor; in oti6858_set_termios()
[all …]
Dftdi_sio.c1113 unsigned short int divisor; in ftdi_232am_baud_base_to_divisor() local
1118 divisor = divisor3 >> 3; in ftdi_232am_baud_base_to_divisor()
1121 divisor |= 0xc000; in ftdi_232am_baud_base_to_divisor()
1123 divisor |= 0x4000; in ftdi_232am_baud_base_to_divisor()
1125 divisor |= 0x8000; in ftdi_232am_baud_base_to_divisor()
1126 else if (divisor == 1) in ftdi_232am_baud_base_to_divisor()
1127 divisor = 0; /* special case for maximum baud rate */ in ftdi_232am_baud_base_to_divisor()
1128 return divisor; in ftdi_232am_baud_base_to_divisor()
1139 __u32 divisor; in ftdi_232bm_baud_base_to_divisor() local
1142 divisor = divisor3 >> 3; in ftdi_232bm_baud_base_to_divisor()
[all …]
Dch341.c124 short divisor; in ch341_set_baudrate() local
129 divisor = CH341_BAUDBASE_DIVMAX; in ch341_set_baudrate()
131 while ((factor > 0xfff0) && divisor) { in ch341_set_baudrate()
133 divisor--; in ch341_set_baudrate()
140 a = (factor & 0xff00) | divisor; in ch341_set_baudrate()
/drivers/mfd/
Dmcp-sa11x0.c48 mcp_sa11x0_set_telecom_divisor(struct mcp *mcp, unsigned int divisor) in mcp_sa11x0_set_telecom_divisor() argument
52 divisor /= 32; in mcp_sa11x0_set_telecom_divisor()
55 m->mccr0 |= divisor << 8; in mcp_sa11x0_set_telecom_divisor()
60 mcp_sa11x0_set_audio_divisor(struct mcp *mcp, unsigned int divisor) in mcp_sa11x0_set_audio_divisor() argument
64 divisor /= 32; in mcp_sa11x0_set_audio_divisor()
67 m->mccr0 |= divisor; in mcp_sa11x0_set_audio_divisor()
/drivers/iio/common/hid-sensors/
Dhid-sensor-attributes.c73 static void simple_div(int dividend, int divisor, int *whole, in simple_div() argument
80 if (divisor == 0) { in simple_div()
84 *whole = dividend/divisor; in simple_div()
85 rem = dividend % divisor; in simple_div()
87 while (rem <= divisor) { in simple_div()
91 *micro_frac = (rem / divisor) * pow_10(6-exp); in simple_div()
/drivers/tty/serial/8250/
D8250_early.c125 unsigned int divisor; in init_port() local
133 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud); in init_port()
136 serial8250_early_out(port, UART_DLL, divisor & 0xff); in init_port()
137 serial8250_early_out(port, UART_DLM, (divisor >> 8) & 0xff); in init_port()
/drivers/input/serio/
Dambakmi.c35 unsigned int divisor; member
71 unsigned int divisor; in amba_kmi_open() local
78 divisor = clk_get_rate(kmi->clk) / 8000000 - 1; in amba_kmi_open()
79 writeb(divisor, KMICLKDIV); in amba_kmi_open()
/drivers/vlynq/
Dvlynq.c331 vdev->divisor = ids->divisor; in vlynq_device_match()
417 dev->divisor = i; in __vlynq_try_remote()
454 dev->divisor = i; in __vlynq_try_local()
487 dev->divisor = vlynq_div_external; in __vlynq_try_external()
503 switch (dev->divisor) { in __vlynq_enable_device()
532 VLYNQ_CTRL_CLOCK_DIV(dev->divisor - in __vlynq_enable_device()
539 dev->divisor - vlynq_ldiv1 + 1); in __vlynq_enable_device()
553 VLYNQ_CTRL_CLOCK_DIV(dev->divisor - in __vlynq_enable_device()
559 dev->divisor - vlynq_rdiv1 + 1); in __vlynq_enable_device()
739 dev->divisor = vlynq_div_auto; in vlynq_probe()
/drivers/w1/masters/
Dds1wm.c67 unsigned long divisor; member
250 return freq[i].divisor; in ds1wm_find_divisor()
257 int divisor; in ds1wm_up() local
264 divisor = ds1wm_find_divisor(plat->clock_rate); in ds1wm_up()
266 divisor, plat->clock_rate); in ds1wm_up()
267 if (divisor == 0) { in ds1wm_up()
272 ds1wm_write_register(ds1wm_data, DS1WM_CLKDIV, divisor); in ds1wm_up()
/drivers/power/reset/
Dqnap-poweroff.c60 const unsigned divisor = ((tclk + (8 * cfg->baud)) / (16 * cfg->baud)); in qnap_power_off() local
66 writel(divisor & 0xff, UART1_REG(DLL)); in qnap_power_off()
67 writel((divisor >> 8) & 0xff, UART1_REG(DLM)); in qnap_power_off()
/drivers/media/tuners/
Dmax2165.c164 static int fixpt_div32(u32 dividend, u32 divisor, u32 *quotient, u32 *fraction) in fixpt_div32() argument
170 if (0 == divisor) in fixpt_div32()
173 q = dividend / divisor; in fixpt_div32()
174 remainder = dividend - q * divisor; in fixpt_div32()
178 if (remainder >= divisor) { in fixpt_div32()
180 remainder -= divisor; in fixpt_div32()
/drivers/tty/serial/
Dmpc52xx_uart.c130 u16 prescaler, unsigned int divisor) in mpc52xx_set_divisor() argument
134 out_8(&psc->ctur, divisor >> 8); in mpc52xx_set_divisor()
135 out_8(&psc->ctlr, divisor & 0xff); in mpc52xx_set_divisor()
297 unsigned int divisor; in mpc5200_psc_set_baudrate() local
303 divisor = (port->uartclk + 16 * baud) / (32 * baud); in mpc5200_psc_set_baudrate()
306 mpc52xx_set_divisor(PSC(port), 0xdd00, divisor); in mpc5200_psc_set_baudrate()
315 unsigned int divisor; in mpc5200b_psc_set_baudrate() local
323 divisor = (port->uartclk + 2 * baud) / (4 * baud); in mpc5200b_psc_set_baudrate()
327 if (divisor > 0xffff || baud <= 115200) { in mpc5200b_psc_set_baudrate()
328 divisor = (divisor + 4) / 8; in mpc5200b_psc_set_baudrate()
[all …]
Dtilegx.c455 UART_DIVISOR_t divisor; in tilegx_set_termios() local
475 divisor.word = gxio_uart_read(context, UART_DIVISOR); in tilegx_set_termios()
480 divisor.divisor = uart_get_divisor(port, baud); in tilegx_set_termios()
510 gxio_uart_write(context, UART_DIVISOR, divisor.word); in tilegx_set_termios()
/drivers/watchdog/
Ds3c2410_wdt.c309 unsigned int divisor = 1; in s3c2410wdt_set_heartbeat() local
327 divisor = DIV_ROUND_UP(count, 0xffff); in s3c2410wdt_set_heartbeat()
329 if (divisor > 0x100) { in s3c2410wdt_set_heartbeat()
336 __func__, timeout, divisor, count, DIV_ROUND_UP(count, divisor)); in s3c2410wdt_set_heartbeat()
338 count = DIV_ROUND_UP(count, divisor); in s3c2410wdt_set_heartbeat()
344 wtcon |= S3C2410_WTCON_PRESCALE(divisor-1); in s3c2410wdt_set_heartbeat()
349 wdd->timeout = (count * divisor) / freq; in s3c2410wdt_set_heartbeat()
/drivers/ssb/
Ddriver_chipcommon.c154 int divisor = 1; in chipco_pctl_clockfreqlimit() local
161 divisor = 64; in chipco_pctl_clockfreqlimit()
164 divisor = 32; in chipco_pctl_clockfreqlimit()
176 divisor = (tmp >> 16) + 1; in chipco_pctl_clockfreqlimit()
177 divisor *= 4; in chipco_pctl_clockfreqlimit()
182 divisor = (tmp >> 16) + 1; in chipco_pctl_clockfreqlimit()
183 divisor *= 4; in chipco_pctl_clockfreqlimit()
206 limit /= divisor; in chipco_pctl_clockfreqlimit()
/drivers/video/fbdev/via/
Dvia_clock.h42 u8 divisor; member
65 return ref_freq / pll.divisor * pll.multiplier; in get_pll_internal_frequency()
Dvia_clock.c40 | pll.divisor; in cle266_encode_pll()
45 return ((pll.divisor - 2) << 16) in k800_encode_pll()
52 return (pll.divisor << 16) in vx855_encode_pll()
/drivers/clocksource/
Dtcb_clksrc.c295 unsigned divisor = atmel_tc_divisors[i]; in tcb_clksrc_init() local
299 if (!divisor) { in tcb_clksrc_init()
304 tmp = rate / divisor; in tcb_clksrc_init()
305 pr_debug("TC: %u / %-3u [%d] --> %u\n", rate, divisor, i, tmp); in tcb_clksrc_init()
/drivers/i2c/busses/
Di2c-axxia.c133 u32 divisor = clk_get_rate(idev->i2c_clk) / idev->bus_clk_rate; in axxia_i2c_init() local
142 idev->bus_clk_rate, clk_mhz, divisor); in axxia_i2c_init()
159 t_high = divisor * 1 / 2; in axxia_i2c_init()
160 t_low = divisor * 1 / 2; in axxia_i2c_init()
164 t_high = divisor * 1 / 3; in axxia_i2c_init()
165 t_low = divisor * 2 / 3; in axxia_i2c_init()
/drivers/staging/media/omap24xx/
Domap24xxcam.c130 u32 divisor = CAM_MCLK / xclk; in omap24xxcam_core_xclk_set() local
132 if (divisor == 1) in omap24xxcam_core_xclk_set()
138 CC_CTRL_XCLK, divisor); in omap24xxcam_core_xclk_set()
835 u32 divisor; in omap24xxcam_sensor_if_enable() local
843 divisor = CAM_MCLK / xclk; in omap24xxcam_sensor_if_enable()
844 if (divisor * xclk < CAM_MCLK) in omap24xxcam_sensor_if_enable()
845 divisor++; in omap24xxcam_sensor_if_enable()
846 if (CAM_MCLK / divisor < p.u.bt656.clock_min in omap24xxcam_sensor_if_enable()
847 && divisor > 1) in omap24xxcam_sensor_if_enable()
848 divisor--; in omap24xxcam_sensor_if_enable()
[all …]
/drivers/media/usb/gspca/
Dcpia1.c297 u8 divisor; member
671 params->sensorFps.divisor = 1; in reset_camera_params()
679 [params->sensorFps.divisor]; in reset_camera_params()
953 sd->params.sensorFps.divisor, in command_setsensorfps()
1286 sd->params.sensorFps.divisor < 2) { in monitor_exposure()
1289 ++sd->params.sensorFps.divisor; in monitor_exposure()
1295 [sd->params.sensorFps.divisor]; in monitor_exposure()
1311 sd->params.sensorFps.divisor > 0) { in monitor_exposure()
1316 --sd->params.sensorFps.divisor; in monitor_exposure()
1322 [sd->params.sensorFps.divisor]; in monitor_exposure()
[all …]

1234