zephyr/drivers/serial
Immo Birnbaum f88923a2ff drivers: serial: Xilinx UART run-time config, interrupt functionality
The driver was extended so that the tests/drivers/uart/uart_basic_api
test case now passes. The following modifications were made for the
following items of the test case:

* test_uart_configure
* test_uart_config_get

The driver was missing the support to re-configure the UART at run-time
as well as to obtain the current configuration at run-time via the
.configure and .config_get hooks provided within the UART driver API.
For the flow control setting, bit (mask) definitions were added for the
Modem Control Register. Both the configuration get and set functions
come with auxiliary functions that convert configuration register bit
masks to the UART driver API's enumeration types and vice versa.

For run-time configurability, the device's data struct is required un-
conditionally, previously, it was only available whenever interrupt-
driven mode was enabled. Consequently, the device initialization was
simplified to a single call of the DEVICE_AND_API_INIT macro, as the
existance of the device's data struct is now no longer conditional.

* test_uart_fifo_fill

For the user callback function of the test case to receive the initial
'Ready to TX' indication upon which the TX FIFO is filled, it is
necessary that uart_xlnx_ps_irq_tx_enable also sets the TX FIFO empty
bit in the Interrupt Enable Register. Consequently, the same modifi-
cation applies to the irq_tx_disable function.

* test_uart_fifo_read

During inital device configuration, the RX FIFO interrupt trigger
level has to be set to 1 byte for now, as the test case doesn't poll
the incoming data in a while()-loop, therefore, it misses the CR/LF
if more than one character is in the RX FIFO at the time of the
interrupt and neither CR nor LF is the first character.

Whenever the state of an interrupt is checked by the user callback
function (uart_xlnx_ps_irq_tx_ready, uart_xlnx_ps_irq_rx_ready),
the corresponding bits are cleared in the Interrupt Status Register,
re-enabling interrupts generated by the corresponding source.

Tested on QEMU (R5, A9) and actual Zynq7000 hardware.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@weidmueller.com>
2020-04-22 17:36:58 +02:00
..
CMakeLists.txt
Kconfig
Kconfig.altera_jtag
Kconfig.cc13xx_cc26xx
Kconfig.cc32xx
Kconfig.cmsdk_apb
Kconfig.esp32
Kconfig.gecko
Kconfig.imx drivers: serial: uart_imx: Convert driver to new DT_INST macros 2020-04-04 09:34:00 -05:00
Kconfig.leuart_gecko
Kconfig.litex
Kconfig.mcux drivers: serial: uart_mcux: Convert to DT_INST 2020-04-14 17:52:31 -05:00
Kconfig.mcux_flexcomm
Kconfig.mcux_lpsci
Kconfig.mcux_lpuart drivers: uart: mcux_lpuart: Convert to DT_INST 2020-04-20 15:50:45 -05:00
Kconfig.miv
Kconfig.msp432p4xx
Kconfig.native_posix
Kconfig.nrfx
Kconfig.ns16550
Kconfig.nsim
Kconfig.pl011
Kconfig.psoc6
Kconfig.rtt
Kconfig.rv32m1_lpuart
Kconfig.sam0
Kconfig.sifive
Kconfig.stellaris
Kconfig.stm32 boards: stm32: Use dt API for serial peripheral configuration 2020-04-20 15:27:56 -05:00
Kconfig.uart_sam drivers: serial: uart_sam: rework device tree support 2020-04-18 17:04:08 -05:00
Kconfig.usart_sam drivers: serial: usart_sam: rework device tree support 2020-04-18 17:04:08 -05:00
Kconfig.xlnx drivers: serial: Xilinx UART driver interrupt support feature flag 2020-04-22 17:36:58 +02:00
leuart_gecko.c
uart_altera_jtag_hal.c
uart_cc13xx_cc26xx.c
uart_cc32xx.c
uart_cmsdk_apb.c
uart_esp32.c
uart_gecko.c
uart_handlers.c
uart_imx.c drivers: serial: uart_imx: Convert driver to new DT_INST macros 2020-04-04 09:34:00 -05:00
uart_liteuart.c
uart_mcux_flexcomm.c
uart_mcux_lpsci.c
uart_mcux_lpuart.c drivers: serial: mcux_lpuart: fix infinite loop 2020-04-21 06:37:10 -05:00
uart_mcux.c drivers: serial: uart_mcux: Convert to DT_INST 2020-04-14 17:52:31 -05:00
uart_miv.c
uart_msp432p4xx.c
uart_native_posix.c
uart_nrfx_uart.c
uart_nrfx_uarte.c drivers: uart: nordic: move to new DT API 2020-04-22 17:27:42 +02:00
uart_ns16550_port_x.h
uart_ns16550.c
uart_ns16550.h
uart_nsim.c
uart_pl011.c
uart_psoc6.c
uart_rtt.c
uart_rv32m1_lpuart.c drivers: serial: rv32m1_lpuart: Convert driver to new DT_INST macros 2020-04-10 14:38:04 -05:00
uart_sam.c drivers: serial: uart_sam: rework device tree support 2020-04-18 17:04:08 -05:00
uart_sam0.c drivers: serial: uart_sam0: Fix build error with CONFIG_UART_ASYNC_API 2020-04-21 08:00:49 -05:00
uart_sifive.c
uart_stellaris.c
uart_stm32.c drivers/serial: stm32: Remove calls to CONFIG_LPUART_1 2020-04-20 15:27:56 -05:00
uart_stm32.h
uart_xlnx_ps.c drivers: serial: Xilinx UART run-time config, interrupt functionality 2020-04-22 17:36:58 +02:00
usart_sam.c drivers: serial: usart_sam: rework device tree support 2020-04-18 17:04:08 -05:00