Home
last modified time | relevance | path

Searched refs:baud (Results 1 – 25 of 135) sorted by relevance

123456

/drivers/net/hamradio/
Dbaycom_ser_fdx.c115 unsigned int baud, baud_us, baud_arbdiv, baud_uartdiv, baud_dcdtimeout; member
388 if (bc->baud < 300 || bc->baud > 4800) { in ser12_open()
399 bc->hdrv.par.bitrate = bc->baud; in ser12_open()
400 bc->baud_us = 1000000/bc->baud; in ser12_open()
401 bc->baud_uartdiv = (115200/8)/bc->baud; in ser12_open()
434 bc_drvname, dev->base_addr, dev->irq, bc->baud, uart_str[u]); in ser12_open()
482 unsigned int baud; in baycom_setmode() local
485 baud = simple_strtoul(modestr+3, NULL, 10); in baycom_setmode()
486 if (baud >= 3 && baud <= 48) in baycom_setmode()
487 bc->baud = baud*100; in baycom_setmode()
[all …]
/drivers/usb/serial/
Dpl2303.c485 static speed_t pl2303_get_supported_baud_rate(speed_t baud) in pl2303_get_supported_baud_rate() argument
496 if (baud_sup[i] > baud) in pl2303_get_supported_baud_rate()
501 baud = baud_sup[i - 1]; in pl2303_get_supported_baud_rate()
502 else if (i > 0 && (baud_sup[i] - baud) > (baud - baud_sup[i - 1])) in pl2303_get_supported_baud_rate()
503 baud = baud_sup[i - 1]; in pl2303_get_supported_baud_rate()
505 baud = baud_sup[i]; in pl2303_get_supported_baud_rate()
507 return baud; in pl2303_get_supported_baud_rate()
515 speed_t baud) in pl2303_encode_baud_rate_direct() argument
517 put_unaligned_le32(baud, buf); in pl2303_encode_baud_rate_direct()
519 return baud; in pl2303_encode_baud_rate_direct()
[all …]
Dcp210x.c1068 unsigned int baud; in cp210x_get_termios() local
1072 &tty->termios.c_cflag, &baud); in cp210x_get_termios()
1073 tty_encode_baud_rate(tty, baud, baud); in cp210x_get_termios()
1077 cp210x_get_termios_port(port, &cflag, &baud); in cp210x_get_termios()
1091 u32 baud; in cp210x_get_termios_port() local
1096 cp210x_read_u32_reg(port, CP210X_GET_BAUDRATE, &baud); in cp210x_get_termios_port()
1098 dev_dbg(dev, "%s - baud rate = %d\n", __func__, baud); in cp210x_get_termios_port()
1099 *baudp = baud; in cp210x_get_termios_port()
1260 static speed_t cp210x_get_an205_rate(speed_t baud) in cp210x_get_an205_rate() argument
1265 if (baud <= cp210x_an205_table1[i].high) in cp210x_get_an205_rate()
[all …]
Dconsole.c58 int baud = 9600; in usb_console_setup() local
71 baud = simple_strtoul(options, NULL, 10); in usb_console_setup()
84 if (baud == 0) in usb_console_setup()
85 baud = 9600; in usb_console_setup()
164 tty_termios_encode_baud_rate(&tty->termios, baud, baud); in usb_console_setup()
Diuu_phoenix.c794 u32 baud; in iuu_uart_baud() local
807 baud = baud_base; in iuu_uart_baud()
809 if (baud < 1200 || baud > 230400) { in iuu_uart_baud()
813 if (baud > 977) { in iuu_uart_baud()
818 if (baud > 3906) { in iuu_uart_baud()
823 if (baud > 11718) { in iuu_uart_baud()
828 if (baud > 46875) { in iuu_uart_baud()
833 T1reload = 256 - (u8) (T1FrekvensHZ / (baud * 2)); in iuu_uart_baud()
897 int baud; in iuu_set_termios() local
901 baud = tty->termios.c_ospeed; in iuu_set_termios()
[all …]
Dftdi_sio.c1107 static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base);
1108 static unsigned short int ftdi_232am_baud_to_divisor(int baud);
1109 static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base);
1110 static u32 ftdi_232bm_baud_to_divisor(int baud);
1111 static u32 ftdi_2232h_baud_base_to_divisor(int baud, int base);
1112 static u32 ftdi_2232h_baud_to_divisor(int baud);
1159 static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base) in ftdi_232am_baud_base_to_divisor() argument
1163 int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud); in ftdi_232am_baud_base_to_divisor()
1179 static unsigned short int ftdi_232am_baud_to_divisor(int baud) in ftdi_232am_baud_to_divisor() argument
1181 return ftdi_232am_baud_base_to_divisor(baud, 48000000); in ftdi_232am_baud_to_divisor()
[all …]
/drivers/tty/serial/
Dsuncore.c89 int baud, bits, stop, cflag; in sunserial_console_termios() local
121 baud = simple_strtoul(s, NULL, 0); in sunserial_console_termios()
131 switch (baud) { in sunserial_console_termios()
145 default: baud = 9600; cflag |= B9600; break; in sunserial_console_termios()
172 int baud; member
187 for (i = 0; mouse_baud_table[i].baud != -1; i++) in suncore_mouse_baud_cflag_next()
192 if (mouse_baud_table[i].baud == -1) in suncore_mouse_baud_cflag_next()
195 *new_baud = mouse_baud_table[i].baud; in suncore_mouse_baud_cflag_next()
Dxilinx_uartps.c201 unsigned int baud; member
413 unsigned int baud, u32 *rbdiv, u32 *rcd, int *div8) in cdns_uart_calc_baud_divs() argument
421 if (baud < clk / ((CDNS_UART_BDIV_MAX + 1) * CDNS_UART_CD_MAX)) { in cdns_uart_calc_baud_divs()
429 cd = DIV_ROUND_CLOSEST(clk, baud * (bdiv + 1)); in cdns_uart_calc_baud_divs()
435 if (baud > calc_baud) in cdns_uart_calc_baud_divs()
436 bauderror = baud - calc_baud; in cdns_uart_calc_baud_divs()
438 bauderror = calc_baud - baud; in cdns_uart_calc_baud_divs()
448 if (((besterror * 100) / baud) < 3) in cdns_uart_calc_baud_divs()
449 bestbaud = baud; in cdns_uart_calc_baud_divs()
462 unsigned int baud) in cdns_uart_set_baud_rate() argument
[all …]
D21285.c249 unsigned int baud, quot, h_lcr, b; in serial21285_set_termios() local
265 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in serial21285_set_termios()
266 quot = uart_get_divisor(port, baud); in serial21285_set_termios()
301 uart_update_timeout(port, termios->c_cflag, baud); in serial21285_set_termios()
421 serial21285_get_options(struct uart_port *port, int *baud, in serial21285_get_options() argument
452 *baud = port->uartclk / (16 * (tmp + 1)); in serial21285_get_options()
459 int baud = 9600; in serial21285_console_setup() local
465 baud = 57600; in serial21285_console_setup()
473 uart_parse_options(options, &baud, &parity, &bits, &flow); in serial21285_console_setup()
475 serial21285_get_options(port, &baud, &parity, &bits); in serial21285_console_setup()
[all …]
Dar933x_uart.c253 unsigned int baud, in ar933x_uart_get_scale_step() argument
263 min_diff = baud; in ar933x_uart_get_scale_step()
268 tstep = baud * (tscale + 1); in ar933x_uart_get_scale_step()
275 diff = abs(ar933x_uart_get_baud(clk, tscale, tstep) - baud); in ar933x_uart_get_scale_step()
292 unsigned int baud, scale, step; in ar933x_uart_set_termios() local
314 baud = uart_get_baud_rate(port, new, old, up->min_baud, up->max_baud); in ar933x_uart_set_termios()
315 ar933x_uart_get_scale_step(port->uartclk, baud, &scale, &step); in ar933x_uart_set_termios()
328 uart_update_timeout(port, new->c_cflag, baud); in ar933x_uart_set_termios()
358 tty_termios_encode_baud_rate(new, baud, baud); in ar933x_uart_set_termios()
675 int baud = 115200; in ar933x_uart_console_setup() local
[all …]
Dvt8500_serial.c302 static int vt8500_set_baud_rate(struct uart_port *port, unsigned int baud) in vt8500_set_baud_rate() argument
310 div |= (uart_get_divisor(port, baud) - 1) & 0x3ff; in vt8500_set_baud_rate()
313 baud = port->uartclk / 16 / ((div & 0x3ff) + 1); in vt8500_set_baud_rate()
321 vt8500_write(port, mult_frac(baud, 4096, 1000000), VT8500_URBKR); in vt8500_set_baud_rate()
323 return baud; in vt8500_set_baud_rate()
365 unsigned int baud, lcr; in vt8500_set_termios() local
371 baud = uart_get_baud_rate(port, termios, old, 900, 921600); in vt8500_set_termios()
372 baud = vt8500_set_baud_rate(port, baud); in vt8500_set_termios()
374 tty_termios_encode_baud_rate(termios, baud, baud); in vt8500_set_termios()
416 uart_update_timeout(port, termios->c_cflag, baud); in vt8500_set_termios()
[all …]
Dsunsab.c644 static void calc_ebrg(int baud, int *n_ret, int *m_ret) in calc_ebrg() argument
648 if (baud == 0) { in calc_ebrg()
659 n = (SAB_BASE_BAUD * 10) / baud; in calc_ebrg()
680 unsigned int iflag, unsigned int baud, in sunsab_convert_to_sab() argument
713 calc_ebrg(baud, &n, &m); in sunsab_convert_to_sab()
717 up->tec_timeout = (10 * 1000000) / baud; in sunsab_convert_to_sab()
784 unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000); in sunsab_set_termios() local
785 unsigned int quot = uart_get_divisor(port, baud); in sunsab_set_termios()
788 sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud, quot); in sunsab_set_termios()
880 unsigned int baud, quot; in sunsab_console_setup() local
[all …]
Darc_uart.c97 unsigned long baud; member
359 unsigned int baud, uartl, uarth, hw_val; in arc_serial_set_termios() local
369 baud = uart_get_baud_rate(port, new, old, 0, 460800); in arc_serial_set_termios()
371 hw_val = port->uartclk / (uart->baud * 4) - 1; in arc_serial_set_termios()
396 tty_termios_encode_baud_rate(new, baud, baud); in arc_serial_set_termios()
398 uart_update_timeout(port, new->c_cflag, baud); in arc_serial_set_termios()
487 int baud = 115200; in arc_serial_console_setup() local
504 uart_parse_options(options, &baud, &parity, &bits, &flow); in arc_serial_console_setup()
510 return uart_set_options(port, co, baud, parity, bits, flow); in arc_serial_console_setup()
562 hw_val = port->uartclk / (dev->baud * 4) - 1; in arc_early_console_setup()
[all …]
Dmpc52xx_uart.c290 unsigned int baud; in mpc5200_psc_set_baudrate() local
294 baud = uart_get_baud_rate(port, new, old, in mpc5200_psc_set_baudrate()
297 divisor = (port->uartclk + 16 * baud) / (32 * baud); in mpc5200_psc_set_baudrate()
301 return baud; in mpc5200_psc_set_baudrate()
308 unsigned int baud; in mpc5200b_psc_set_baudrate() local
314 baud = uart_get_baud_rate(port, new, old, in mpc5200b_psc_set_baudrate()
317 divisor = (port->uartclk + 2 * baud) / (4 * baud); in mpc5200b_psc_set_baudrate()
321 if (divisor > 0xffff || baud <= 115200) { in mpc5200b_psc_set_baudrate()
327 return baud; in mpc5200b_psc_set_baudrate()
536 unsigned int baud; in mpc512x_psc_set_baudrate() local
[all …]
Dapbuart.c237 unsigned int baud, quot; in apbuart_set_termios() local
240 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16); in apbuart_set_termios()
241 if (baud == 0) in apbuart_set_termios()
245 quot = (uart_get_divisor(port, baud)) * 2; in apbuart_set_termios()
262 uart_update_timeout(port, termios->c_cflag, baud); in apbuart_set_termios()
451 apbuart_console_get_options(struct uart_port *port, int *baud, in apbuart_console_get_options() argument
469 *baud = port->uartclk / (16 * (quot + 1)); in apbuart_console_get_options()
476 int baud = 38400; in apbuart_console_setup() local
497 uart_parse_options(options, &baud, &parity, &bits, &flow); in apbuart_console_setup()
499 apbuart_console_get_options(port, &baud, &parity, &bits); in apbuart_console_setup()
[all …]
Ddz.c505 static int dz_encode_baud_rate(unsigned int baud) in dz_encode_baud_rate() argument
507 switch (baud) { in dz_encode_baud_rate()
566 unsigned int cflag, baud; in dz_set_termios() local
593 baud = uart_get_baud_rate(uport, termios, old_termios, 50, 9600); in dz_set_termios()
594 bflag = dz_encode_baud_rate(baud); in dz_set_termios()
596 baud = uart_get_baud_rate(uport, old_termios, NULL, 50, 9600); in dz_set_termios()
597 bflag = dz_encode_baud_rate(baud); in dz_set_termios()
599 baud = 9600; in dz_set_termios()
602 tty_termios_encode_baud_rate(termios, baud, baud); in dz_set_termios()
611 uart_update_timeout(uport, termios->c_cflag, baud); in dz_set_termios()
[all …]
Dmax3100.c105 int baud; /* current baud rate */ member
426 int baud = 0; in max3100_set_termios() local
435 baud = tty_termios_baud_rate(termios); in max3100_set_termios()
437 switch (baud) { in max3100_set_termios()
440 baud = s->baud; in max3100_set_termios()
475 baud = s->baud; in max3100_set_termios()
478 baud = s->baud; in max3100_set_termios()
480 tty_termios_encode_baud_rate(termios, baud, baud); in max3100_set_termios()
481 s->baud = baud; in max3100_set_termios()
530 uart_update_timeout(port, termios->c_cflag, baud); in max3100_set_termios()
[all …]
Daltera_uart.c181 unsigned int baud, baudclk; in altera_uart_set_termios() local
183 baud = uart_get_baud_rate(port, termios, old, 0, 4000000); in altera_uart_set_termios()
184 baudclk = port->uartclk / baud; in altera_uart_set_termios()
188 tty_termios_encode_baud_rate(termios, baud, baud); in altera_uart_set_termios()
191 uart_update_timeout(port, termios->c_cflag, baud); in altera_uart_set_termios()
460 int baud = CONFIG_SERIAL_ALTERA_UART_BAUDRATE; in altera_uart_console_setup() local
472 uart_parse_options(options, &baud, &parity, &bits, &flow); in altera_uart_console_setup()
474 return uart_set_options(port, co, baud, parity, bits, flow); in altera_uart_console_setup()
519 if (dev->baud) { in altera_uart_earlycon_setup()
520 unsigned int baudclk = port->uartclk / dev->baud; in altera_uart_earlycon_setup()
Dsccnxp.c270 int baud; member
303 static int sccnxp_set_baud(struct uart_port *port, int baud) in sccnxp_set_baud() argument
311 div_std = DIV_ROUND_CLOSEST(port->uartclk, 2 * 16 * baud); in sccnxp_set_baud()
314 sccnxp_update_best_err(baud, bestbaud, &besterr); in sccnxp_set_baud()
323 for (i = 0; baud_std[i].baud && besterr; i++) { in sccnxp_set_baud()
326 div_std = DIV_ROUND_CLOSEST(chip->freq_std, baud_std[i].baud); in sccnxp_set_baud()
328 if (!sccnxp_update_best_err(baud, tmp_baud, &besterr)) { in sccnxp_set_baud()
347 if (baud != bestbaud) in sccnxp_set_baud()
349 baud, bestbaud); in sccnxp_set_baud()
644 int baud; in sccnxp_set_termios() local
[all …]
Dtimbuart.c268 static int get_bindex(int baud) in get_bindex() argument
273 if (baud <= baudrates[i]) in get_bindex()
283 unsigned int baud; in timbuart_set_termios() local
287 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16); in timbuart_set_termios()
288 bindex = get_bindex(baud); in timbuart_set_termios()
293 baud = baudrates[bindex]; in timbuart_set_termios()
299 tty_termios_encode_baud_rate(termios, baud, baud); in timbuart_set_termios()
303 uart_update_timeout(port, termios->c_cflag, baud); in timbuart_set_termios()
/drivers/power/reset/
Dqnap-poweroff.c25 u32 baud; member
30 .baud = 19200,
35 .baud = 9600,
56 const unsigned divisor = ((tclk + (8 * cfg->baud)) / (16 * cfg->baud)); in qnap_power_off()
/drivers/tty/serial/8250/
D8250_mtk.c303 unsigned int baud, quot, fraction; in mtk8250_set_termios() local
327 baud = tty_termios_baud_rate(termios); in mtk8250_set_termios()
331 tty_termios_encode_baud_rate(termios, baud, baud); in mtk8250_set_termios()
346 baud = uart_get_baud_rate(port, termios, old, in mtk8250_set_termios()
350 if (baud < 115200) { in mtk8250_set_termios()
352 quot = uart_get_divisor(port, baud); in mtk8250_set_termios()
355 quot = DIV_ROUND_UP(port->uartclk, 256 * baud); in mtk8250_set_termios()
367 uart_update_timeout(port, termios->c_cflag, baud); in mtk8250_set_termios()
376 if (baud >= 115200) { in mtk8250_set_termios()
379 tmp = (port->uartclk / (baud * quot)) - 1; in mtk8250_set_termios()
[all …]
D8250_dwlib.c60 static unsigned int dw8250_get_divisor(struct uart_port *p, unsigned int baud, in dw8250_get_divisor() argument
63 unsigned int quot, rem, base_baud = baud * 16; in dw8250_get_divisor()
73 static void dw8250_set_divisor(struct uart_port *p, unsigned int baud, in dw8250_set_divisor() argument
77 serial8250_do_set_divisor(p, baud, quot, quot_frac); in dw8250_set_divisor()
D8250_exar.c166 static unsigned int xr17v35x_get_divisor(struct uart_port *p, unsigned int baud, in xr17v35x_get_divisor() argument
171 quot_16 = DIV_ROUND_CLOSEST(p->uartclk, baud); in xr17v35x_get_divisor()
177 static void xr17v35x_set_divisor(struct uart_port *p, unsigned int baud, in xr17v35x_set_divisor() argument
180 serial8250_do_set_divisor(p, baud, quot, quot_frac); in xr17v35x_set_divisor()
267 unsigned int baud = 1843200; in pci_fastcom335_setup() local
271 port->port.uartclk = baud * 16; in pci_fastcom335_setup()
315 unsigned int baud = 1843200; in pci_connect_tech_setup() local
317 port->port.uartclk = baud * 16; in pci_connect_tech_setup()
326 unsigned int baud = 921600; in pci_xr17c154_setup() local
328 port->port.uartclk = baud * 16; in pci_xr17c154_setup()
[all …]
D8250_fintek.c298 unsigned int baud = tty_termios_baud_rate(termios); in fintek_8250_set_termios() local
310 if (!baud) in fintek_8250_set_termios()
330 if (baud > baudrate_table[i] || baudrate_table[i] % baud != 0) in fintek_8250_set_termios()
350 baud = tty_termios_baud_rate(old); in fintek_8250_set_termios()
351 tty_termios_encode_baud_rate(termios, baud, baud); in fintek_8250_set_termios()

123456