2019-04-06 15:08:09 +02:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2015-12-01 17:42:19 +01:00
|
|
|
menuconfig UART_NS16550
|
|
|
|
bool "NS16550 serial driver"
|
2022-07-20 20:46:30 +02:00
|
|
|
default y
|
|
|
|
depends on DT_HAS_NS16550_ENABLED
|
2015-12-01 17:42:19 +01:00
|
|
|
select SERIAL_HAS_DRIVER
|
2017-06-22 18:26:58 +02:00
|
|
|
select SERIAL_SUPPORT_INTERRUPT
|
2015-12-01 17:42:19 +01:00
|
|
|
help
|
|
|
|
This option enables the NS16550 serial driver.
|
|
|
|
This driver can be used for the serial hardware
|
2016-08-18 01:33:08 +02:00
|
|
|
available on x86 boards.
|
2015-12-01 17:42:19 +01:00
|
|
|
|
2020-12-19 16:27:22 +01:00
|
|
|
if UART_NS16550
|
|
|
|
|
2016-01-06 18:17:03 +01:00
|
|
|
config UART_NS16550_LINE_CTRL
|
2022-03-09 12:05:12 +01:00
|
|
|
bool "Serial Line Control for Apps"
|
2020-12-19 16:27:22 +01:00
|
|
|
depends on UART_LINE_CTRL
|
2016-01-06 18:17:03 +01:00
|
|
|
help
|
|
|
|
This enables the API for apps to control the serial line,
|
|
|
|
such as CTS and RTS.
|
|
|
|
|
|
|
|
Says n if not sure.
|
|
|
|
|
|
|
|
config UART_NS16550_DRV_CMD
|
2022-03-09 12:05:12 +01:00
|
|
|
bool "Driver Commands"
|
2020-12-19 16:27:22 +01:00
|
|
|
depends on UART_DRV_CMD
|
2016-01-06 18:17:03 +01:00
|
|
|
help
|
|
|
|
This enables the API for apps to send commands to driver.
|
|
|
|
|
|
|
|
Says n if not sure.
|
|
|
|
|
2023-01-31 20:33:22 +01:00
|
|
|
choice UART_NS16550_VARIANT
|
2022-05-18 07:38:10 +02:00
|
|
|
prompt "UART variant"
|
|
|
|
default UART_NS16550_VARIANT_NS16550
|
2022-04-26 11:59:56 +02:00
|
|
|
help
|
2022-05-18 07:38:10 +02:00
|
|
|
Select UART device variant
|
2022-04-26 11:59:56 +02:00
|
|
|
|
2022-05-18 07:38:10 +02:00
|
|
|
config UART_NS16550_VARIANT_NS16550
|
|
|
|
bool "UART 16550 (16-bytes FIFO)"
|
|
|
|
help
|
|
|
|
This enables support for 16-bytes FIFO if UART controller is 16550.
|
|
|
|
|
|
|
|
config UART_NS16550_VARIANT_NS16750
|
2022-03-09 12:05:12 +01:00
|
|
|
bool "UART 16750 (64-bytes FIFO and auto flow control)"
|
2016-11-15 03:23:45 +01:00
|
|
|
help
|
2020-03-03 21:25:52 +01:00
|
|
|
This enables support for 64-bytes FIFO and automatic hardware
|
|
|
|
flow control if UART controller is 16750.
|
2016-11-15 03:23:45 +01:00
|
|
|
|
2022-05-18 07:38:10 +02:00
|
|
|
config UART_NS16550_VARIANT_NS16950
|
2022-04-26 11:59:56 +02:00
|
|
|
bool "UART 16950 (128-bytes FIFO and auto flow control)"
|
|
|
|
help
|
|
|
|
This enables support for 128-bytes FIFO and automatic hardware flow control.
|
|
|
|
endchoice
|
|
|
|
|
2019-05-29 08:58:02 +02:00
|
|
|
config UART_NS16550_ACCESS_WORD_ONLY
|
|
|
|
bool "NS16550 only allows word access"
|
|
|
|
help
|
|
|
|
In some case, e.g. ARC HS Development kit, the peripheral space of ns
|
|
|
|
16550 (DesignWare UART) only allows word access, byte access will raise
|
|
|
|
exception.
|
2020-12-19 16:27:22 +01:00
|
|
|
|
2022-06-01 15:51:56 +02:00
|
|
|
config UART_NS16550_ACCESS_IOPORT
|
|
|
|
bool
|
|
|
|
help
|
|
|
|
When enabled, NS16550 will not be a memory mapped device. This option
|
|
|
|
must be selected at SoC/board level if needed.
|
|
|
|
|
2023-03-27 07:49:13 +02:00
|
|
|
config UART_NS16550_SIMULT_ACCESS
|
|
|
|
bool
|
|
|
|
help
|
|
|
|
When enabled, NS16550 supports IO, MMIO, PCIe UART devices simultaneously.
|
|
|
|
For io-mapped instances, io-mapped DTS property need to be added in dtsi.
|
|
|
|
|
2023-06-20 10:17:42 +02:00
|
|
|
config UART_NS16550_PARENT_INIT_LEVEL
|
|
|
|
bool "Boot level based on parent node"
|
|
|
|
default y if ACPI
|
|
|
|
help
|
|
|
|
Boot level based on parent node (PCI or no PCI device). Some platforms the
|
|
|
|
PCI bus driver depends on ACPI sub system to retrieve platform information
|
|
|
|
such as interrupt routing information. But ACPI sub system currently support
|
|
|
|
only post kernel and hence such platforms the UART driver instance init
|
|
|
|
should be invoked only post kernel in case parent node is PCI.
|
|
|
|
|
2021-09-27 20:04:55 +02:00
|
|
|
menu "NS16550 Workarounds"
|
|
|
|
|
|
|
|
config UART_NS16550_WA_ISR_REENABLE_INTERRUPT
|
|
|
|
bool "Re-enable interrupts by toggling IER at end of ISR"
|
|
|
|
depends on UART_INTERRUPT_DRIVEN
|
|
|
|
help
|
|
|
|
In some configurations (e.g. edge interrupt triggers),
|
|
|
|
an interruptible event occurs during ISR and the host interrupt
|
|
|
|
controller does not see the new event due to IIR is constantly
|
|
|
|
asserting interrupts. For example, the callback handles RX and
|
|
|
|
then TX. If another character comes in before end of TX processing
|
|
|
|
(TX interrupt still asserts while raising RX interrupt), the host
|
|
|
|
interrupt controller may not see this new event. So if needed,
|
|
|
|
the IER is being toggled to re-assert interrupts at the end of ISR
|
|
|
|
to nudge the host interrupt controller to fire the ISR again.
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
2020-12-19 16:27:22 +01:00
|
|
|
endif # UART_NS16550
|