Home
last modified time | relevance | path

Searched refs:quot (Results 1 – 25 of 56) sorted by relevance

123

/linux/lib/math/
A Ddiv64.c102 u64 quot; in div64_u64_rem() local
112 if (quot != 0) in div64_u64_rem()
113 quot--; in div64_u64_rem()
117 quot++; in div64_u64_rem()
122 return quot; in div64_u64_rem()
142 u64 quot; in div64_u64() local
150 if (quot != 0) in div64_u64()
151 quot--; in div64_u64()
153 quot++; in div64_u64()
156 return quot; in div64_u64()
[all …]
/linux/lib/crypto/mpi/
A Dmpi-div.c92 if (quot) { in mpi_tdiv_qr()
96 quot->nlimbs = 0; in mpi_tdiv_qr()
97 quot->sign = 0; in mpi_tdiv_qr()
102 if (quot) { in mpi_tdiv_qr()
116 if (quot) { in mpi_tdiv_qr()
117 qp = quot->d; in mpi_tdiv_qr()
120 quot->nlimbs = qsize; in mpi_tdiv_qr()
132 if (quot) { in mpi_tdiv_qr()
133 qp = quot->d; in mpi_tdiv_qr()
199 if (quot) { in mpi_tdiv_qr()
[all …]
/linux/drivers/usb/serial/
A Dark3116.c65 int quot; /* baudrate divisor */ member
164 priv->quot = calc_divisor(9600); in ark3116_port_probe()
199 int quot; in ark3116_set_termios() local
222 quot = calc_divisor(9600); in ark3116_set_termios()
227 quot = calc_divisor(bps); in ark3116_set_termios()
231 quot = calc_divisor(bps); in ark3116_set_termios()
235 quot = calc_divisor(bps); in ark3116_set_termios()
246 __func__, hcr, lcr, quot); in ark3116_set_termios()
255 if (priv->quot != quot) { in ark3116_set_termios()
256 priv->quot = quot; in ark3116_set_termios()
[all …]
/linux/tools/perf/util/
A Dtsc.c20 u64 t, quot, rem; in perf_time_to_tsc() local
23 quot = t / tc->time_mult; in perf_time_to_tsc()
25 return (quot << tc->time_shift) + in perf_time_to_tsc()
31 u64 quot, rem; in tsc_to_perf_time() local
37 quot = cyc >> tc->time_shift; in tsc_to_perf_time()
39 return tc->time_zero + quot * tc->time_mult + in tsc_to_perf_time()
/linux/tools/include/linux/
A Dmath64.h66 u64 quot, rem; in mul_u64_u64_div64() local
68 quot = a / c; in mul_u64_u64_div64()
71 return quot * b + (rem * b) / c; in mul_u64_u64_div64()
/linux/drivers/tty/serial/8250/
A D8250_dwlib.c78 unsigned int quot, rem, base_baud = baud * 16; in dw8250_get_divisor() local
81 quot = p->uartclk / base_baud; in dw8250_get_divisor()
85 return quot; in dw8250_get_divisor()
89 unsigned int quot, unsigned int quot_frac) in dw8250_set_divisor() argument
92 serial8250_do_set_divisor(p, baud, quot); in dw8250_set_divisor()
A D8250_bcm7271.c678 u32 quot; in find_quot() local
685 quot = DIV_ROUND_CLOSEST(rate, baud); in find_quot()
686 if (!quot) in find_quot()
690 hires_rate = div_u64((u64)rate * 10000, (u64)quot); in find_quot()
704 return quot; in find_quot()
712 u32 quot; in set_clock_mux() local
726 if (quot) { in set_clock_mux()
729 best_quot = quot; in set_clock_mux()
737 quot = find_quot(up->dev, freq, baud, &percent); in set_clock_mux()
738 if (!quot) in set_clock_mux()
[all …]
A D8250_port.c1038 unsigned short quot; in autoconfig_16550a() local
1043 quot <<= 3; in autoconfig_16550a()
2532 unsigned int quot; in serial8250_do_get_divisor() local
2567 quot = 0x8001; in serial8250_do_get_divisor()
2569 quot = 0x8002; in serial8250_do_get_divisor()
2577 quot++; in serial8250_do_get_divisor()
2579 return quot; in serial8250_do_get_divisor()
2619 quot = 1; in serial8250_do_set_divisor()
2634 serial_dl_write(up, quot); in serial8250_do_set_divisor()
3428 unsigned int quot; in probe_baud() local
[all …]
A D8250_mtk.c316 unsigned int baud, quot, fraction; in mtk8250_set_termios() local
365 quot = uart_get_divisor(port, baud); in mtk8250_set_termios()
368 quot = DIV_ROUND_UP(port->uartclk, 256 * baud); in mtk8250_set_termios()
384 serial_dl_write(up, quot); in mtk8250_set_termios()
392 tmp = (port->uartclk / (baud * quot)) - 1; in mtk8250_set_termios()
398 fraction = ((port->uartclk * 100) / baud / quot) % 100; in mtk8250_set_termios()
A D8250_pci1xxxx.c227 unsigned int quot; in pci1xxxx_get_divisor() local
238 quot = NSEC_PER_SEC / (baud * uart_sample_cnt); in pci1xxxx_get_divisor()
239 *frac = (NSEC_PER_SEC - quot * baud * uart_sample_cnt) * in pci1xxxx_get_divisor()
242 return quot; in pci1xxxx_get_divisor()
246 unsigned int quot, unsigned int frac) in pci1xxxx_set_divisor() argument
253 writel(FIELD_PREP(BAUD_CLOCK_DIV_INT_MSK, quot) | frac, in pci1xxxx_set_divisor()
/linux/drivers/tty/
A Damiserial.c81 int quot; member
599 quot = info->custom_divisor; in change_speed()
603 quot = (2*baud_base / 269); in change_speed()
605 quot = baud_base / baud; in change_speed()
608 if (!quot && old_termios) { in change_speed()
623 quot = baud_base / baud; in change_speed()
627 if (!quot) in change_speed()
628 quot = baud_base / 9600; in change_speed()
629 info->quot = quot; in change_speed()
683 serper = quot - 1; in change_speed()
[all …]
A Dmxser.c484 unsigned int quot = 0, baud; in mxser_set_baud() local
495 quot = MXSER_BAUD_BASE / newspd; in mxser_set_baud()
496 if (quot == 0) in mxser_set_baud()
497 quot = 1; in mxser_set_baud()
498 baud = MXSER_BAUD_BASE / quot; in mxser_set_baud()
501 quot = 0; in mxser_set_baud()
512 if (quot) { in mxser_set_baud()
531 quot *= 8; in mxser_set_baud()
533 quot /= newspd; in mxser_set_baud()
534 quot++; in mxser_set_baud()
[all …]
/linux/arch/x86/boot/
A Dearly_serial_console.c105 unsigned int quot; in probe_baud() local
112 quot = (dlh << 8) | dll; in probe_baud()
114 return BASE_BAUD / quot; in probe_baud()
/linux/arch/powerpc/platforms/embedded6xx/
A Dls_uart.c62 unsigned int quot = AVR_QUOT(avr_clock); in avr_uart_configure() local
76 out_8(avr_addr + UART_DLL, quot & 0xff); /* LS of divisor */ in avr_uart_configure()
77 out_8(avr_addr + UART_DLM, quot >> 8); /* MS of divisor */ in avr_uart_configure()
/linux/drivers/tty/serial/
A Dserial_txx9.c194 sio_quot_set(struct uart_port *up, int quot) in sio_quot_set() argument
196 quot >>= 1; in sio_quot_set()
197 if (quot < 256) in sio_quot_set()
198 sio_out(up, TXX9_SIBGR, quot | TXX9_SIBGR_BCLK_T0); in sio_quot_set()
199 else if (quot < (256 << 2)) in sio_quot_set()
200 sio_out(up, TXX9_SIBGR, (quot >> 2) | TXX9_SIBGR_BCLK_T2); in sio_quot_set()
201 else if (quot < (256 << 4)) in sio_quot_set()
203 else if (quot < (256 << 6)) in sio_quot_set()
579 unsigned int baud, quot; in serial_txx9_set_termios() local
619 quot = uart_get_divisor(up, baud); in serial_txx9_set_termios()
[all …]
A D21285.c228 unsigned int baud, quot, h_lcr, b; in serial21285_set_termios() local
245 quot = uart_get_divisor(port, baud); in serial21285_set_termios()
246 b = port->uartclk / (16 * quot); in serial21285_set_termios()
304 quot -= 1; in serial21285_set_termios()
307 *CSR_L_UBRLCR = quot & 0xff; in serial21285_set_termios()
308 *CSR_M_UBRLCR = (quot >> 8) & 0x0f; in serial21285_set_termios()
A Dapbuart.c209 unsigned int baud, quot; in apbuart_set_termios() local
217 quot = (uart_get_divisor(port, baud)) * 2; in apbuart_set_termios()
250 quot -= 1; in apbuart_set_termios()
251 UART_PUT_SCAL(port, quot); in apbuart_set_termios()
428 unsigned int quot, status; in apbuart_console_get_options() local
440 quot = UART_GET_SCAL(port) / 8; in apbuart_console_get_options()
441 *baud = port->uartclk / (16 * (quot + 1)); in apbuart_console_get_options()
A Dsunsu.c483 unsigned int iflag, unsigned int quot);
488 int quot, new_baud; in sunsu_change_mouse_baud() local
493 quot = up->port.uartclk / (16 * new_baud); in sunsu_change_mouse_baud()
495 sunsu_change_speed(&up->port, up->cflag, 0, quot); in sunsu_change_mouse_baud()
772 unsigned int iflag, unsigned int quot) in sunsu_change_speed() argument
811 quot ++; in sunsu_change_speed()
814 if ((up->port.uartclk / quot) < (2400 * 16)) in sunsu_change_speed()
902 unsigned int baud, quot; in sunsu_set_termios() local
908 quot = uart_get_divisor(port, baud); in sunsu_set_termios()
1189 int quot, baud; in sunsu_kbd_ms_init() local
[all …]
A Damba-pl010.c356 unsigned int baud, quot; in pl010_set_termios() local
362 quot = uart_get_divisor(port, baud); in pl010_set_termios()
429 quot -= 1; in pl010_set_termios()
430 writel((quot & 0xf00) >> 8, port->membase + UART010_LCRM); in pl010_set_termios()
431 writel(quot & 0xff, port->membase + UART010_LCRL); in pl010_set_termios()
579 unsigned int lcr_h, quot; in pl010_console_get_options() local
595 quot = readb(uap->port.membase + UART010_LCRL) | in pl010_console_get_options()
597 *baud = uap->port.uartclk / (16 * (quot + 1)); in pl010_console_get_options()
A Dclps711x.c257 unsigned int baud, quot; in uart_clps711x_set_termios() local
266 quot = uart_get_divisor(port, baud); in uart_clps711x_set_termios()
309 writel(ubrlcr | (quot - 1), port->membase + UBRLCR_OFFSET); in uart_clps711x_set_termios()
385 unsigned int quot; in uart_clps711x_console_setup() local
414 quot = ubrlcr & UBRLCR_BAUD_MASK; in uart_clps711x_console_setup()
415 baud = port->uartclk / (16 * (quot + 1)); in uart_clps711x_console_setup()
A Dsa1100.c392 unsigned int utcr0, old_utcr3, baud, quot; in sa1100_set_termios() local
422 quot = uart_get_divisor(port, baud); in sa1100_set_termios()
477 quot -= 1; in sa1100_set_termios()
478 UART_PUT_UTCR1(sport, ((quot & 0xf00) >> 8)); in sa1100_set_termios()
479 UART_PUT_UTCR2(sport, (quot & 0xff)); in sa1100_set_termios()
724 unsigned int utcr0, quot; in sa1100_console_get_options() local
741 quot = UART_GET_UTCR2(sport) | UART_GET_UTCR1(sport) << 8; in sa1100_console_get_options()
742 quot &= 0xfff; in sa1100_console_get_options()
743 *baud = sport->port.uartclk / (16 * (quot + 1)); in sa1100_console_get_options()
A Dpxa.c408 unsigned int baud, quot; in serial_pxa_set_termios() local
424 quot = uart_get_divisor(port, baud); in serial_pxa_set_termios()
426 if ((up->port.uartclk / quot) < (2400 * 16)) in serial_pxa_set_termios()
428 else if ((up->port.uartclk / quot) < (230400 * 16)) in serial_pxa_set_termios()
493 serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */ in serial_pxa_set_termios()
500 WARN_ON(dll != (quot & 0xff)); in serial_pxa_set_termios()
502 serial_out(up, UART_DLM, quot >> 8); /* MS of divisor */ in serial_pxa_set_termios()
/linux/drivers/phy/intel/
A Dphy-intel-lgm-emmc.c58 int ret, quot; in intel_emmc_phy_power() local
76 quot = DIV_ROUND_CLOSEST(rate, 50000000); in intel_emmc_phy_power()
77 if (quot > FRQSEL_150M) in intel_emmc_phy_power()
79 freqsel = clamp_t(int, quot, FRQSEL_25M, FRQSEL_150M); in intel_emmc_phy_power()
/linux/drivers/accessibility/speakup/
A Dserialio.c50 int baud = 9600, quot = 0; in spk_serial_init() local
63 quot = ser->baud_base / baud; in spk_serial_init()
90 outb(quot & 0xff, ser->port + UART_DLL); /* LS of divisor */ in spk_serial_init()
91 outb(quot >> 8, ser->port + UART_DLM); /* MS of divisor */ in spk_serial_init()
/linux/arch/m68k/math-emu/
A Dfp_arith.c360 unsigned long quot, rem; in fp_fsgldiv() local
411 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv()
412 dest->mant.m32[0] = 0x80000000 | (quot >> 1); in fp_fsgldiv()
413 dest->mant.m32[1] = (quot & 1) | rem; /* only for rounding */ in fp_fsgldiv()
415 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv()
416 dest->mant.m32[0] = quot; in fp_fsgldiv()

Completed in 46 milliseconds

123