| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/serial/ |
| D | nvidia,tegra20-hsuart.txt | 27 - nvidia,adjust-baud-rates: List of entries providing percentage of baud rate 31 When baud rate set on controller falls within the range mentioned in this 32 field, baud rate will be adjusted by percentage mentioned here. 34 Increase baud rate by 2% when set baud rate falls within range 9600 to 115200 36 Baud Rate tolerance: 37 Standard UART devices are expected to have tolerance for baud rate error by 39 Tegra186 chip has a known hardware issue. UART Rx baud rate tolerance level 41 corruption/invalid framing errors. Parker errata suggests adjusting baud 45 its spec) for valid range and Tegra baud rate has to be set above actual 46 Tx baud rate observed. To do this we use nvidia,adjust-baud-rates [all …]
|
| /kernel/linux/linux-4.19/drivers/tty/serial/8250/ |
| D | 8250_mtk.c | 37 unsigned int baud, quot; in mtk8250_set_termios() local 40 * Store the requested baud rate before calling the generic 8250 in mtk8250_set_termios() 42 * no higher than (uartclk / 16) so the baud will be clamped if it in mtk8250_set_termios() 44 * higher than that, therefore we'll get original baud rate back in mtk8250_set_termios() 48 baud = tty_termios_baud_rate(termios); in mtk8250_set_termios() 52 tty_termios_encode_baud_rate(termios, baud, baud); in mtk8250_set_termios() 67 baud = uart_get_baud_rate(port, termios, old, in mtk8250_set_termios() 71 if (baud <= 115200) { in mtk8250_set_termios() 73 quot = uart_get_divisor(port, baud); in mtk8250_set_termios() 74 } else if (baud <= 576000) { in mtk8250_set_termios() [all …]
|
| /kernel/linux/linux-5.10/arch/mips/pic32/pic32mzda/ |
| D | early_console.c | 50 static void __init configure_uart(char port, int baud) in configure_uart() argument 57 __raw_writel(((pbclk / baud) / 16) - 1, uart_base + U_BRG(port)); in configure_uart() 63 static void __init setup_early_console(char port, int baud) in setup_early_console() argument 69 configure_uart(console_port, baud); in setup_early_console() 111 int baud = -1; in get_baud_from_cmdline() local 124 baud = 0; in get_baud_from_cmdline() 126 baud = baud * 10 + *s++ - '0'; in get_baud_from_cmdline() 130 return baud; in get_baud_from_cmdline() 136 int baud = -1; in fw_init_early_console() local 140 baud = get_baud_from_cmdline(arch_cmdline); in fw_init_early_console() [all …]
|
| /kernel/linux/linux-4.19/arch/mips/pic32/pic32mzda/ |
| D | early_console.c | 58 static void __init configure_uart(char port, int baud) in configure_uart() argument 65 __raw_writel(((pbclk / baud) / 16) - 1, uart_base + U_BRG(port)); in configure_uart() 71 static void __init setup_early_console(char port, int baud) in setup_early_console() argument 77 configure_uart(console_port, baud); in setup_early_console() 119 int baud = -1; in get_baud_from_cmdline() local 132 baud = 0; in get_baud_from_cmdline() 134 baud = baud * 10 + *s++ - '0'; in get_baud_from_cmdline() 138 return baud; in get_baud_from_cmdline() 144 int baud = -1; in fw_init_early_console() local 148 baud = get_baud_from_cmdline(arch_cmdline); in fw_init_early_console() [all …]
|
| /kernel/linux/linux-4.19/arch/m68k/atari/ |
| D | debug.c | 168 int baud = cflag & CBAUD; in atari_init_mfp_port() local 173 baud += B38400; in atari_init_mfp_port() 174 if (baud < B1200 || baud > B38400+2) in atari_init_mfp_port() 175 baud = B9600; /* use default 9600bps for non-implemented rates */ in atari_init_mfp_port() 176 baud -= B1200; /* baud_table[] starts at 1200bps */ in atari_init_mfp_port() 181 st_mfp.tim_dt_d = baud_table[baud]; in atari_init_mfp_port() 218 int baud = cflag & CBAUD; in atari_init_scc_port() local 222 baud += B38400; in atari_init_scc_port() 223 if (baud < B1200 || baud > B38400+2) in atari_init_scc_port() 224 baud = B9600; /* use default 9600bps for non-implemented rates */ in atari_init_scc_port() [all …]
|
| /kernel/linux/linux-5.10/arch/m68k/atari/ |
| D | debug.c | 168 int baud = cflag & CBAUD; in atari_init_mfp_port() local 173 baud += B38400; in atari_init_mfp_port() 174 if (baud < B1200 || baud > B38400+2) in atari_init_mfp_port() 175 baud = B9600; /* use default 9600bps for non-implemented rates */ in atari_init_mfp_port() 176 baud -= B1200; /* baud_table[] starts at 1200bps */ in atari_init_mfp_port() 181 st_mfp.tim_dt_d = baud_table[baud]; in atari_init_mfp_port() 218 int baud = cflag & CBAUD; in atari_init_scc_port() local 222 baud += B38400; in atari_init_scc_port() 223 if (baud < B1200 || baud > B38400+2) in atari_init_scc_port() 224 baud = B9600; /* use default 9600bps for non-implemented rates */ in atari_init_scc_port() [all …]
|
| /kernel/linux/linux-4.19/arch/x86/boot/ |
| D | early_serial_console.c | 26 static void early_serial_init(int port, int baud) in early_serial_init() argument 36 divisor = 115200 / baud; in early_serial_init() 48 int baud = DEFAULT_BAUD; in parse_earlyprintk() local 92 baud = simple_strtoull(arg + pos, &e, 0); in parse_earlyprintk() 93 if (baud == 0 || arg + pos == e) in parse_earlyprintk() 94 baud = DEFAULT_BAUD; in parse_earlyprintk() 98 early_serial_init(port, baud); in parse_earlyprintk() 120 int baud = DEFAULT_BAUD; in parse_console_uart8250() local 140 baud = simple_strtoull(options + 1, &options, 0); in parse_console_uart8250() 142 baud = probe_baud(port); in parse_console_uart8250() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/boot/ |
| D | early_serial_console.c | 26 static void early_serial_init(int port, int baud) in early_serial_init() argument 36 divisor = 115200 / baud; in early_serial_init() 48 int baud = DEFAULT_BAUD; in parse_earlyprintk() local 92 baud = simple_strtoull(arg + pos, &e, 0); in parse_earlyprintk() 93 if (baud == 0 || arg + pos == e) in parse_earlyprintk() 94 baud = DEFAULT_BAUD; in parse_earlyprintk() 98 early_serial_init(port, baud); in parse_earlyprintk() 120 int baud = DEFAULT_BAUD; in parse_console_uart8250() local 140 baud = simple_strtoull(options + 1, &options, 0); in parse_console_uart8250() 142 baud = probe_baud(port); in parse_console_uart8250() [all …]
|
| /kernel/linux/linux-4.19/drivers/tty/serial/ |
| D | suncore.c | 89 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() 170 /* Sun serial MOUSE auto baud rate detection. */ 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() 201 /* Basically, when the baud rate is wrong the mouse spits out [all …]
|
| D | xilinx_uartps.c | 57 #define CDNS_UART_BAUDGEN 0x18 /* Baud Rate Generator */ 64 #define CDNS_UART_BAUDDIV 0x34 /* Baud Rate Divider */ 174 /* baud dividers min/max values */ 185 * @baud: Current baud rate 193 unsigned int baud; member 381 * cdns_uart_calc_baud_divs - Calculate baud rate divisors 383 * @baud: Desired baud rate 387 * Return: baud rate, requested baud when possible, or actual baud when there 390 * Formula to obtain baud rate is 397 * baud rate generate register [all …]
|
| D | 21285.c | 49 * BAUD_BASE / baud - 1 50 * However, typically BAUD_BASE is not divisible by baud, so 53 * int(BAUD_BASE / baud - 0.5) -> 54 * int(BAUD_BASE / baud - (baud >> 1) / baud) -> 55 * int((BAUD_BASE - (baud >> 1)) / baud) 214 unsigned int baud, quot, h_lcr, b; in serial21285_set_termios() local 230 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in serial21285_set_termios() 231 quot = uart_get_divisor(port, baud); in serial21285_set_termios() 266 uart_update_timeout(port, termios->c_cflag, baud); in serial21285_set_termios() 386 serial21285_get_options(struct uart_port *port, int *baud, in serial21285_get_options() argument [all …]
|
| /kernel/linux/linux-5.10/drivers/tty/serial/ |
| D | suncore.c | 89 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() 170 /* Sun serial MOUSE auto baud rate detection. */ 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() 201 /* Basically, when the baud rate is wrong the mouse spits out [all …]
|
| D | 21285.c | 84 * BAUD_BASE / baud - 1 85 * However, typically BAUD_BASE is not divisible by baud, so 88 * int(BAUD_BASE / baud - 0.5) -> 89 * int(BAUD_BASE / baud - (baud >> 1) / baud) -> 90 * int((BAUD_BASE - (baud >> 1)) / baud) 249 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 [all …]
|
| D | xilinx_uartps.c | 53 #define CDNS_UART_BAUDGEN 0x18 /* Baud Rate Generator */ 60 #define CDNS_UART_BAUDDIV 0x34 /* Baud Rate Divider */ 180 /* baud dividers min/max values */ 192 * @baud: Current baud rate 201 unsigned int baud; member 391 * cdns_uart_calc_baud_divs - Calculate baud rate divisors 393 * @baud: Desired baud rate 397 * Return: baud rate, requested baud when possible, or actual baud when there 400 * Formula to obtain baud rate is 407 * baud rate generate register [all …]
|
| /kernel/linux/linux-4.19/drivers/usb/serial/ |
| D | pl2303.c | 395 * Returns the nearest supported baud rate that can be set directly without 398 static speed_t pl2303_get_supported_baud_rate(speed_t baud) in pl2303_get_supported_baud_rate() argument 409 if (baud_sup[i] > baud) in pl2303_get_supported_baud_rate() 414 baud = baud_sup[i - 1]; in pl2303_get_supported_baud_rate() 415 else if (i > 0 && (baud_sup[i] - baud) > (baud - baud_sup[i - 1])) in pl2303_get_supported_baud_rate() 416 baud = baud_sup[i - 1]; in pl2303_get_supported_baud_rate() 418 baud = baud_sup[i]; in pl2303_get_supported_baud_rate() 420 return baud; in pl2303_get_supported_baud_rate() 424 * NOTE: If unsupported baud rates are set directly, the PL2303 seems to 425 * use 9600 baud. [all …]
|
| /kernel/linux/linux-5.10/drivers/usb/serial/ |
| D | pl2303.c | 480 * Returns the nearest supported baud rate that can be set directly without 483 static speed_t pl2303_get_supported_baud_rate(speed_t baud) in pl2303_get_supported_baud_rate() argument 494 if (baud_sup[i] > baud) in pl2303_get_supported_baud_rate() 499 baud = baud_sup[i - 1]; in pl2303_get_supported_baud_rate() 500 else if (i > 0 && (baud_sup[i] - baud) > (baud - baud_sup[i - 1])) in pl2303_get_supported_baud_rate() 501 baud = baud_sup[i - 1]; in pl2303_get_supported_baud_rate() 503 baud = baud_sup[i]; in pl2303_get_supported_baud_rate() 505 return baud; in pl2303_get_supported_baud_rate() 509 * NOTE: If unsupported baud rates are set directly, the PL2303 seems to 510 * use 9600 baud. [all …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/serial/ |
| D | slave-device.txt | 19 - max-speed : The maximum baud rate the device operates at. This should 23 baud rates. 24 - current-speed : The current baud rate the device operates at. This should 26 the baud rate of the slave device. 28 * device supports auto-baud 31 * device baud rate is configured by its firmware but
|
| /kernel/linux/linux-5.10/drivers/tty/serial/8250/ |
| D | 8250_dwlib.c | 53 * quot = div(I) = clk / (16 * baud) 56 * let rem = clk % (16 * baud) 57 * we have: div(F) * (16 * baud) = rem 58 * so frac = 2^dlf_size * rem / (16 * baud) = (rem << dlf_size) / (16 * baud) 60 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()
|
| /kernel/linux/linux-5.10/drivers/net/hamradio/ |
| D | baycom_ser_fdx.c | 15 * ser12: This is a very simple 1200 baud AFSK modem. The modem consists only 27 * hsk: This is a 4800 baud FSK modem, designed for TNC use. It works fine 37 * '#' denotes the baud rate / 100, eg. ser12* is '1200 baud, soft DCD' 39 * baud baud rate (between 300 and 4800) 115 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() 416 * the baud rate is set to produce 100 ints/sec in ser12_open() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/kernel/ |
| D | early_printk.c | 151 unsigned long baud = DEFAULT_BAUD; in early_serial_init() local 177 baud = simple_strtoull(s, &e, 0); in early_serial_init() 179 if (baud == 0 || s == e) in early_serial_init() 180 baud = DEFAULT_BAUD; in early_serial_init() 183 /* Convert from baud to divisor value */ in early_serial_init() 184 divisor = 115200 / baud; in early_serial_init() 213 * The rest of the param should be "[force],B:D.F,baud", where B, D & F describe 220 unsigned long baud = DEFAULT_BAUD; in early_pci_serial_init() local 255 /* A baud might be following */ in early_pci_serial_init() 308 if (kstrtoul(s, 0, &baud) < 0 || baud == 0) in early_pci_serial_init() [all …]
|
| /kernel/linux/linux-4.19/drivers/net/hamradio/ |
| 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) 130 unsigned int baud, baud_us, baud_arbdiv, baud_uartdiv, baud_dcdtimeout; member 429 if (bc->baud < 300 || bc->baud > 4800) { in ser12_open() 440 bc->hdrv.par.bitrate = bc->baud; in ser12_open() 441 bc->baud_us = 1000000/bc->baud; in ser12_open() 442 bc->baud_uartdiv = (115200/8)/bc->baud; in ser12_open() 457 * the baud rate is set to produce 100 ints/sec in ser12_open() [all …]
|
| /kernel/linux/linux-5.10/arch/mips/include/asm/netlogic/xlp-hal/ |
| D | uart.h | 54 #define BAUD_DIVISOR(baud) (BASE_BAUD / baud) argument 103 nlm_uart_set_baudrate(uint64_t base, int baud) in nlm_uart_set_baudrate() argument 109 /* enable divisor register, and write baud values */ in nlm_uart_set_baudrate() 112 (BAUD_DIVISOR(baud) & 0xff)); in nlm_uart_set_baudrate() 114 ((BAUD_DIVISOR(baud) >> 8) & 0xff)); in nlm_uart_set_baudrate() 155 nlm_uart_init(uint64_t base, int baud, int databits, int stopbits, in nlm_uart_init() argument 181 nlm_uart_set_baudrate(base, baud); in nlm_uart_init()
|
| /kernel/linux/linux-4.19/arch/mips/include/asm/netlogic/xlp-hal/ |
| D | uart.h | 54 #define BAUD_DIVISOR(baud) (BASE_BAUD / baud) argument 103 nlm_uart_set_baudrate(uint64_t base, int baud) in nlm_uart_set_baudrate() argument 109 /* enable divisor register, and write baud values */ in nlm_uart_set_baudrate() 112 (BAUD_DIVISOR(baud) & 0xff)); in nlm_uart_set_baudrate() 114 ((BAUD_DIVISOR(baud) >> 8) & 0xff)); in nlm_uart_set_baudrate() 155 nlm_uart_init(uint64_t base, int baud, int databits, int stopbits, in nlm_uart_init() argument 181 nlm_uart_set_baudrate(base, baud); in nlm_uart_init()
|
| /kernel/linux/linux-4.19/arch/x86/kernel/ |
| D | early_printk.c | 154 unsigned long baud = DEFAULT_BAUD; in early_serial_init() local 180 baud = simple_strtoull(s, &e, 0); in early_serial_init() 182 if (baud == 0 || s == e) in early_serial_init() 183 baud = DEFAULT_BAUD; in early_serial_init() 186 /* Convert from baud to divisor value */ in early_serial_init() 187 divisor = 115200 / baud; in early_serial_init() 216 * The rest of the param should be "[force],B:D.F,baud", where B, D & F describe 223 unsigned long baud = DEFAULT_BAUD; in early_pci_serial_init() local 258 /* A baud might be following */ in early_pci_serial_init() 311 if (kstrtoul(s, 0, &baud) < 0 || baud == 0) in early_pci_serial_init() [all …]
|
| /kernel/linux/linux-4.19/Documentation/serial/ |
| D | driver | 368 uart_update_timeout(port,cflag,baud) 370 number of bits, parity, stop bits and baud rate. 376 Return the numeric baud rate for the specified termios, taking 377 account of the special 38400 baud "kludge". The B0 baud rate 378 is mapped to 9600 baud. 380 If the baud rate is not within min..max, then if old is non-NULL, 381 the original baud rate will be tried. If that exceeds the 382 min..max constraint, 9600 baud will be returned. termios will 383 be updated to the baud rate in use. 385 Note: min..max must always allow 9600 baud to be selected. [all …]
|