drivers: uart: ns16550: Clean up Kconfig dependency usage

Use a dependency block instead of specifying a UART_NS16550 dependency
for each individual opton. This doesn't save many lines right now, but
may do so once more options are added.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2020-12-19 17:27:22 +02:00 committed by Anas Nashif
parent 1d5d5fcf49
commit 4cc0391a1f

View file

@ -9,9 +9,11 @@ menuconfig UART_NS16550
This driver can be used for the serial hardware This driver can be used for the serial hardware
available on x86 boards. available on x86 boards.
if UART_NS16550
config UART_NS16550_LINE_CTRL config UART_NS16550_LINE_CTRL
bool "Enable Serial Line Control for Apps" bool "Enable Serial Line Control for Apps"
depends on UART_LINE_CTRL && UART_NS16550 depends on UART_LINE_CTRL
help help
This enables the API for apps to control the serial line, This enables the API for apps to control the serial line,
such as CTS and RTS. such as CTS and RTS.
@ -20,7 +22,7 @@ config UART_NS16550_LINE_CTRL
config UART_NS16550_DRV_CMD config UART_NS16550_DRV_CMD
bool "Enable Driver Commands" bool "Enable Driver Commands"
depends on UART_DRV_CMD && UART_NS16550 depends on UART_DRV_CMD
help help
This enables the API for apps to send commands to driver. This enables the API for apps to send commands to driver.
@ -28,15 +30,15 @@ config UART_NS16550_DRV_CMD
config UART_NS16750 config UART_NS16750
bool "Enable UART 16750 (64-bytes FIFO and auto flow control)" bool "Enable UART 16750 (64-bytes FIFO and auto flow control)"
depends on UART_NS16550
help help
This enables support for 64-bytes FIFO and automatic hardware This enables support for 64-bytes FIFO and automatic hardware
flow control if UART controller is 16750. flow control if UART controller is 16750.
config UART_NS16550_ACCESS_WORD_ONLY config UART_NS16550_ACCESS_WORD_ONLY
bool "NS16550 only allows word access" bool "NS16550 only allows word access"
depends on UART_NS16550
help help
In some case, e.g. ARC HS Development kit, the peripheral space of ns 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 16550 (DesignWare UART) only allows word access, byte access will raise
exception. exception.
endif # UART_NS16550