Home
last modified time | relevance | path

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

12

/drivers/usb/serial/
Dark3116.c70 int quot; /* baudrate divisor */ member
178 priv->quot = calc_divisor(9600); in ark3116_port_probe()
179 ark3116_write_reg(serial, UART_DLL, priv->quot & 0xff); in ark3116_port_probe()
180 ark3116_write_reg(serial, UART_DLM, (priv->quot>>8) & 0xff); in ark3116_port_probe()
227 int quot; in ark3116_set_termios() local
264 quot = calc_divisor(9600); in ark3116_set_termios()
269 quot = calc_divisor(bps); in ark3116_set_termios()
273 quot = calc_divisor(bps); in ark3116_set_termios()
277 quot = calc_divisor(bps); in ark3116_set_termios()
288 __func__, hcr, lcr, quot); in ark3116_set_termios()
[all …]
/drivers/staging/speakup/
Dserialio.c19 int baud = 9600, quot = 0; in spk_serial_init() local
26 quot = ser->baud_base / baud; in spk_serial_init()
52 outb(quot & 0xff, ser->port + UART_DLL); /* LS of divisor */ in spk_serial_init()
53 outb(quot >> 8, ser->port + UART_DLM); /* MS of divisor */ in spk_serial_init()
/drivers/tty/serial/
D21285.c217 unsigned int baud, quot, h_lcr, b; in serial21285_set_termios() local
234 quot = uart_get_divisor(port, baud); in serial21285_set_termios()
235 b = port->uartclk / (16 * quot); in serial21285_set_termios()
293 quot -= 1; in serial21285_set_termios()
296 *CSR_L_UBRLCR = quot & 0xff; in serial21285_set_termios()
297 *CSR_M_UBRLCR = (quot >> 8) & 0x0f; in serial21285_set_termios()
Dsunsu.c485 unsigned int iflag, unsigned int quot);
490 int quot, new_baud; in sunsu_change_mouse_baud() local
495 quot = up->port.uartclk / (16 * new_baud); in sunsu_change_mouse_baud()
497 sunsu_change_speed(&up->port, up->cflag, 0, quot); in sunsu_change_mouse_baud()
768 unsigned int iflag, unsigned int quot) in sunsu_change_speed() argument
806 if ((quot & 0xff) == 0 && up->port.type == PORT_16C950 && in sunsu_change_speed()
808 quot ++; in sunsu_change_speed()
811 if ((up->port.uartclk / quot) < (2400 * 16)) in sunsu_change_speed()
832 uart_update_timeout(port, cflag, (port->uartclk / (16 * quot))); in sunsu_change_speed()
876 serial_outp(up, UART_DLL, quot & 0xff); /* LS of divisor */ in sunsu_change_speed()
[all …]
Dapbuart.c243 unsigned int baud, quot; in apbuart_set_termios() local
251 quot = (uart_get_divisor(port, baud)) * 2; in apbuart_set_termios()
284 quot -= 1; in apbuart_set_termios()
285 UART_PUT_SCAL(port, quot); in apbuart_set_termios()
463 unsigned int quot, status; in apbuart_console_get_options() local
475 quot = UART_GET_SCAL(port) / 8; in apbuart_console_get_options()
476 *baud = port->uartclk / (16 * (quot + 1)); in apbuart_console_get_options()
Dserial_txx9.c209 sio_quot_set(struct uart_txx9_port *up, int quot) in sio_quot_set() argument
211 quot >>= 1; in sio_quot_set()
212 if (quot < 256) in sio_quot_set()
213 sio_out(up, TXX9_SIBGR, quot | TXX9_SIBGR_BCLK_T0); in sio_quot_set()
214 else if (quot < (256 << 2)) in sio_quot_set()
215 sio_out(up, TXX9_SIBGR, (quot >> 2) | TXX9_SIBGR_BCLK_T2); in sio_quot_set()
216 else if (quot < (256 << 4)) in sio_quot_set()
217 sio_out(up, TXX9_SIBGR, (quot >> 4) | TXX9_SIBGR_BCLK_T4); in sio_quot_set()
218 else if (quot < (256 << 6)) in sio_quot_set()
219 sio_out(up, TXX9_SIBGR, (quot >> 6) | TXX9_SIBGR_BCLK_T6); in sio_quot_set()
[all …]
Dsa1100.c411 unsigned int utcr0, old_utcr3, baud, quot; in sa1100_set_termios() local
441 quot = uart_get_divisor(port, baud); in sa1100_set_termios()
496 quot -= 1; in sa1100_set_termios()
497 UART_PUT_UTCR1(sport, ((quot & 0xf00) >> 8)); in sa1100_set_termios()
498 UART_PUT_UTCR2(sport, (quot & 0xff)); in sa1100_set_termios()
736 unsigned int utcr0, quot; in sa1100_console_get_options() local
753 quot = UART_GET_UTCR2(sport) | UART_GET_UTCR1(sport) << 8; in sa1100_console_get_options()
754 quot &= 0xfff; in sa1100_console_get_options()
755 *baud = sport->port.uartclk / (16 * (quot + 1)); in sa1100_console_get_options()
Dnetx-serial.c338 unsigned int baud, quot; in netx_set_termios() local
371 quot = baud * 4096; in netx_set_termios()
372 quot /= 1000; in netx_set_termios()
373 quot *= 256; in netx_set_termios()
374 quot /= 100000; in netx_set_termios()
397 writel((quot>>8) & 0xff, port->membase + UART_BAUDDIV_MSB); in netx_set_termios()
398 writel(quot & 0xff, port->membase + UART_BAUDDIV_LSB); in netx_set_termios()
Damba-pl010.c381 unsigned int baud, quot; in pl010_set_termios() local
387 quot = uart_get_divisor(port, baud); in pl010_set_termios()
457 quot -= 1; in pl010_set_termios()
458 writel((quot & 0xf00) >> 8, uap->port.membase + UART010_LCRM); in pl010_set_termios()
459 writel(quot & 0xff, uap->port.membase + UART010_LCRL); in pl010_set_termios()
599 unsigned int lcr_h, quot; in pl010_console_get_options() local
615 quot = readb(uap->port.membase + UART010_LCRL) | in pl010_console_get_options()
617 *baud = uap->port.uartclk / (16 * (quot + 1)); in pl010_console_get_options()
Dclps711x.c254 unsigned int ubrlcr, baud, quot; in uart_clps711x_set_termios() local
264 quot = uart_get_divisor(port, baud); in uart_clps711x_set_termios()
309 clps_writel(ubrlcr | (quot - 1), UBRLCR(port)); in uart_clps711x_set_termios()
389 unsigned int ubrlcr, quot; in uart_clps711x_console_get_options() local
406 quot = ubrlcr & UBRLCR_BAUD_MASK; in uart_clps711x_console_get_options()
407 *baud = port->uartclk / (16 * (quot + 1)); in uart_clps711x_console_get_options()
Dsamsung.c613 unsigned int cnt, baud, quot, clk_sel, best_quot = 0; in s3c24xx_serial_getclk() local
643 quot = div / 16; in s3c24xx_serial_getclk()
646 quot = (rate + (8 * req_baud)) / (16 * req_baud); in s3c24xx_serial_getclk()
647 baud = rate / (quot * 16); in s3c24xx_serial_getclk()
649 quot--; in s3c24xx_serial_getclk()
657 best_quot = quot; in s3c24xx_serial_getclk()
698 unsigned int baud, quot, clk_sel = 0; in s3c24xx_serial_set_termios() local
714 quot = s3c24xx_serial_getclk(ourport, baud, &clk, &clk_sel); in s3c24xx_serial_set_termios()
716 quot = port->custom_divisor; in s3c24xx_serial_set_termios()
788 ulcon, quot, udivslot); in s3c24xx_serial_set_termios()
[all …]
Dpxa.c461 unsigned int baud, quot; in serial_pxa_set_termios() local
491 quot = uart_get_divisor(port, baud); in serial_pxa_set_termios()
493 if ((up->port.uartclk / quot) < (2400 * 16)) in serial_pxa_set_termios()
495 else if ((up->port.uartclk / quot) < (230400 * 16)) in serial_pxa_set_termios()
560 serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */ in serial_pxa_set_termios()
567 WARN_ON(dll != (quot & 0xff)); in serial_pxa_set_termios()
569 serial_out(up, UART_DLM, quot >> 8); /* MS of divisor */ in serial_pxa_set_termios()
Dmfd.c878 unsigned int baud, quot; in serial_hsu_set_termios() local
919 quot = 1; in serial_hsu_set_termios()
941 quot = 0; in serial_hsu_set_termios()
944 if (!quot) in serial_hsu_set_termios()
945 quot = uart_get_divisor(port, baud); in serial_hsu_set_termios()
947 if ((up->port.uartclk / quot) < (2400 * 16)) in serial_hsu_set_termios()
949 else if ((up->port.uartclk / quot) < (230400 * 16)) in serial_hsu_set_termios()
1005 serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */ in serial_hsu_set_termios()
1006 serial_out(up, UART_DLM, quot >> 8); /* MS of divisor */ in serial_hsu_set_termios()
Dsunsab.c665 unsigned int quot) in sunsab_convert_to_sab() argument
750 (up->port.uartclk / (16 * quot))); in sunsab_convert_to_sab()
768 unsigned int quot = uart_get_divisor(port, baud); in sunsab_set_termios() local
771 sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud, quot); in sunsab_set_termios()
867 unsigned int baud, quot; in sunsab_console_setup() local
923 quot = uart_get_divisor(&up->port, baud); in sunsab_console_setup()
924 sunsab_convert_to_sab(up, con->cflag, 0, baud, quot); in sunsab_console_setup()
Datmel_serial.c1131 unsigned int mode, imr, quot, baud; in atmel_set_termios() local
1140 quot = uart_get_divisor(port, baud); in atmel_set_termios()
1142 if (quot > 65535) { /* BRGR is 16-bit, so switch to slower clock */ in atmel_set_termios()
1143 quot /= 8; in atmel_set_termios()
1248 UART_PUT_BRGR(port, quot); in atmel_set_termios()
1571 unsigned int mr, quot; in atmel_console_get_options() local
1577 quot = UART_GET_BRGR(port) & ATMEL_US_CD; in atmel_console_get_options()
1578 if (!quot) in atmel_console_get_options()
1599 *baud = port->uartclk / (16 * (quot - 1)); in atmel_console_get_options()
Dmxs-auart.c894 unsigned int lcr_h, quot; in auart_console_get_options() local
914 quot = ((readl(port->membase + AUART_LINECTRL) in auart_console_get_options()
917 quot |= ((readl(port->membase + AUART_LINECTRL) in auart_console_get_options()
920 if (quot == 0) in auart_console_get_options()
921 quot = 1; in auart_console_get_options()
923 *baud = (port->uartclk << 2) / quot; in auart_console_get_options()
Dpnx8xxx_uart.c436 unsigned int lcr_fcr, old_ien, baud, quot; in pnx8xxx_set_termios() local
466 quot = uart_get_divisor(port, baud); in pnx8xxx_set_termios()
536 quot -= 1; in pnx8xxx_set_termios()
537 serial_out(sport, PNX8XXX_BAUD, quot); in pnx8xxx_set_termios()
/drivers/tty/
Damiserial.c106 int quot; member
662 int quot = 0, baud_base, baud; in change_speed() local
693 quot = info->custom_divisor; in change_speed()
697 quot = (2*baud_base / 269); in change_speed()
699 quot = baud_base / baud; in change_speed()
702 if (!quot && old_termios) { in change_speed()
711 quot = info->custom_divisor; in change_speed()
715 quot = (2*baud_base / 269); in change_speed()
717 quot = baud_base / baud; in change_speed()
721 if (!quot) in change_speed()
[all …]
Dmxser.c574 int quot = 0, baud; in mxser_set_baud() local
584 quot = 2 * info->baud_base / 269; in mxser_set_baud()
587 quot = info->baud_base / newspd; in mxser_set_baud()
588 if (quot == 0) in mxser_set_baud()
589 quot = 1; in mxser_set_baud()
590 baud = info->baud_base/quot; in mxser_set_baud()
593 quot = 0; in mxser_set_baud()
596 info->timeout = ((info->xmit_fifo_size * HZ * 10 * quot) / info->baud_base); in mxser_set_baud()
599 if (quot) { in mxser_set_baud()
612 outb(quot & 0xff, info->ioaddr + UART_DLL); /* LS of divisor */ in mxser_set_baud()
[all …]
/drivers/tty/serial/8250/
D8250_early.c110 unsigned int quot; in probe_baud() local
118 quot = (dlm << 8) | dll; in probe_baud()
119 return (port->uartclk / 16) / quot; in probe_baud()
D8250_core.c940 unsigned short quot; in autoconfig_16550a() local
944 quot = serial_dl_read(up); in autoconfig_16550a()
945 quot <<= 3; in autoconfig_16550a()
948 serial_dl_write(up, quot); in autoconfig_16550a()
2250 unsigned int quot; in serial8250_get_divisor() local
2258 quot = 0x8001; in serial8250_get_divisor()
2261 quot = 0x8002; in serial8250_get_divisor()
2263 quot = uart_get_divisor(port, baud); in serial8250_get_divisor()
2265 return quot; in serial8250_get_divisor()
2276 unsigned int baud, quot; in serial8250_do_set_termios() local
[all …]
/drivers/staging/sb105x/
Dsb_ser_core.h309 unsigned int quot; in sb_uart_get_divisor() local
312 quot = port->custom_divisor; in sb_uart_get_divisor()
314 quot = (port->uartclk + (8 * baud)) / (16 * baud); in sb_uart_get_divisor()
316 return quot; in sb_uart_get_divisor()
/drivers/isdn/hisax/
Delsa_ser.c110 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()
/drivers/net/wireless/iwlwifi/dvm/
Ddevices.c102 u32 quot; in iwl_usecs_to_beacons() local
109 quot = (usec / interval) & in iwl_usecs_to_beacons()
115 return (quot << IWLAGN_EXT_BEACON_TIME_POS) + rem; in iwl_usecs_to_beacons()
/drivers/net/irda/
Dbfin_sir.c96 unsigned int quot; in bfin_sir_set_speed() local
115 quot = (port->clk + (8 * speed)) / (16 * speed); in bfin_sir_set_speed()
136 UART_PUT_DLL(port, quot & 0xFF); in bfin_sir_set_speed()
137 UART_PUT_DLH(port, (quot >> 8) & 0xFF); in bfin_sir_set_speed()

12