diff --git a/sys/dev/uart/uart_bus_pci.c b/sys/dev/uart/uart_bus_pci.c --- a/sys/dev/uart/uart_bus_pci.c +++ b/sys/dev/uart/uart_bus_pci.c @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -218,6 +219,12 @@ { struct uart_softc *sc; const struct pci_id *id; + struct pci_id cid = { + .regshft = 0, + .rclk = 0, + .rid = 0x10 | PCI_NO_MSI, + .desc = "Generic SimpleComm PCI device", + }; int result; sc = device_get_softc(dev); @@ -227,6 +234,14 @@ sc->sc_class = &uart_ns8250_class; goto match; } + if (pci_get_class(dev) == PCIC_SIMPLECOMM && + pci_get_subclass(dev) == PCIS_SIMPLECOMM_UART && + pci_get_progif(dev) < PCIP_SIMPLECOMM_UART_16550A) { + /* XXX rclk what to do */ + id = &cid; + sc->sc_class = &uart_ns8250_class; + goto match; + } /* Add checks for non-ns8250 IDs here. */ return (ENXIO);