[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] imx_serial: set wake bit when we receive a data byte
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2] imx_serial: set wake bit when we receive a data byte |
Date: |
Thu, 15 Jun 2023 12:25:08 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 |
On 15/6/23 11:30, Martin Kaiser wrote:
The linux kernel added a flood check for rx data recently in commmit
"Linux", "commit"
Also maybe s/rx/RX/ s/uart/UART/.
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>
Thanks ;)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
v2:
- support interrupts from wake
- clean up the commit message
hw/char/imx_serial.c | 5 ++++-
include/hw/char/imx_serial.h | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)