[PATCH v3 0/2] xen/ns16550: preserve UART operation across firmware handover

Zhang Zheng posted 2 patches 1 month ago
xen/drivers/char/ns16550.c  | 44 ++++++++++++++++++++++++++++++-------
xen/include/xen/8250-uart.h |  2 ++
2 files changed, 38 insertions(+), 8 deletions(-)
[PATCH v3 0/2] xen/ns16550: preserve UART operation across firmware handover
Posted by Zhang Zheng 1 month ago
This series identifies XScale-compatible UARTs from device tree and
keeps UUE set when updating IER. Pending output is drained before the
FIFOs are reset during ns16550 initialization.

Changes in v3:
- Identify XScale UARTs through intel,xscale-uart instead of probing IER.
- Preserve UUE on IER writes and enable RTOIE with receive interrupts.
- Bound the TX drain wait using the XHCI console's raw-counter approach.
- Explain why the drain checks TEMT instead of uart->lsr_mask.

Tested on SpacemiT K3 with Baptiste's preceding A/D bit patches applied.

v2: https://lore.kernel.org/xen-devel/20261010031406.2057735-1-zhangzheng@iscas.ac.cn/
v1: https://lore.kernel.org/xen-devel/20260928023857.1030884-1-zhangzheng@iscas.ac.cn/

Zhang Zheng (2):
  xen/ns16550: identify XScale UARTs from device tree
  xen/ns16550: drain TX before reinitializing the UART

 xen/drivers/char/ns16550.c  | 44 ++++++++++++++++++++++++++++++-------
 xen/include/xen/8250-uart.h |  2 ++
 2 files changed, 38 insertions(+), 8 deletions(-)


base-commit: 7e020a4dd6ed30eb6c91a9abe2767034e2bb270a
-- 
2.54.0