git: 1665954e508f - main - uart: Add support for the Intel XScale controller
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 19 Jun 2026 14:06:07 UTC
The branch main has been updated by bnovkov:
URL: https://cgit.FreeBSD.org/src/commit/?id=1665954e508f74588108e96c30b90d1a88807faa
commit 1665954e508f74588108e96c30b90d1a88807faa
Author: Bojan Novković <bnovkov@FreeBSD.org>
AuthorDate: 2026-06-18 02:03:55 +0000
Commit: Bojan Novković <bnovkov@FreeBSD.org>
CommitDate: 2026-06-19 14:01:30 +0000
uart: Add support for the Intel XScale controller
The ns8250 driver avoids clearing IER bit 0x10 to account for the
split "receiver time-out interrupt enable" bit, but it never sets
it in `ier_rxbits` even though a comment in `ns8250_init` implies so.
Fix this by setting `IER_RXTMOUT` if we've matched an XScale uart.
Differential Revision: https://reviews.freebsd.org/D57629
Reviewed by: imp
MFC after: 2 weeks
---
sys/dev/uart/uart_dev_ns8250.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c
index d6940dc80005..60377c0a1e96 100644
--- a/sys/dev/uart/uart_dev_ns8250.c
+++ b/sys/dev/uart/uart_dev_ns8250.c
@@ -562,6 +562,7 @@ UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data);
static struct ofw_compat_data compat_data[] = {
{"ns16550", (uintptr_t)&uart_ns8250_class},
{"ns16550a", (uintptr_t)&uart_ns8250_class},
+ {"intel,xscale-uart", (uintptr_t)&uart_ns8250_class},
{NULL, (uintptr_t)NULL},
};
UART_FDT_CLASS_AND_DEVICE(compat_data);
@@ -647,6 +648,12 @@ ns8250_bus_attach(struct uart_softc *sc)
/* Get IER RX interrupt bits */
ivar = IER_EMSC | IER_ERLS | IER_ERXRDY;
+#ifdef FDT
+ /* Intel XScale models won't work without IER_RXTMOUT set. */
+ if (ofw_bus_is_compatible(sc->sc_dev, "intel,xscale-uart"))
+ ivar |= IER_RXTMOUT;
+#endif
+
resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_rxbits",
&ivar);
ns8250->ier_rxbits = (uint8_t)(ivar & 0xff);