From 50e55c591e3360faae6555381b8f6d03496848a7 Mon Sep 17 00:00:00 2001 From: gonzo Date: Wed, 15 Aug 2012 05:37:10 +0000 Subject: Merging of projects/armv6, part 8 r235162: Initial LPC32x0 support. Includes DTS file for Embedded Artists EA3250 board. Peripherals currently supported: - Serial ports - Interrupt controller - Timers - Ethernet - USB host - Framebuffer (in conjunction with SSD1289 LCD controller) - RTC - SPI - GPIO Submitted by: Jakub Wojciech Klama --- sys/dev/uart/uart_bus_fdt.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sys/dev/uart/uart_bus_fdt.c') 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; -- cgit v1.1