qemu/hw/char
Martin Kaiser bd96e10071 imx_serial: set wake bit when we receive a data byte
The Linux kernel added a flood check for RX data recently in commit
496a4471b7c3 ("serial: imx: work-around for hardware RX flood"). This
check uses the wake bit in the UART status register 2. The wake bit
indicates that the receiver detected a start bit on the RX line. If the
kernel sees a number of RX interrupts without the wake bit being set, it
treats this as spurious data and resets the UART port. imx_serial does
never set the wake bit and triggers the kernel's flood check.

This patch adds support for the wake bit. wake is set when we receive a
new character (it's not set for break events). It seems that wake is
cleared by the kernel driver, the hardware does not have to clear it
automatically after data was read.

The wake bit can be configured as an interrupt source. Support this
mechanism as well.

Co-developed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-06-19 11:35:58 +01:00
..
avr_usart.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
bcm2835_aux.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
cadence_uart.c hw/char/cadence_uart: Fix guards on invalid BRGR/BDIV settings 2023-03-21 11:54:39 +00:00
cmsdk-apb-uart.c chardev: mark explicitly first argument as poisoned 2021-08-05 16:15:33 +04:00
debugcon.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
digic-uart.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
escc.c hw/char: fix qcode array bounds check in ESCC impl 2022-04-26 16:12:26 +01:00
etraxfs_ser.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
exynos4210_uart.c Drop useless casts from g_malloc() & friends to pointer 2022-10-22 23:15:40 +02:00
goldfish_tty.c hw/m68k: Fix typo in SPDX tag 2021-11-09 10:11:27 +01:00
grlib_apbuart.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
ibex_uart.c include/hw: Do not include "hw/registerfields.h" in headers that don't need it 2023-02-14 09:02:42 +01:00
imx_serial.c imx_serial: set wake bit when we receive a data byte 2023-06-19 11:35:58 +01:00
ipoctal232.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
Kconfig hw/char: Add config for shakti uart 2021-09-01 11:59:12 +10:00
mcf_uart.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
mchp_pfsoc_mmuart.c hw/char/mchp_pfsoc_mmuart: QOM'ify PolarFire MMUART 2021-10-07 08:41:33 +10:00
meson.build hw/char: Move two more files from specific_ss to softmmu_ss 2023-04-20 11:25:32 +02:00
nrf51_uart.c chardev: mark explicitly first argument as poisoned 2021-08-05 16:15:33 +04:00
omap_uart.c hw/arm/omap: Remove unused omap_uart_attach() 2023-06-05 07:43:23 +01:00
parallel-isa.c hw/char/parallel-isa: Export struct ISAParallelState 2023-06-13 11:28:58 +02:00
parallel.c hw/char/parallel-isa: Export struct ISAParallelState 2023-06-13 11:28:58 +02:00
pl011.c hw/char/pl011: Un-inline pl011_create() 2023-02-27 13:27:05 +00:00
renesas_sci.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
riscv_htif.c hw/riscv: Add signature dump function for spike to run ACT tests 2023-05-05 10:49:50 +10:00
sclpconsole-lm.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
sclpconsole.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
serial-isa.c acpi: serial-is: replace ISADeviceClass::build_aml with AcpiDevAmlIfClass:build_dev_aml 2022-06-09 19:32:48 -04:00
serial-pci-multi.c docs/specs: Convert pci-serial.txt to rst 2023-04-24 22:56:55 -04:00
serial-pci.c docs/specs: Convert pci-serial.txt to rst 2023-04-24 22:56:55 -04:00
serial.c replace TABs with spaces 2023-03-20 12:43:50 +01:00
sh_serial.c hw/char/sh_serial: Add device id to trace output 2021-10-30 18:39:37 +02:00
shakti_uart.c hw/char: shakti_uart: Register device in 'input' category 2021-10-07 08:41:33 +10:00
sifive_uart.c cleanup: Tweak and re-run return_directly.cocci 2022-12-14 16:19:35 +01:00
spapr_vty.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
stm32f2xx_usart.c Fix STM32F2XX USART data register readout 2021-12-15 10:11:34 +00:00
terminal3270.c s390x: css: report errors from ccw_dstream_read/write 2021-04-09 10:52:13 +02:00
trace-events hw/char/sh_serial: Add device id to trace output 2021-10-30 18:39:37 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
virtio-console.c chardev: mark explicitly first argument as poisoned 2021-08-05 16:15:33 +04:00
virtio-serial-bus.c hw: replace most qemu_bh_new calls with qemu_bh_new_guarded 2023-04-28 11:31:54 +02:00
xen_console.c hw/xen: Fix double-free in xen_console store_con_info() 2023-04-13 10:09:31 +01:00
xilinx_uartlite.c hw/char/xilinx_uartlite: Expose XILINX_UARTLITE QOM type 2023-02-27 13:27:05 +00:00