summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart/uart_bus_fdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/uart/uart_bus_fdt.c')
-rw-r--r--sys/dev/uart/uart_bus_fdt.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/uart/uart_bus_fdt.c b/sys/dev/uart/uart_bus_fdt.c
index 88523b5..6517007 100644
--- a/sys/dev/uart/uart_bus_fdt.c
+++ b/sys/dev/uart/uart_bus_fdt.c
@@ -100,11 +100,13 @@ uart_fdt_probe(device_t dev)
pcell_t clock, shift;
int err;
- if (!ofw_bus_is_compatible(dev, "ns16550"))
- return (ENXIO);
-
sc = device_get_softc(dev);
- sc->sc_class = &uart_ns8250_class;
+ if (ofw_bus_is_compatible(dev, "ns16550"))
+ sc->sc_class = &uart_ns8250_class;
+ else if (ofw_bus_is_compatible(dev, "lpc,uart"))
+ sc->sc_class = &uart_lpc_class;
+ else
+ return (ENXIO);
node = ofw_bus_get_node(dev);
@@ -180,7 +182,10 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
/*
* Finalize configuration.
*/
- class = &uart_quicc_class;
+ if (fdt_is_compatible(node, "quicc"))
+ class = &uart_quicc_class;
+ if (fdt_is_compatible(node, "lpc"))
+ class = &uart_lpc_class;
if (fdt_is_compatible(node, "ns16550"))
class = &uart_ns8250_class;
OpenPOWER on IntegriCloud