Home
last modified time | relevance | path

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

123

/openbmc/u-boot/lib/
H A Ddiv64.c98 u64 quot; in div64_u64_rem() local
108 if (quot != 0) in div64_u64_rem()
109 quot--; in div64_u64_rem()
113 quot++; in div64_u64_rem()
118 return quot; in div64_u64_rem()
138 u64 quot; in div64_u64() local
146 if (quot != 0) in div64_u64()
147 quot--; in div64_u64()
149 quot++; in div64_u64()
152 return quot; in div64_u64()
[all …]
H A Dldiv.c7 long quot; member
16 result.quot = numer / denom; in ldiv()
37 ++result.quot; in ldiv()
/openbmc/linux/lib/crypto/mpi/
H A Dmpi-div.c63 mpi_sub_ui(quot, quot, 1); in mpi_fdiv_qr()
111 if (quot) { in mpi_tdiv_qr()
115 quot->nlimbs = 0; in mpi_tdiv_qr()
116 quot->sign = 0; in mpi_tdiv_qr()
121 if (quot) in mpi_tdiv_qr()
132 if (quot) { in mpi_tdiv_qr()
133 qp = quot->d; in mpi_tdiv_qr()
148 if (quot) { in mpi_tdiv_qr()
149 qp = quot->d; in mpi_tdiv_qr()
209 if (quot) { in mpi_tdiv_qr()
[all …]
/openbmc/linux/lib/math/
H A Ddiv64.c101 u64 quot; in div64_u64_rem() local
111 if (quot != 0) in div64_u64_rem()
112 quot--; in div64_u64_rem()
116 quot++; in div64_u64_rem()
121 return quot; in div64_u64_rem()
141 u64 quot; in div64_u64() local
149 if (quot != 0) in div64_u64()
150 quot--; in div64_u64()
152 quot++; in div64_u64()
155 return quot; in div64_u64()
[all …]
/openbmc/u-boot/drivers/serial/
H A Dserial_mtk.c62 u32 quot, samplecount, realbaud; in _mtk_serial_setbrg() local
71 quot = DIV_ROUND_CLOSEST(priv->clock, 16 * baud); in _mtk_serial_setbrg()
75 quot = DIV_ROUND_CLOSEST(priv->clock, 256 * baud); in _mtk_serial_setbrg()
76 if (quot == 0) in _mtk_serial_setbrg()
77 quot = 1; in _mtk_serial_setbrg()
80 quot * baud); in _mtk_serial_setbrg()
82 realbaud = priv->clock / samplecount / quot; in _mtk_serial_setbrg()
98 quot = DIV_ROUND_UP(priv->clock, 4 * baud); in _mtk_serial_setbrg()
101 quot = DIV_ROUND_UP(priv->clock, 256 * baud); in _mtk_serial_setbrg()
106 writel(quot & 0xff, &priv->regs->dll); in _mtk_serial_setbrg()
[all …]
/openbmc/qemu/target/m68k/
H A Dop_helper.c586 quot = num / den; in HELPER()
614 quot = num / den; in HELPER()
617 if (quot != (int16_t)quot) { in HELPER()
644 quot = num / den; in HELPER()
647 env->cc_z = quot; in HELPER()
648 env->cc_n = quot; in HELPER()
674 quot = num / den; in HELPER()
677 env->cc_z = quot; in HELPER()
697 uint64_t quot; in HELPER() local
734 int64_t quot; in HELPER() local
[all …]
/openbmc/linux/drivers/usb/serial/
H 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 …]
/openbmc/linux/tools/perf/util/
H 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()
/openbmc/linux/tools/include/linux/
H 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()
/openbmc/u-boot/disk/
H A Dpart_mac.c26 long int quot; /* Quotient */ member
91 gb = ldiv(10 * mb.quot + mb.rem, 10240); in part_print_mac()
103 mb.quot, mb.rem, gb.quot, gb.rem, in part_print_mac()
/openbmc/linux/arch/x86/boot/
H 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()
/openbmc/linux/arch/powerpc/platforms/embedded6xx/
H 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()
/openbmc/linux/drivers/tty/serial/8250/
H 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, quot_frac); in dw8250_set_divisor()
H A D8250_pci1xxxx.c147 unsigned int quot; in pci1xxxx_get_divisor() local
153 quot = NSEC_PER_SEC / (baud * UART_BIT_SAMPLE_CNT); in pci1xxxx_get_divisor()
154 *frac = (NSEC_PER_SEC - quot * baud * UART_BIT_SAMPLE_CNT) * in pci1xxxx_get_divisor()
157 return quot; in pci1xxxx_get_divisor()
161 unsigned int quot, unsigned int frac) in pci1xxxx_set_divisor() argument
163 writel(FIELD_PREP(BAUD_CLOCK_DIV_INT_MSK, quot) | frac, in pci1xxxx_set_divisor()
H A D8250_port.c1057 unsigned short quot; in autoconfig_16550a() local
1062 quot <<= 3; in autoconfig_16550a()
2565 unsigned int quot; in serial8250_do_get_divisor() local
2600 quot = 0x8001; in serial8250_do_get_divisor()
2602 quot = 0x8002; in serial8250_do_get_divisor()
2612 quot++; in serial8250_do_get_divisor()
2614 return quot; in serial8250_do_get_divisor()
2654 quot = 1; in serial8250_do_set_divisor()
2669 serial_dl_write(up, quot); in serial8250_do_set_divisor()
3481 unsigned int quot; in probe_baud() local
[all …]
/openbmc/linux/drivers/tty/serial/
H 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()
H A 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()
202 else if (quot < (256 << 6)) in sio_quot_set()
578 unsigned int baud, quot; in serial_txx9_set_termios() local
618 quot = uart_get_divisor(up, baud); in serial_txx9_set_termios()
[all …]
H 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()
H A Dsunsu.c482 unsigned int iflag, unsigned int quot);
487 int quot, new_baud; in sunsu_change_mouse_baud() local
492 quot = up->port.uartclk / (16 * new_baud); in sunsu_change_mouse_baud()
494 sunsu_change_speed(&up->port, up->cflag, 0, quot); in sunsu_change_mouse_baud()
771 unsigned int iflag, unsigned int quot) in sunsu_change_speed() argument
810 quot ++; in sunsu_change_speed()
813 if ((up->port.uartclk / quot) < (2400 * 16)) in sunsu_change_speed()
901 unsigned int baud, quot; in sunsu_set_termios() local
907 quot = uart_get_divisor(port, baud); in sunsu_set_termios()
1188 int quot, baud; in sunsu_kbd_ms_init() local
[all …]
H 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()
H 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()
/openbmc/linux/drivers/tty/
H A Damiserial.c81 int quot; member
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()
625 quot = baud_base / baud; in change_speed()
629 if (!quot) in change_speed()
630 quot = baud_base / 9600; in change_speed()
631 info->quot = quot; in change_speed()
685 serper = quot - 1; in change_speed()
[all …]
/openbmc/linux/drivers/phy/intel/
H 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()
/openbmc/linux/drivers/accessibility/speakup/
H 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()
/openbmc/linux/arch/m68k/math-emu/
H A 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()

123