diff options
| author | Marek Vasut <[email protected]> | 2026-07-08 17:12:49 +0200 |
|---|---|---|
| committer | Peng Fan <[email protected]> | 2026-07-12 16:18:32 +0800 |
| commit | b17e6419ad99e757d96aa18ce1072172371cf381 (patch) | |
| tree | 62768082b9fb556496cdcacddd2eee9b25c45e57 /include/environment | |
| parent | 0f04bbf9ab3751405308f0a8aef2b6016a072b7d (diff) | |
serial: lpuart: Clear the OR STAT in tstc to prevent hang
Clear the STAT register OR bit every time in .tstc callback, otherwise
a condition may occur when data are fed into the RX FIFO, the FIFO did
overflow, the OR bit is set and prevents any new data from being added
into the RX FIFO, the OR bit is never cleared, and watermark read back
is always 0. If this condition occurs, the .tstc callback will always
report no new characters, and the OR bit will never be cleared, so the
U-Boot shell will be unresponsive until next reboot or kernel boot.
This is easy to trigger on MX95, power on the system and send traffic
on UART from host to the MX95, the MX95 FIFO will overflow and the
U-Boot console will become unresponsive.
Fix this by clearing the OR bit early, in .tstc callback. This way,
even if an overflow occurs, there will be slight loss of RX data, but
the U-Boot console will not become unresponsive.
Signed-off-by: Marek Vasut <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'include/environment')
0 files changed, 0 insertions, 0 deletions
