/Linux-v5.4/lib/math/ |
D | div64.c | 105 u64 quot; in div64_u64_rem() local 109 quot = div_u64_rem(dividend, divisor, &rem32); in div64_u64_rem() 113 quot = div_u64(dividend >> n, divisor >> n); in div64_u64_rem() 115 if (quot != 0) in div64_u64_rem() 116 quot--; in div64_u64_rem() 118 *remainder = dividend - quot * divisor; in div64_u64_rem() 120 quot++; in div64_u64_rem() 125 return quot; in div64_u64_rem() 145 u64 quot; in div64_u64() local 148 quot = div_u64(dividend, divisor); in div64_u64() [all …]
|
/Linux-v5.4/tools/perf/util/ |
D | tsc.c | 9 u64 t, quot, rem; in perf_time_to_tsc() local 12 quot = t / tc->time_mult; in perf_time_to_tsc() 14 return (quot << tc->time_shift) + in perf_time_to_tsc() 20 u64 quot, rem; in tsc_to_perf_time() local 22 quot = cyc >> tc->time_shift; in tsc_to_perf_time() 24 return tc->time_zero + quot * tc->time_mult + in tsc_to_perf_time()
|
/Linux-v5.4/drivers/usb/serial/ |
D | ark3116.c | 65 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() 201 int quot; in ark3116_set_termios() local 238 quot = calc_divisor(9600); in ark3116_set_termios() 243 quot = calc_divisor(bps); in ark3116_set_termios() 247 quot = calc_divisor(bps); in ark3116_set_termios() 251 quot = calc_divisor(bps); in ark3116_set_termios() 262 __func__, hcr, lcr, quot); in ark3116_set_termios() [all …]
|
/Linux-v5.4/drivers/tty/serial/8250/ |
D | 8250_dwlib.c | 63 unsigned int quot, rem, base_baud = baud * 16; in dw8250_get_divisor() local 66 quot = p->uartclk / base_baud; in dw8250_get_divisor() 70 return quot; in dw8250_get_divisor() 74 unsigned int quot, unsigned int quot_frac) in dw8250_set_divisor() argument 77 serial8250_do_set_divisor(p, baud, quot, quot_frac); in dw8250_set_divisor()
|
D | 8250_port.c | 1064 unsigned short quot; in autoconfig_16550a() local 1068 quot = serial_dl_read(up); in autoconfig_16550a() 1069 quot <<= 3; in autoconfig_16550a() 1072 serial_dl_write(up, quot); in autoconfig_16550a() 2423 unsigned int quot; in serial8250_do_get_divisor() local 2432 quot = 0x8001; in serial8250_do_get_divisor() 2435 quot = 0x8002; in serial8250_do_get_divisor() 2437 quot = npcm_get_divisor(up, baud); in serial8250_do_get_divisor() 2439 quot = uart_get_divisor(port, baud); in serial8250_do_get_divisor() 2444 if (up->bugs & UART_BUG_QUOT && (quot & 0xff) == 0) in serial8250_do_get_divisor() [all …]
|
D | 8250_mtk.c | 293 unsigned int baud, quot, fraction; in mtk8250_set_termios() local 329 quot = uart_get_divisor(port, baud); in mtk8250_set_termios() 332 quot = DIV_ROUND_UP(port->uartclk, 256 * baud); in mtk8250_set_termios() 343 serial_dl_write(up, quot); in mtk8250_set_termios() 351 tmp = (port->uartclk / (baud * quot)) - 1; in mtk8250_set_termios() 357 fraction = ((port->uartclk * 100) / baud / quot) % 100; in mtk8250_set_termios()
|
/Linux-v5.4/tools/perf/arch/x86/tests/ |
D | rdpmc.c | 66 u64 quot, rem; in mmap_read_self() local 68 quot = (cyc >> time_shift); in mmap_read_self() 70 delta = time_offset + quot * time_mult + in mmap_read_self() 77 quot = count / running; in mmap_read_self() 79 count = quot * enabled + (rem * enabled) / running; in mmap_read_self()
|
/Linux-v5.4/arch/powerpc/platforms/embedded6xx/ |
D | ls_uart.c | 61 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-v5.4/arch/x86/boot/ |
D | early_serial_console.c | 105 unsigned int quot; in probe_baud() local 112 quot = (dlh << 8) | dll; in probe_baud() 114 return BASE_BAUD / quot; in probe_baud()
|
/Linux-v5.4/drivers/tty/serial/ |
D | 21285.c | 214 unsigned int baud, quot, h_lcr, b; in serial21285_set_termios() local 231 quot = uart_get_divisor(port, baud); in serial21285_set_termios() 232 b = port->uartclk / (16 * quot); in serial21285_set_termios() 290 quot -= 1; in serial21285_set_termios() 293 *CSR_L_UBRLCR = quot & 0xff; in serial21285_set_termios() 294 *CSR_M_UBRLCR = (quot >> 8) & 0x0f; in serial21285_set_termios()
|
D | sunsu.c | 490 unsigned int iflag, unsigned int quot); 495 int quot, new_baud; in sunsu_change_mouse_baud() local 500 quot = up->port.uartclk / (16 * new_baud); in sunsu_change_mouse_baud() 502 sunsu_change_speed(&up->port, up->cflag, 0, quot); in sunsu_change_mouse_baud() 779 unsigned int iflag, unsigned int quot) in sunsu_change_speed() argument 818 if ((quot & 0xff) == 0 && up->port.type == PORT_16C950 && in sunsu_change_speed() 820 quot ++; in sunsu_change_speed() 823 if ((up->port.uartclk / quot) < (2400 * 16)) in sunsu_change_speed() 844 uart_update_timeout(port, cflag, (port->uartclk / (16 * quot))); in sunsu_change_speed() 888 serial_outp(up, UART_DLL, quot & 0xff); /* LS of divisor */ in sunsu_change_speed() [all …]
|
D | apbuart.c | 241 unsigned int baud, quot; in apbuart_set_termios() local 249 quot = (uart_get_divisor(port, baud)) * 2; in apbuart_set_termios() 282 quot -= 1; in apbuart_set_termios() 283 UART_PUT_SCAL(port, quot); in apbuart_set_termios() 460 unsigned int quot, status; in apbuart_console_get_options() local 472 quot = UART_GET_SCAL(port) / 8; in apbuart_console_get_options() 473 *baud = port->uartclk / (16 * (quot + 1)); in apbuart_console_get_options()
|
D | serial_txx9.c | 205 sio_quot_set(struct uart_txx9_port *up, int quot) in sio_quot_set() argument 207 quot >>= 1; in sio_quot_set() 208 if (quot < 256) in sio_quot_set() 209 sio_out(up, TXX9_SIBGR, quot | TXX9_SIBGR_BCLK_T0); in sio_quot_set() 210 else if (quot < (256 << 2)) in sio_quot_set() 211 sio_out(up, TXX9_SIBGR, (quot >> 2) | TXX9_SIBGR_BCLK_T2); in sio_quot_set() 212 else if (quot < (256 << 4)) in sio_quot_set() 213 sio_out(up, TXX9_SIBGR, (quot >> 4) | TXX9_SIBGR_BCLK_T4); in sio_quot_set() 214 else if (quot < (256 << 6)) in sio_quot_set() 215 sio_out(up, TXX9_SIBGR, (quot >> 6) | TXX9_SIBGR_BCLK_T6); in sio_quot_set() [all …]
|
D | clps711x.c | 261 unsigned int baud, quot; in uart_clps711x_set_termios() local 270 quot = uart_get_divisor(port, baud); in uart_clps711x_set_termios() 313 writel(ubrlcr | (quot - 1), port->membase + UBRLCR_OFFSET); in uart_clps711x_set_termios() 389 unsigned int quot; in uart_clps711x_console_setup() local 418 quot = ubrlcr & UBRLCR_BAUD_MASK; in uart_clps711x_console_setup() 419 baud = port->uartclk / (16 * (quot + 1)); in uart_clps711x_console_setup()
|
D | sa1100.c | 425 unsigned int utcr0, old_utcr3, baud, quot; in sa1100_set_termios() local 455 quot = uart_get_divisor(port, baud); in sa1100_set_termios() 510 quot -= 1; in sa1100_set_termios() 511 UART_PUT_UTCR1(sport, ((quot & 0xf00) >> 8)); in sa1100_set_termios() 512 UART_PUT_UTCR2(sport, (quot & 0xff)); in sa1100_set_termios() 757 unsigned int utcr0, quot; in sa1100_console_get_options() local 774 quot = UART_GET_UTCR2(sport) | UART_GET_UTCR1(sport) << 8; in sa1100_console_get_options() 775 quot &= 0xfff; in sa1100_console_get_options() 776 *baud = sport->port.uartclk / (16 * (quot + 1)); in sa1100_console_get_options()
|
D | amba-pl010.c | 388 unsigned int baud, quot; in pl010_set_termios() local 394 quot = uart_get_divisor(port, baud); in pl010_set_termios() 464 quot -= 1; in pl010_set_termios() 465 writel((quot & 0xf00) >> 8, uap->port.membase + UART010_LCRM); in pl010_set_termios() 466 writel(quot & 0xff, uap->port.membase + UART010_LCRL); in pl010_set_termios() 615 unsigned int lcr_h, quot; in pl010_console_get_options() local 631 quot = readb(uap->port.membase + UART010_LCRL) | in pl010_console_get_options() 633 *baud = uap->port.uartclk / (16 * (quot + 1)); in pl010_console_get_options()
|
D | pxa.c | 434 unsigned int baud, quot; in serial_pxa_set_termios() local 464 quot = uart_get_divisor(port, baud); in serial_pxa_set_termios() 466 if ((up->port.uartclk / quot) < (2400 * 16)) in serial_pxa_set_termios() 468 else if ((up->port.uartclk / quot) < (230400 * 16)) in serial_pxa_set_termios() 533 serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */ in serial_pxa_set_termios() 540 WARN_ON(dll != (quot & 0xff)); in serial_pxa_set_termios() 542 serial_out(up, UART_DLM, quot >> 8); /* MS of divisor */ in serial_pxa_set_termios()
|
D | sunsab.c | 685 unsigned int quot) in sunsab_convert_to_sab() argument 770 (up->port.uartclk / (16 * quot))); in sunsab_convert_to_sab() 789 unsigned int quot = uart_get_divisor(port, baud); in sunsab_set_termios() local 792 sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud, quot); in sunsab_set_termios() 884 unsigned int baud, quot; in sunsab_console_setup() local 940 quot = uart_get_divisor(&up->port, baud); in sunsab_console_setup() 941 sunsab_convert_to_sab(up, con->cflag, 0, baud, quot); in sunsab_console_setup()
|
D | milbeaut_usio.c | 308 unsigned long flags, baud, quot; in mlb_usio_set_termios() local 341 quot = port->uartclk / baud - 1; in mlb_usio_set_termios() 343 quot = 0; in mlb_usio_set_termios() 366 writew(quot, port->membase + MLB_USIO_REG_BGR); in mlb_usio_set_termios()
|
D | pnx8xxx_uart.c | 445 unsigned int lcr_fcr, old_ien, baud, quot; in pnx8xxx_set_termios() local 475 quot = uart_get_divisor(port, baud); in pnx8xxx_set_termios() 545 quot -= 1; in pnx8xxx_set_termios() 546 serial_out(sport, PNX8XXX_BAUD, quot); in pnx8xxx_set_termios()
|
/Linux-v5.4/drivers/tty/ |
D | amiserial.c | 106 int quot; member 650 int quot = 0, baud_base, baud; in change_speed() local 681 quot = info->custom_divisor; in change_speed() 685 quot = (2*baud_base / 269); in change_speed() 687 quot = baud_base / baud; in change_speed() 690 if (!quot && old_termios) { in change_speed() 699 quot = info->custom_divisor; in change_speed() 703 quot = (2*baud_base / 269); in change_speed() 705 quot = baud_base / baud; in change_speed() 709 if (!quot) in change_speed() [all …]
|
D | mxser.c | 571 unsigned int quot = 0, baud; in mxser_set_baud() local 582 quot = 2 * info->baud_base / 269; in mxser_set_baud() 585 quot = info->baud_base / newspd; in mxser_set_baud() 586 if (quot == 0) in mxser_set_baud() 587 quot = 1; in mxser_set_baud() 588 baud = info->baud_base/quot; in mxser_set_baud() 591 quot = 0; in mxser_set_baud() 598 timeout = (u64)info->xmit_fifo_size * HZ * 10 * quot; in mxser_set_baud() 602 if (quot) { in mxser_set_baud() 615 outb(quot & 0xff, info->ioaddr + UART_DLL); /* LS of divisor */ in mxser_set_baud() [all …]
|
/Linux-v5.4/drivers/staging/speakup/ |
D | serialio.c | 48 int baud = 9600, quot = 0; in spk_serial_init() local 61 quot = ser->baud_base / baud; in spk_serial_init() 88 outb(quot & 0xff, ser->port + UART_DLL); /* LS of divisor */ in spk_serial_init() 89 outb(quot >> 8, ser->port + UART_DLM); /* MS of divisor */ in spk_serial_init()
|
/Linux-v5.4/arch/m68k/math-emu/ |
D | fp_arith.c | 370 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-v5.4/drivers/tty/serial/jsm/ |
D | jsm_cls.c | 684 int quot = 0; in cls_param() local 761 quot = ch->ch_bd->bd_dividend / baud; in cls_param() 763 if (quot != 0) { in cls_param() 765 writeb((quot & 0xff), &ch->ch_cls_uart->txrx); in cls_param() 766 writeb((quot >> 8), &ch->ch_cls_uart->ier); in cls_param()
|