/drivers/tty/serial/cpm_uart/ |
H A D | cpm_uart_cpm1.h | 13 static inline void cpm_set_brg(int brg, int baud) argument 15 cpm_setbrg(brg, baud);
|
H A D | cpm_uart_cpm2.h | 13 static inline void cpm_set_brg(int brg, int baud) argument 15 cpm_setbrg(brg, baud);
|
/drivers/usb/serial/ |
H A D | cp210x.c | 407 * Quantises the baud rate as per AN205 Table 1 409 static unsigned int cp210x_quantise_baudrate(unsigned int baud) argument 411 if (baud <= 300) 412 baud = 300; 413 else if (baud <= 600) baud = 600; 414 else if (baud <= 1200) baud = 1200; 415 else if (baud <= 1800) baud 483 unsigned int baud; local 505 unsigned int baud; local 643 u32 baud; local [all...] |
H A D | pl2303.c | 322 * Returns the nearest supported baud rate that can be set directly without 325 static speed_t pl2303_get_supported_baud_rate(speed_t baud) argument 336 if (baud_sup[i] > baud) 341 baud = baud_sup[i - 1]; 342 else if (i > 0 && (baud_sup[i] - baud) > (baud - baud_sup[i - 1])) 343 baud = baud_sup[i - 1]; 345 baud = baud_sup[i]; 347 return baud; 351 * NOTE: If unsupported baud rate 354 pl2303_encode_baud_rate_direct(unsigned char buf[4], speed_t baud) argument 362 pl2303_encode_baud_rate_divisor(unsigned char buf[4], speed_t baud) argument 391 speed_t baud; local [all...] |
H A D | console.c | 58 int baud = 9600; local 71 baud = simple_strtoul(options, NULL, 10); 84 if (baud == 0) 85 baud = 9600; 159 tty_termios_encode_baud_rate(&tty->termios, baud, baud);
|
H A D | iuu_phoenix.c | 66 u32 baud; member in struct:iuu_private 794 u32 baud; local 806 /*baud = (((priv->clk / 35) * baud_base) / 100000); */ 807 baud = baud_base; 809 if (baud < 1200 || baud > 230400) { 813 if (baud > 977) { 818 if (baud > 3906) { 823 if (baud > 11718) { 828 if (baud > 4687 897 int baud; local 971 int baud; local [all...] |
H A D | ir-usb.c | 275 * a baud rate change. 295 * contains a busy indicator and baud rate change. 323 speed_t baud; local 326 baud = tty_get_baud_rate(tty); 329 * FIXME, we should compare the baud request against the 334 switch (baud) { 364 baud = 9600; 374 tty_encode_baud_rate(tty, baud, baud); 377 * send the baud chang [all...] |
/drivers/tty/serial/8250/ |
H A D | 8250_mtk.c | 44 unsigned int baud, quot; local 64 baud = uart_get_baud_rate(port, termios, old, 68 if (baud <= 115200) { 70 quot = uart_get_divisor(port, baud); 71 } else if (baud <= 576000) { 75 if ((baud == 500000) || (baud == 576000)) 76 baud = 460800; 77 quot = DIV_ROUND_CLOSEST(port->uartclk, 4 * baud); 82 if (baud > [all...] |
H A D | 8250_early.c | 133 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud); 147 if (!device->baud) { 148 device->baud = probe_baud(&device->port); 150 device->baud);
|
/drivers/tty/serial/ |
H A D | suncore.c | 89 int baud, bits, stop, cflag; local 120 baud = simple_strtoul(s, NULL, 0); 130 switch (baud) { 144 default: baud = 9600; cflag |= B9600; break; 169 /* Sun serial MOUSE auto baud rate detection. */ 171 int baud; member in struct:mouse_baud_cflag 186 for (i = 0; mouse_baud_table[i].baud != -1; i++) 191 if (mouse_baud_table[i].baud == -1) 194 *new_baud = mouse_baud_table[i].baud; 200 /* Basically, when the baud rat [all...] |
H A D | mrst_max3110.c | 67 u32 baud; member in struct:uart_max3110 105 else if (max->baud) 106 x.speed_hz = max->baud; 210 int baud = 115200; local 226 uart_parse_options(options, &baud, &parity, &bits, &flow); 228 return uart_set_options(&max->port, co, baud, parity, bits, flow); 576 unsigned int baud, parity = 0; local 595 baud = uart_get_baud_rate(port, termios, old, 0, 230400); 598 switch (baud) { 633 /* Pick the previous baud rat [all...] |
H A D | ar933x_uart.c | 199 unsigned int baud, 209 min_diff = baud; 214 tstep = baud * (tscale + 1); 221 diff = abs(ar933x_uart_get_baud(clk, tscale, tstep) - baud); 237 unsigned int baud, scale, step; local 259 baud = uart_get_baud_rate(port, new, old, up->min_baud, up->max_baud); 260 ar933x_uart_get_scale_step(port->uartclk, baud, &scale, &step); 273 uart_update_timeout(port, new->c_cflag, baud); 299 tty_termios_encode_baud_rate(new, baud, baud); 198 ar933x_uart_get_scale_step(unsigned int clk, unsigned int baud, unsigned int *scale, unsigned int *step) argument 573 int baud = 115200; local 624 unsigned int baud; local [all...] |
H A D | arc_uart.c | 104 unsigned long baud; member in struct:arc_uart_port 366 unsigned int baud, uartl, uarth, hw_val; local 370 * Use the generic handler so that any specially encoded baud rates 376 baud = uart_get_baud_rate(port, new, old, 0, 460800); 378 hw_val = port->uartclk / (uart->baud * 4) - 1; 403 tty_termios_encode_baud_rate(new, baud, baud); 405 uart_update_timeout(port, new->c_cflag, baud); 494 int baud = 115200; local 511 uart_parse_options(options, &baud, [all...] |
H A D | xilinx_uartps.c | 146 /* baud dividers min/max values */ 156 * @baud: Current baud rate 163 unsigned int baud; member in struct:cdns_uart 310 * cdns_uart_calc_baud_divs - Calculate baud rate divisors 312 * @baud: Desired baud rate 316 * Return: baud rate, requested baud when possible, or actual baud whe 329 cdns_uart_calc_baud_divs(unsigned int clk, unsigned int baud, u32 *rbdiv, u32 *rcd, int *div8) argument 378 cdns_uart_set_baud_rate(struct uart_port *port, unsigned int baud) argument 625 unsigned int baud, minbaud, maxbaud; local 1126 int baud = 9600; local [all...] |
H A D | 21285.c | 48 * BAUD_BASE / baud - 1 49 * However, typically BAUD_BASE is not divisible by baud, so 52 * int(BAUD_BASE / baud - 0.5) -> 53 * int(BAUD_BASE / baud - (baud >> 1) / baud) -> 54 * int((BAUD_BASE - (baud >> 1)) / baud) 213 unsigned int baud, quot, h_lcr, b; local 229 baud 385 serial21285_get_options(struct uart_port *port, int *baud, int *parity, int *bits) argument 423 int baud = 9600; local [all...] |
H A D | netx-serial.c | 340 unsigned int baud, quot; local 372 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 373 quot = baud * 4096; 380 uart_update_timeout(port, termios->c_cflag, baud); 551 netx_console_get_options(struct uart_port *port, int *baud, argument 556 *baud = (readl(port->membase + UART_BAUDDIV_MSB) << 8) | 558 *baud *= 1000; 559 *baud /= 4096; 560 *baud *= 1000; 561 *baud / 596 int baud = 9600; local [all...] |
H A D | vt8500_serial.c | 315 static int vt8500_set_baud_rate(struct uart_port *port, unsigned int baud) argument 323 div |= (uart_get_divisor(port, baud) - 1) & 0x3ff; 325 /* Effective baud rate */ 326 baud = port->uartclk / 16 / ((div & 0x3ff) + 1); 333 /* Break signal timing depends on baud rate, update accordingly */ 334 vt8500_write(port, mult_frac(baud, 4096, 1000000), VT8500_URBKR); 336 return baud; 378 unsigned int baud, lcr; local 383 /* calculate and set baud rate */ 384 baud 533 int baud = 9600; local [all...] |
H A D | timbuart.c | 123 "%s - total written %d bytes, CTL: %x, RTS: %x, baud: %x\n", 278 static int get_bindex(int baud) argument 283 if (baud <= baudrates[i]) 293 unsigned int baud; local 297 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16); 298 bindex = get_bindex(baud); 303 baud = baudrates[bindex]; 309 tty_termios_encode_baud_rate(termios, baud, baud); 313 uart_update_timeout(port, termios->c_cflag, baud); [all...] |
H A D | sunsab.c | 9 * Fixed to use tty_get_baud_rate, and to allow for arbitrary baud 88 #define SAB82532_MAX_TEC_TIMEOUT 200000 /* 1 character time (at 50 baud) */ 89 #define SAB82532_MAX_CEC_TIMEOUT 50000 /* 2.5 TX CLKs (at 50 baud) */ 615 * transmitted at 9600 baud during shutdown (regardless of the 637 static void calc_ebrg(int baud, int *n_ret, int *m_ret) argument 641 if (baud == 0) { 652 n = (SAB_BASE_BAUD * 10) / baud; 673 unsigned int iflag, unsigned int baud, 706 calc_ebrg(baud, &n, &m); 710 up->tec_timeout = (10 * 1000000) / baud; 672 sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cflag, unsigned int iflag, unsigned int baud, unsigned int quot) argument 776 unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000); local 871 unsigned int baud, quot; local [all...] |
H A D | msm_serial.c | 365 msm_find_best_baud(struct uart_port *port, unsigned int baud) argument 388 divisor = uart_get_divisor(port, baud); 397 static int msm_set_baud_rate(struct uart_port *port, unsigned int baud) argument 403 entry = msm_find_best_baud(port, baud); 430 return baud; 523 unsigned int baud, mr; local 527 /* calculate and set baud rate */ 528 baud = uart_get_baud_rate(port, termios, old, 300, 115200); 529 baud = msm_set_baud_rate(port, baud); 924 int baud = 0, flow, bits, parity; local [all...] |
H A D | serial_ks8695.c | 386 unsigned int baud, quot; local 391 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 392 quot = uart_get_divisor(port, baud); 435 uart_update_timeout(port, termios->c_cflag, baud); 471 /* Set baud rate */ 578 static void __init ks8695_console_get_options(struct uart_port *port, int *baud, int *parity, int *bits) argument 609 *baud = port->uartclk / (UART_GET_BRDR(port) & 0x0FFF); 610 *baud /= 16; 611 *baud &= 0xFFFFFFF0; 617 int baud local [all...] |
H A D | sccnxp.c | 251 int baud; member in struct:__anon6961 284 static int sccnxp_set_baud(struct uart_port *port, int baud) argument 287 int div_std, tmp_baud, bestbaud = baud, besterr = -1; 291 /* Find best baud from table */ 292 for (i = 0; baud_std[i].baud && besterr; i++) { 295 div_std = DIV_ROUND_CLOSEST(chip->freq_std, baud_std[i].baud); 297 if (!sccnxp_update_best_err(baud, tmp_baud, &besterr)) { 316 if (baud != bestbaud) 318 baud, bestbaud); 613 int baud; local 828 int baud = 9600, bits = 8, parity = 'n', flow = 'n'; local [all...] |
/drivers/power/reset/ |
H A D | qnap-poweroff.c | 29 u32 baud; member in struct:power_off_cfg 34 .baud = 19200, 39 .baud = 9600, 60 const unsigned divisor = ((tclk + (8 * cfg->baud)) / (16 * cfg->baud));
|
/drivers/net/hamradio/ |
H A D | baycom_ser_fdx.c | 29 * ser12: This is a very simple 1200 baud AFSK modem. The modem consists only 41 * hsk: This is a 4800 baud FSK modem, designed for TNC use. It works fine 51 * '#' denotes the baud rate / 100, eg. ser12* is '1200 baud, soft DCD' 53 * baud baud rate (between 300 and 4800) 129 unsigned int baud, baud_us, baud_arbdiv, baud_uartdiv, baud_dcdtimeout; member in struct:baycom_state 427 if (bc->baud < 300 || bc->baud > 4800) { 438 bc->hdrv.par.bitrate = bc->baud; 521 unsigned int baud; local 611 static int baud[NR_PORTS] = { [0 ... NR_PORTS-1] = 1200 }; variable [all...] |
/drivers/firmware/ |
H A D | pcdp.c | 33 if (uart->baud) { 34 p += sprintf(p, ",%llu", uart->baud);
|