diff options
| author | Bojan Novković <bnovkov@FreeBSD.org> | 2026-06-18 02:03:55 +0000 |
|---|---|---|
| committer | Bojan Novković <bnovkov@FreeBSD.org> | 2026-06-19 14:01:30 +0000 |
| commit | 1665954e508f74588108e96c30b90d1a88807faa (patch) | |
| tree | 31c071ccf52ab8c93580de73a12897cf35e5afcf | |
| parent | 28ddd11d91f860df9b9be485c5b0526c10b4aec1 (diff) | |
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
| -rw-r--r-- | sys/dev/uart/uart_dev_ns8250.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |
