/Linux-v4.19/lib/ |
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-v4.19/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-v4.19/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() 211 int quot; in ark3116_set_termios() local 248 quot = calc_divisor(9600); in ark3116_set_termios() 253 quot = calc_divisor(bps); in ark3116_set_termios() 257 quot = calc_divisor(bps); in ark3116_set_termios() 261 quot = calc_divisor(bps); in ark3116_set_termios() 272 __func__, hcr, lcr, quot); in ark3116_set_termios() [all …]
|
/Linux-v4.19/tools/perf/arch/x86/tests/ |
D | rdpmc.c | 64 u64 quot, rem; in mmap_read_self() local 66 quot = (cyc >> time_shift); in mmap_read_self() 68 delta = time_offset + quot * time_mult + in mmap_read_self() 75 quot = count / running; in mmap_read_self() 77 count = quot * enabled + (rem * enabled) / running; in mmap_read_self()
|
/Linux-v4.19/drivers/tty/serial/8250/ |
D | 8250_mtk.c | 37 unsigned int baud, quot; in mtk8250_set_termios() local 60 quot = uart_get_divisor(port, baud); in mtk8250_set_termios() 67 quot = DIV_ROUND_UP(port->uartclk, 4 * baud); in mtk8250_set_termios() 70 quot = DIV_ROUND_UP(port->uartclk, 256 * baud); in mtk8250_set_termios() 81 serial_dl_write(up, quot); in mtk8250_set_termios() 89 tmp = DIV_ROUND_CLOSEST(port->uartclk, quot * baud); in mtk8250_set_termios()
|
D | 8250_port.c | 1095 unsigned short quot; in autoconfig_16550a() local 1099 quot = serial_dl_read(up); in autoconfig_16550a() 1100 quot <<= 3; in autoconfig_16550a() 1103 serial_dl_write(up, quot); in autoconfig_16550a() 2503 unsigned int quot; in serial8250_do_get_divisor() local 2512 quot = 0x8001; in serial8250_do_get_divisor() 2515 quot = 0x8002; in serial8250_do_get_divisor() 2517 quot = xr17v35x_get_divisor(up, baud, frac); in serial8250_do_get_divisor() 2519 quot = npcm_get_divisor(up, baud); in serial8250_do_get_divisor() 2521 quot = uart_get_divisor(port, baud); in serial8250_do_get_divisor() [all …]
|
D | 8250_dw.c | 385 unsigned int quot, rem, base_baud = baud * 16; in dw8250_get_divisor() local 388 quot = p->uartclk / base_baud; in dw8250_get_divisor() 392 return quot; in dw8250_get_divisor() 396 unsigned int quot, unsigned int quot_frac) in dw8250_set_divisor() argument 399 serial8250_do_set_divisor(p, baud, quot, quot_frac); in dw8250_set_divisor()
|
/Linux-v4.19/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-v4.19/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-v4.19/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 | netx-serial.c | 328 unsigned int baud, quot; in netx_set_termios() local 361 quot = baud * 4096; in netx_set_termios() 362 quot /= 1000; in netx_set_termios() 363 quot *= 256; in netx_set_termios() 364 quot /= 100000; in netx_set_termios() 387 writel((quot>>8) & 0xff, port->membase + UART_BAUDDIV_MSB); in netx_set_termios() 388 writel(quot & 0xff, port->membase + UART_BAUDDIV_LSB); in netx_set_termios()
|
D | sa1100.c | 410 unsigned int utcr0, old_utcr3, baud, quot; in sa1100_set_termios() local 440 quot = uart_get_divisor(port, baud); in sa1100_set_termios() 495 quot -= 1; in sa1100_set_termios() 496 UART_PUT_UTCR1(sport, ((quot & 0xf00) >> 8)); in sa1100_set_termios() 497 UART_PUT_UTCR2(sport, (quot & 0xff)); in sa1100_set_termios() 742 unsigned int utcr0, quot; in sa1100_console_get_options() local 759 quot = UART_GET_UTCR2(sport) | UART_GET_UTCR1(sport) << 8; in sa1100_console_get_options() 760 quot &= 0xfff; in sa1100_console_get_options() 761 *baud = sport->port.uartclk / (16 * (quot + 1)); in sa1100_console_get_options()
|
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 | 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()
|
/Linux-v4.19/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-v4.19/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-v4.19/arch/m68k/math-emu/ |
D | fp_arith.c | 372 unsigned long quot, rem; in fp_fsgldiv() local 423 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv() 424 dest->mant.m32[0] = 0x80000000 | (quot >> 1); in fp_fsgldiv() 425 dest->mant.m32[1] = (quot & 1) | rem; /* only for rounding */ in fp_fsgldiv() 427 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv() 428 dest->mant.m32[0] = quot; in fp_fsgldiv()
|
/Linux-v4.19/drivers/isdn/hisax/ |
D | elsa_ser.c | 110 int quot = 0, baud_base; in change_speed() local 118 quot = baud_base / baud; in change_speed() 120 if (!quot) in change_speed() 121 quot = baud_base / 9600; in change_speed() 124 if ((baud_base / quot) < 2400) in change_speed() 134 debugl1(cs, "modem quot=0x%x", quot); in change_speed() 136 serial_outp(cs, UART_DLL, quot & 0xff); /* LS of divisor */ in change_speed() 137 serial_outp(cs, UART_DLM, quot >> 8); /* MS of divisor */ in change_speed()
|
/Linux-v4.19/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()
|