Home
last modified time | relevance | path

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

123

/linux-6.1.9/lib/mpi/
Dmpi-div.c17 void mpi_tdiv_qr(MPI quot, MPI rem, MPI num, MPI den);
18 void mpi_fdiv_qr(MPI quot, MPI rem, MPI dividend, MPI divisor);
43 void mpi_fdiv_q(MPI quot, MPI dividend, MPI divisor) in mpi_fdiv_q() argument
45 MPI tmp = mpi_alloc(mpi_get_nlimbs(quot)); in mpi_fdiv_q()
46 mpi_fdiv_qr(quot, tmp, dividend, divisor); in mpi_fdiv_q()
50 void mpi_fdiv_qr(MPI quot, MPI rem, MPI dividend, MPI divisor) in mpi_fdiv_qr() argument
55 if (quot == divisor || rem == divisor) { in mpi_fdiv_qr()
60 mpi_tdiv_qr(quot, rem, dividend, divisor); in mpi_fdiv_qr()
63 mpi_sub_ui(quot, quot, 1); in mpi_fdiv_qr()
83 void mpi_tdiv_qr(MPI quot, MPI rem, MPI num, MPI den) in mpi_tdiv_qr() argument
[all …]
/linux-6.1.9/lib/math/
Ddiv64.c107 u64 quot; in div64_u64_rem() local
111 quot = div_u64_rem(dividend, divisor, &rem32); in div64_u64_rem()
115 quot = div_u64(dividend >> n, divisor >> n); in div64_u64_rem()
117 if (quot != 0) in div64_u64_rem()
118 quot--; in div64_u64_rem()
120 *remainder = dividend - quot * divisor; in div64_u64_rem()
122 quot++; in div64_u64_rem()
127 return quot; in div64_u64_rem()
147 u64 quot; in div64_u64() local
150 quot = div_u64(dividend, divisor); in div64_u64()
[all …]
/linux-6.1.9/drivers/usb/serial/
Dark3116.c65 int quot; /* baudrate divisor */ member
164 priv->quot = calc_divisor(9600); in ark3116_port_probe()
165 ark3116_write_reg(serial, UART_DLL, priv->quot & 0xff); in ark3116_port_probe()
166 ark3116_write_reg(serial, UART_DLM, (priv->quot>>8) & 0xff); 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()
[all …]
/linux-6.1.9/tools/perf/util/
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-6.1.9/tools/include/linux/
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-6.1.9/drivers/tty/serial/8250/
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, quot_frac); in dw8250_set_divisor()
D8250_port.c1098 unsigned short quot; in autoconfig_16550a() local
1102 quot = serial_dl_read(up); in autoconfig_16550a()
1103 quot <<= 3; in autoconfig_16550a()
1106 serial_dl_write(up, quot); in autoconfig_16550a()
2545 unsigned int quot; in serial8250_do_get_divisor() local
2580 quot = 0x8001; in serial8250_do_get_divisor()
2582 quot = 0x8002; in serial8250_do_get_divisor()
2584 quot = npcm_get_divisor(up, baud); in serial8250_do_get_divisor()
2586 quot = uart_get_divisor(port, baud); in serial8250_do_get_divisor()
2591 if (up->bugs & UART_BUG_QUOT && (quot & 0xff) == 0) in serial8250_do_get_divisor()
[all …]
D8250_mtk.c303 unsigned int baud, quot, fraction; in mtk8250_set_termios() local
352 quot = uart_get_divisor(port, baud); in mtk8250_set_termios()
355 quot = DIV_ROUND_UP(port->uartclk, 256 * baud); in mtk8250_set_termios()
371 serial_dl_write(up, quot); in mtk8250_set_termios()
379 tmp = (port->uartclk / (baud * quot)) - 1; in mtk8250_set_termios()
385 fraction = ((port->uartclk * 100) / baud / quot) % 100; in mtk8250_set_termios()
/linux-6.1.9/drivers/tty/
Damiserial.c81 int quot; member
572 int quot = 0, baud_base, baud; in change_speed() local
601 quot = info->custom_divisor; in change_speed()
605 quot = (2*baud_base / 269); in change_speed()
607 quot = baud_base / baud; in change_speed()
610 if (!quot && old_termios) { in change_speed()
619 quot = info->custom_divisor; in change_speed()
623 quot = (2*baud_base / 269); in change_speed()
625 quot = baud_base / baud; in change_speed()
629 if (!quot) in change_speed()
[all …]
Dmxser.c486 unsigned int quot = 0, baud; in mxser_set_baud() local
494 quot = 2 * MXSER_BAUD_BASE / 269; in mxser_set_baud()
497 quot = MXSER_BAUD_BASE / newspd; in mxser_set_baud()
498 if (quot == 0) in mxser_set_baud()
499 quot = 1; in mxser_set_baud()
500 baud = MXSER_BAUD_BASE / quot; in mxser_set_baud()
503 quot = 0; in mxser_set_baud()
510 timeout = (u64)info->xmit_fifo_size * HZ * 10 * quot; in mxser_set_baud()
514 if (quot) { in mxser_set_baud()
527 outb(quot & 0xff, info->ioaddr + UART_DLL); /* LS of divisor */ in mxser_set_baud()
[all …]
/linux-6.1.9/arch/powerpc/platforms/embedded6xx/
Dls_uart.c61 unsigned int quot = AVR_QUOT(avr_clock); in avr_uart_configure() local
75 out_8(avr_addr + UART_DLL, quot & 0xff); /* LS of divisor */ in avr_uart_configure()
76 out_8(avr_addr + UART_DLM, quot >> 8); /* MS of divisor */ in avr_uart_configure()
/linux-6.1.9/arch/x86/boot/
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-6.1.9/drivers/phy/intel/
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-6.1.9/drivers/tty/serial/
Dserial_txx9.c193 sio_quot_set(struct uart_port *up, int quot) in sio_quot_set() argument
195 quot >>= 1; in sio_quot_set()
196 if (quot < 256) in sio_quot_set()
197 sio_out(up, TXX9_SIBGR, quot | TXX9_SIBGR_BCLK_T0); in sio_quot_set()
198 else if (quot < (256 << 2)) in sio_quot_set()
199 sio_out(up, TXX9_SIBGR, (quot >> 2) | TXX9_SIBGR_BCLK_T2); in sio_quot_set()
200 else if (quot < (256 << 4)) in sio_quot_set()
201 sio_out(up, TXX9_SIBGR, (quot >> 4) | TXX9_SIBGR_BCLK_T4); in sio_quot_set()
202 else if (quot < (256 << 6)) in sio_quot_set()
203 sio_out(up, TXX9_SIBGR, (quot >> 6) | TXX9_SIBGR_BCLK_T6); in sio_quot_set()
[all …]
D21285.c249 unsigned int baud, quot, h_lcr, b; in serial21285_set_termios() local
266 quot = uart_get_divisor(port, baud); in serial21285_set_termios()
267 b = port->uartclk / (16 * quot); in serial21285_set_termios()
325 quot -= 1; in serial21285_set_termios()
328 *CSR_L_UBRLCR = quot & 0xff; in serial21285_set_termios()
329 *CSR_M_UBRLCR = (quot >> 8) & 0x0f; in serial21285_set_termios()
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
809 if ((quot & 0xff) == 0 && up->port.type == PORT_16C950 && in sunsu_change_speed()
811 quot ++; in sunsu_change_speed()
814 if ((up->port.uartclk / quot) < (2400 * 16)) in sunsu_change_speed()
835 uart_update_timeout(port, cflag, (port->uartclk / (16 * quot))); in sunsu_change_speed()
879 serial_outp(up, UART_DLL, quot & 0xff); /* LS of divisor */ in sunsu_change_speed()
[all …]
Dapbuart.c235 unsigned int baud, quot; in apbuart_set_termios() local
243 quot = (uart_get_divisor(port, baud)) * 2; in apbuart_set_termios()
276 quot -= 1; in apbuart_set_termios()
277 UART_PUT_SCAL(port, quot); in apbuart_set_termios()
454 unsigned int quot, status; in apbuart_console_get_options() local
466 quot = UART_GET_SCAL(port) / 8; in apbuart_console_get_options()
467 *baud = port->uartclk / (16 * (quot + 1)); in apbuart_console_get_options()
Damba-pl010.c377 unsigned int baud, quot; in pl010_set_termios() local
383 quot = uart_get_divisor(port, baud); in pl010_set_termios()
450 quot -= 1; in pl010_set_termios()
451 writel((quot & 0xf00) >> 8, port->membase + UART010_LCRM); in pl010_set_termios()
452 writel(quot & 0xff, port->membase + UART010_LCRL); in pl010_set_termios()
600 unsigned int lcr_h, quot; in pl010_console_get_options() local
616 quot = readb(uap->port.membase + UART010_LCRL) | in pl010_console_get_options()
618 *baud = uap->port.uartclk / (16 * (quot + 1)); in pl010_console_get_options()
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()
Dsa1100.c417 unsigned int utcr0, old_utcr3, baud, quot; in sa1100_set_termios() local
447 quot = uart_get_divisor(port, baud); in sa1100_set_termios()
502 quot -= 1; in sa1100_set_termios()
503 UART_PUT_UTCR1(sport, ((quot & 0xf00) >> 8)); in sa1100_set_termios()
504 UART_PUT_UTCR2(sport, (quot & 0xff)); in sa1100_set_termios()
749 unsigned int utcr0, quot; in sa1100_console_get_options() local
766 quot = UART_GET_UTCR2(sport) | UART_GET_UTCR1(sport) << 8; in sa1100_console_get_options()
767 quot &= 0xfff; in sa1100_console_get_options()
768 *baud = sport->port.uartclk / (16 * (quot + 1)); in sa1100_console_get_options()
Dpxa.c431 unsigned int baud, quot; in serial_pxa_set_termios() local
447 quot = uart_get_divisor(port, baud); in serial_pxa_set_termios()
449 if ((up->port.uartclk / quot) < (2400 * 16)) in serial_pxa_set_termios()
451 else if ((up->port.uartclk / quot) < (230400 * 16)) in serial_pxa_set_termios()
516 serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */ in serial_pxa_set_termios()
523 WARN_ON(dll != (quot & 0xff)); in serial_pxa_set_termios()
525 serial_out(up, UART_DLM, quot >> 8); /* MS of divisor */ in serial_pxa_set_termios()
/linux-6.1.9/drivers/accessibility/speakup/
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-6.1.9/arch/m68k/math-emu/
Dfp_arith.c370 unsigned long quot, rem; in fp_fsgldiv() local
421 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv()
422 dest->mant.m32[0] = 0x80000000 | (quot >> 1); in fp_fsgldiv()
423 dest->mant.m32[1] = (quot & 1) | rem; /* only for rounding */ in fp_fsgldiv()
425 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv()
426 dest->mant.m32[0] = quot; in fp_fsgldiv()
/linux-6.1.9/include/linux/
Dmath.h127 typeof(x) quot = (x) / (denom); \ in __STRUCT_FRACT()
129 (quot * (numer)) + ((rem * (numer)) / (denom)); \ in __STRUCT_FRACT()
/linux-6.1.9/drivers/soc/qcom/
Dcpr.c205 int quot; member
373 gcnt |= fuse->quot - corner->quot_adjust; in cpr_corner_restore()
902 ret = nvmem_cell_read_variable_le_u32(drv->dev, fuses->quotient, &fuse->quot); in cpr_fuse_corner_init()
906 fuse->quot *= fdata->quot_scale; in cpr_fuse_corner_init()
907 fuse->quot += fdata->quot_offset; in cpr_fuse_corner_init()
908 fuse->quot += fdata->quot_adjust; in cpr_fuse_corner_init()
950 fuse->ring_osc_idx, fuse->quot, fuse->step_quot); in cpr_fuse_corner_init()
978 quot_diff = fuse->quot - prev_fuse->quot; in cpr_calculate_scaling()
1221 fuse->quot - corner->quot_adjust); in cpr_corner_init()

123