| /linux/Documentation/devicetree/bindings/serial/ |
| H A D | nvidia,tegra20-hsuart.yaml | 58 nvidia,adjust-baud-rates: 61 List of entries providing percentage of baud rate adjustment within a range. Each entry 62 contains a set of 3 values: range low/high and adjusted rate. When the baud rate set on the 63 controller falls within the range mentioned in this field, the baud rate will be adjusted by 68 Increase baud rate by 2% when set baud rate falls within range 9600 to 115200. 70 Standard UART devices are expected to have tolerance for baud rate error by -4 to +4 %. All 72 issue. UART RX baud rate tolerance level is 0% to +4% in 1-stop config. Otherwise, the 74 baud rate to be higher than the deviations observed in TX. 77 valid range and Tegra baud rate has to be set above actual TX baud rate observed. To do this 78 we use nvidia,adjust-baud-rates. [all …]
|
| H A D | serial-peripheral-props.yaml | 15 controller, might need similar properties, e.g. for configuring the baud 22 The maximum baud rate the device operates at. 26 baud rates. 31 The current baud rate the device operates at. 33 the baud rate of the slave device. 35 * device supports auto-baud 38 * device baud rate is configured by its firmware but there is no
|
| /linux/arch/m68k/atari/ |
| H A 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 …]
|
| /linux/arch/x86/boot/ |
| H A D | early_serial_console.c | 27 static void early_serial_init(int port, int baud) in early_serial_init() argument 37 divisor = BASE_BAUD / baud; in early_serial_init() 49 int baud = DEFAULT_BAUD; in parse_earlyprintk() local 90 baud = simple_strtoull(arg + pos, &e, 0); in parse_earlyprintk() 91 if (baud == 0 || arg + pos == e) in parse_earlyprintk() 92 baud = DEFAULT_BAUD; in parse_earlyprintk() 96 early_serial_init(port, baud); in parse_earlyprintk() 117 int baud; in parse_console_uart8250() local 137 baud = simple_strtoull(options + 1, NULL, 0); in parse_console_uart8250() 138 if (!baud) in parse_console_uart8250() [all …]
|
| /linux/drivers/tty/serial/ |
| H A 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 …]
|
| H A 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) 228 unsigned int baud, quot, h_lcr, b; in serial21285_set_termios() local 244 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); in serial21285_set_termios() 245 quot = uart_get_divisor(port, baud); in serial21285_set_termios() 280 uart_update_timeout(port, termios->c_cflag, baud); in serial21285_set_termios() 400 serial21285_get_options(struct uart_port *port, int *baud, in serial21285_get_options() argument [all …]
|
| H A D | vt8500_serial.c | 33 #define VT8500_URDIV 0x0008 /* Clock/Baud rate divisor */ 279 static int vt8500_set_baud_rate(struct uart_port *port, unsigned int baud) in vt8500_set_baud_rate() argument 287 div |= (uart_get_divisor(port, baud) - 1) & 0x3ff; in vt8500_set_baud_rate() 289 /* Effective baud rate */ in vt8500_set_baud_rate() 290 baud = port->uartclk / 16 / ((div & 0x3ff) + 1); in vt8500_set_baud_rate() 297 /* Break signal timing depends on baud rate, update accordingly */ in vt8500_set_baud_rate() 298 vt8500_write(port, mult_frac(baud, 4096, 1000000), VT8500_URBKR); in vt8500_set_baud_rate() 300 return baud; in vt8500_set_baud_rate() 342 unsigned int baud, lcr; in vt8500_set_termios() local 347 /* calculate and set baud rate */ in vt8500_set_termios() [all …]
|
| H A D | sunsab.c | 10 * Fixed to use tty_get_baud_rate, and to allow for arbitrary baud 86 #define SAB82532_MAX_TEC_TIMEOUT 200000 /* 1 character time (at 50 baud) */ 87 #define SAB82532_MAX_CEC_TIMEOUT 50000 /* 2.5 TX CLKs (at 50 baud) */ 623 * transmitted at 9600 baud during shutdown (regardless of the in sunsab_shutdown() 640 * The formula is: Baud = SAB_BASE_BAUD / ((N + 1) * (1 << M)), 645 static void calc_ebrg(int baud, int *n_ret, int *m_ret) in calc_ebrg() argument 649 if (baud == 0) { in calc_ebrg() 660 n = (SAB_BASE_BAUD * 10) / baud; in calc_ebrg() 681 unsigned int iflag, unsigned int baud, in sunsab_convert_to_sab() argument 710 calc_ebrg(baud, &n, &m); in sunsab_convert_to_sab() [all …]
|
| H A D | ar933x_uart.c | 253 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() 720 int baud = 115200; in ar933x_uart_console_setup() local [all …]
|
| H A D | fsl_lpuart.c | 339 .rx_watermark = 7, /* A lower watermark is ideal for low baud rates. */ 1350 unsigned int baud = tty_get_baud_rate(tty); in lpuart_start_rx_dma() local 1354 * 10ms at any baud rate. in lpuart_start_rx_dma() 1356 sport->rx_dma_rng_buf_len = (DMA_RX_TIMEOUT * baud / bits / 1000) * 2; in lpuart_start_rx_dma() 1416 u32 baud = lpuart32_read(&sport->port, UARTBAUD); in lpuart_start_rx_dma() local 1418 lpuart32_write(&sport->port, baud | UARTBAUD_RDMAE, UARTBAUD); in lpuart_start_rx_dma() 2003 unsigned int baud; in lpuart_set_termios() local 2079 baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16); in lpuart_set_termios() 2083 * baud rate and restart Rx DMA path. in lpuart_set_termios() 2114 uart_update_timeout(port, termios->c_cflag, baud); in lpuart_set_termios() 2153 u32 sbr, osr, baud_diff, tmp_osr, tmp_sbr, tmp_diff, baud; __lpuart32_serial_setbrg() local 2241 unsigned int baud; lpuart32_set_termios() local 2570 lpuart_console_get_options(struct lpuart_port * sport,int * baud,int * parity,int * bits) lpuart_console_get_options() argument 2619 lpuart32_console_get_options(struct lpuart_port * sport,int * baud,int * parity,int * bits) lpuart32_console_get_options() argument 2667 int baud = 115200; lpuart_console_setup() local 3034 u32 val, baud; serial_lpuart_enable_wakeup() local [all...] |
| H A D | max3100.c | 91 int baud; /* current baud rate */ member 410 unsigned int baud = port->uartclk / 16; in max3100_set_termios() local 411 unsigned int baud230400 = (baud == 230400) ? 1 : 0; in max3100_set_termios() 420 baud = tty_termios_baud_rate(termios); in max3100_set_termios() 422 switch (baud) { in max3100_set_termios() 425 baud = s->baud; in max3100_set_termios() 460 baud = s->baud; in max3100_set_termios() 463 baud = s->baud; in max3100_set_termios() 465 tty_termios_encode_baud_rate(termios, baud, baud); in max3100_set_termios() 466 s->baud = baud; in max3100_set_termios() [all …]
|
| /linux/drivers/usb/serial/ |
| H A D | ssu100.c | 221 speed_t baud, remainder; in ssu100_set_termios() local 236 baud = tty_get_baud_rate(tty); in ssu100_set_termios() 237 if (!baud) in ssu100_set_termios() 238 baud = 9600; in ssu100_set_termios() 240 if (baud < MIN_BAUD_RATE || baud > MAX_BAUD_RATE) { in ssu100_set_termios() 242 baud = tty_termios_baud_rate(old_termios); in ssu100_set_termios() 244 baud = clamp(baud, MIN_BAUD_RATE, MAX_BAUD_RATE); in ssu100_set_termios() 246 tty_encode_baud_rate(tty, baud, baud); in ssu100_set_termios() 248 if (!baud) in ssu100_set_termios() 249 baud = 9600; in ssu100_set_termios() [all …]
|
| H A D | ftdi_sio.c | 70 int baud_base; /* baud base clock for divisor setting */ 83 speed_t force_baud; /* if non-zero, force the baud rate to 1122 static unsigned short int ftdi_232am_baud_base_to_divisor(int baud, int base) in ftdi_232am_baud_base_to_divisor() argument 1126 int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud); in ftdi_232am_baud_base_to_divisor() 1138 divisor = 0; /* special case for maximum baud rate */ in ftdi_232am_baud_base_to_divisor() 1142 static unsigned short int ftdi_232am_baud_to_divisor(int baud) in ftdi_232am_baud_to_divisor() argument 1144 return ftdi_232am_baud_base_to_divisor(baud, 48000000); in ftdi_232am_baud_to_divisor() 1147 static u32 ftdi_232bm_baud_base_to_divisor(int baud, int base) in ftdi_232bm_baud_base_to_divisor() argument 1152 int divisor3 = DIV_ROUND_CLOSEST(base, 2 * baud); in ftdi_232bm_baud_base_to_divisor() 1155 /* Deal with special cases for highest baud rates. */ in ftdi_232bm_baud_base_to_divisor() [all …]
|
| /linux/Documentation/devicetree/bindings/w1/ |
| H A D | w1-uart.yaml | 18 baud-rate and transmitted byte, which corresponds to a 1-Wire read bit, 21 The default baud-rate for reset and presence detection is 9600 and for 22 a 1-Wire read or write operation 115200. In case the actual baud-rate 35 The baud rate for the 1-Wire reset and presence detect. 40 The baud rate for the 1-Wire write-0 cycle. 45 The baud rate for the 1-Wire write-1 and read cycle.
|
| /linux/drivers/tty/serial/8250/ |
| H A D | 8250_bcm7271.c | 7 * optional features including the ability to use a baud rate clock 8 * mux for more accurate high speed baud rate selection and also 666 dev_err(dev, "Error selecting BAUD MUX clock for %u\n", in init_real_clk_rates() 676 static u32 find_quot(struct device *dev, u32 freq, u32 baud, u32 *percent) in find_quot() argument 685 quot = DIV_ROUND_CLOSEST(rate, baud); in find_quot() 691 hires_baud = (u64)baud * 10000; in find_quot() 699 *percent = (unsigned long)DIV_ROUND_CLOSEST_ULL(hires_err, baud); in find_quot() 701 dev_dbg(dev, "Baud rate: %u, MUX Clk: %u, Error: %u.%u%%\n", in find_quot() 702 baud, freq, *percent / 100, *percent % 100); in find_quot() 708 u32 baud) in set_clock_mux() argument [all...] |
| H A D | 8250_pericom.c | 52 static void pericom_do_set_divisor(struct uart_port *port, unsigned int baud, in pericom_do_set_divisor() 59 unsigned int divisor = max(maxrate / baud, 1U); in pericom_do_set_divisor() 60 int delta = maxrate / divisor - baud; in pericom_do_set_divisor() 62 if (baud > maxrate + baud / 50) in pericom_do_set_divisor() 65 if (delta > baud / 50) in pericom_do_set_divisor() 72 delta = maxrate / divisor - baud; in pericom_do_set_divisor() 73 if (abs(delta) < baud / 50) { in pericom_do_set_divisor() 51 pericom_do_set_divisor(struct uart_port * port,unsigned int baud,unsigned int quot,unsigned int quot_frac) pericom_do_set_divisor() argument
|
| H A D | 8250_ingenic.c | 95 int baud = 115200; in ingenic_earlycon_setup_tail() 103 uart_parse_options(opt, &baud, &parity, &bits, &flow); in ingenic_earlycon_setup_tail() 106 if (dev->baud) in ingenic_earlycon_setup_tail() 107 baud = dev->baud; in ingenic_earlycon_setup_tail() 108 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * baud); in ingenic_earlycon_setup_tail() 283 data->clk_baud = devm_clk_get(&pdev->dev, "baud"); in ingenic_uart_probe() 286 "unable to get baud clock\n"); in ingenic_uart_probe() 296 dev_err(&pdev->dev, "could not enable baud clock: %d\n", err); in ingenic_uart_probe() 94 int baud = 115200; ingenic_earlycon_setup_tail() local
|
| /linux/arch/x86/kernel/ |
| H A D | early_printk.c | 160 unsigned long baud = DEFAULT_BAUD; in early_serial_init() local 186 baud = simple_strtoull(s, &e, 0); in early_serial_init() 188 if (baud == 0 || s == e) in early_serial_init() 189 baud = DEFAULT_BAUD; in early_serial_init() 192 /* Convert from baud to divisor value */ in early_serial_init() 193 divisor = 115200 / baud; in early_serial_init() 258 * The rest of the param should be "[force],B:D.F,baud", where B, D & F describe 265 unsigned long baud = DEFAULT_BAUD; in early_pci_serial_init() local 300 /* A baud might be following */ in early_pci_serial_init() 354 if (kstrtoul(s, 0, &baud) < 0 || baud == 0) in early_pci_serial_init() [all …]
|
| /linux/drivers/clk/at91/ |
| H A D | sama7g5.c | 29 * @PLL_ID_BAUD: Baud PLL identifier 592 .pp = { PLL_IDS_TO_ARR_ENTRY(SYS, DIV0), PLL_IDS_TO_ARR_ENTRY(BAUD, DIV0), }, 600 .pp = { PLL_IDS_TO_ARR_ENTRY(SYS, DIV0), PLL_IDS_TO_ARR_ENTRY(BAUD, DIV0), }, 608 .pp = { PLL_IDS_TO_ARR_ENTRY(SYS, DIV0), PLL_IDS_TO_ARR_ENTRY(BAUD, DIV0), }, 616 .pp = { PLL_IDS_TO_ARR_ENTRY(SYS, DIV0), PLL_IDS_TO_ARR_ENTRY(BAUD, DIV0), }, 624 .pp = { PLL_IDS_TO_ARR_ENTRY(SYS, DIV0), PLL_IDS_TO_ARR_ENTRY(BAUD, DIV0), }, 632 .pp = { PLL_IDS_TO_ARR_ENTRY(SYS, DIV0), PLL_IDS_TO_ARR_ENTRY(BAUD, DIV0), }, 640 .pp = { PLL_IDS_TO_ARR_ENTRY(SYS, DIV0), PLL_IDS_TO_ARR_ENTRY(BAUD, DIV0), }, 648 .pp = { PLL_IDS_TO_ARR_ENTRY(SYS, DIV0), PLL_IDS_TO_ARR_ENTRY(BAUD, DIV0), }, 656 .pp = { PLL_IDS_TO_ARR_ENTRY(SYS, DIV0), PLL_IDS_TO_ARR_ENTRY(BAUD, DIV0), }, [all …]
|
| /linux/drivers/tty/ |
| H A D | tty_baudrate.c | 15 * Routine which returns the baud rate of the tty 50 * Convert termios baud rate data into a speed. This should be called 80 * Convert termios baud rate data into a speed. This should be called 163 * Our goal is to find a close match to the standard baud rate in tty_termios_encode_baud_rate() 164 * returned. Walk the baud rate table and if we get a very close in tty_termios_encode_baud_rate() 201 * tty_encode_baud_rate - set baud rate of the tty 203 * @ibaud: input baud rate 204 * @obaud: output baud rate
|
| /linux/Documentation/w1/masters/ |
| H A D | w1-uart.rst | 21 combination of baud-rate and transmitted byte, which corresponds to a 25 the baud-rate 9600, i.e. 104.2 us per bit. The transmitted byte 0xf0 over 31 Similar for a 1-Wire read bit or write bit, which uses the baud-rate 36 The default baud-rate for reset and presence detection is 9600 and for 37 a 1-Wire read or write operation 115200. In case the actual baud-rate
|
| /linux/arch/mips/sni/ |
| H A D | setup.c | 65 char *baud; in sni_console_setup() local 76 baud = prom_getenv("lbaud"); in sni_console_setup() 80 baud = prom_getenv("rbaud"); in sni_console_setup() 83 if (baud) in sni_console_setup() 84 strscpy(options, baud); in sni_console_setup() 87 baud ? options : NULL); in sni_console_setup() 90 baud ? options : NULL); in sni_console_setup()
|
| /linux/Documentation/devicetree/bindings/sound/ |
| H A D | serial-midi.yaml | 19 Can only be set to use standard baud rates corresponding to supported rates of the 20 parent serial device. If the standard MIDI baud of 31.25 kBaud is needed 22 configure the clocks of the parent serial device so that a requested baud of 38.4 kBaud 23 results in the standard MIDI baud rate, and set the 'current-speed' property to 38400 (default)
|
| /linux/arch/mips/generic/ |
| H A D | yamon-dt.c | 161 unsigned int uart, baud, stop_bits; in yamon_dt_serial_config() local 176 baud = stop_bits = 0; in yamon_dt_serial_config() 184 baud *= 10; in yamon_dt_serial_config() 185 baud += mode_var[0] - '0'; in yamon_dt_serial_config() 202 if (!baud) in yamon_dt_serial_config() 203 baud = 38400; in yamon_dt_serial_config() 212 uart, baud, parity, stop_bits, in yamon_dt_serial_config()
|
| /linux/include/soc/fsl/qe/ |
| H A D | qe.h | 36 QE_BRG1, /* Baud Rate Generator 1 */ 37 QE_BRG2, /* Baud Rate Generator 2 */ 38 QE_BRG3, /* Baud Rate Generator 3 */ 39 QE_BRG4, /* Baud Rate Generator 4 */ 40 QE_BRG5, /* Baud Rate Generator 5 */ 41 QE_BRG6, /* Baud Rate Generator 6 */ 42 QE_BRG7, /* Baud Rate Generator 7 */ 43 QE_BRG8, /* Baud Rate Generator 8 */ 44 QE_BRG9, /* Baud Rate Generator 9 */ 45 QE_BRG10, /* Baud Rat [all...] |