zephyr/drivers
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
..
adc drivers: adc: mcux_adc12: create macro for device instantiation 2020-04-20 15:23:47 -05:00
audio
bluetooth
can drivers: can: shell: add command for configuring a CAN controller 2020-04-21 18:26:16 +02:00
clock_control
console
counter
crypto
dac drivers: dac: Add support for STM32L0 series 2020-04-20 17:41:48 +02:00
debug
display
dma
eeprom
entropy
espi
ethernet
flash drivers: flash: nordic qspi: finish DT API conversion 2020-04-21 18:31:08 +02:00
gpio drivers: gpio: gpio_intel_apl: Convert to DT_INST 2020-04-20 15:23:11 -05:00
hwinfo drivers: hwinfo: update mcux-sim implementation byte order 2020-04-22 17:31:56 +02:00
i2c drivers: i2c: i2c_sam_twihs: rework device tree support 2020-04-21 15:46:30 -05:00
i2s include/devicetree: dma: rename DMAS CELL macros 2020-04-21 06:37:28 -05:00
ieee802154
interrupt_controller drivers: intc: intc_cavs: Convert to DT_INST 2020-04-22 04:59:22 -05:00
ipm intc: intc_cavs: Replace DT_CAVS_ICTL_BASE_ADDR with new macros 2020-04-22 04:59:22 -05:00
kscan
led
led_strip
lora
modem drivers: modem: ublox-sara-r4: implemented sendmsg 2020-04-21 17:37:08 +03:00
net
neural_net
pcie
peci
pinmux drivers: pinmux: intel_s1000: Convert to DT_INST 2020-04-20 15:21:39 -05:00
ps2
ptp_clock
pwm drivers: pwm: pwm_mcux: Convert driver to new DT_INST macros 2020-04-20 11:08:46 -05:00
sensor sensor: lis3mdl: Check possible error in trigger_set 2020-04-20 15:43:23 +02:00
serial drivers: serial: Xilinx UART run-time config, interrupt functionality 2020-04-22 17:36:58 +02:00
spi drivers: spi: mcux_lpspi: Convert to DT_INST 2020-04-20 15:23:47 -05:00
timer intc: intc_cavs: Replace DT_CAVS_ICTL_BASE_ADDR with new macros 2020-04-22 04:59:22 -05:00
usb drivers: usb_dc_nrfx: move to new DT API 2020-04-21 13:34:22 -05:00
video drivers: video: mcux_csi: Convert driver to DT_INST macro 2020-04-20 11:08:46 -05:00
watchdog
wifi
CMakeLists.txt drivers: dac: Add API for DAC peripherals 2020-04-20 17:41:48 +02:00
Kconfig drivers: dac: Add API for DAC peripherals 2020-04-20 17:41:48 +02:00