Commit Graph

7 Commits

Author SHA1 Message Date
Lwazi Dube f3ddb3ffac drivers/serial: Make the 16550 rx trigger level configurable
To avoid breaking other configs, the default value 2 is equal to the original
hard coded value.
2024-08-03 10:31:36 +08:00
Lee Lup Yuen b2c1930825 serial/uart_16550: Wait before setting Line Control Register (Synopsys DesignWare 8250)
Some UART Controllers (Synopsys DesignWare 8250) will trigger spurious interrupts when the Line Control Register (LCR) is set while the UART is busy. This patch provides the option (16550_WAIT_LCR) to wait for UART until it's not busy, before setting the LCR. (16550_WAIT_LCR is disabled by default)

This patch fixes the spurious UART interrupts for the upcoming port of NuttX to StarFive JH7110 SoC (with Synopsys DesignWare 8250 UART). [The patch is explained here](https://lupyuen.github.io/articles/plic#appendix-fix-the-spurious-uart-interrupts)

drivers/serial/uart_16550.c: If 16550_WAIT_LCR is enabled, wait until UART is not busy before setting LCR

include/nuttx/serial/uart_16550.h: Define the UART Status Register (USR) for checking if UART is busy

drivers/serial/Kconfig-16550: Added option 16550_WAIT_LCR to 16550 UART Config, disabled by default
2023-08-03 08:38:07 +02:00
zhanghu5 a043657323 dma support 16550 uart
Signed-off-by: zhanghu5 <zhanghu5@xiaomi.com>
2023-05-23 01:32:03 +08:00
Huang Qi 2e35b6d611 serial/uart_16550: Allow uintptr_t as addr width
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-01-14 19:40:30 +08:00
Xiang Xiao ead2c40cd4 Squashed commit of the following:
drivers/serial/uart_16550.c: Support 16550 auto hardware flow control

    drivers/serial/uart_16550.c:  Add configuration option CONFIG_16550_SUPRESS_INITIAL_CONFIG.  This is identical to the standard configuration in arch/Kconfig CONFIG_SUPPRESS_UART_CONFIG, but with scope of only the 16550 driver.
2018-08-26 11:37:16 -06:00
Xiang Xiao 46e47c8dcf Squashed commit of the following:
drivers/serial/uart_16550.c:  Add a configuration, analogous to the STM32 configuration option, to suppress the NuttX standard re-ordering for /dev/ttySN for special case of the 16550 UART.

    config/serial: UART 16550: Add CONFIG_SERIAL_UART_ARCH_MMIO option so the a memory mapped device doesn't need to provide uart_getreg() and uart_putreg() implementations.

    u16550_txempty() should check UART_LSR_TEMT to avoid some data left in the transmit FIFO
2018-08-26 11:17:33 -06:00
Gregory Nutt 9c1efc7ab9 drivers/serial/Kconfig: Kconfig is too big, divide into Kconfig, Kconfig-uart, Kconfig-usart, Kconfig-sci, Kconfig-16550. More than one MCU supports LPUARTs. Add Kconfig-lpuart and remove MCU-specific LPUART definitions. Affects Kinetis and STM32L4. 2018-03-14 10:33:27 -06:00