diff options
author | gonzo <gonzo@FreeBSD.org> | 2012-08-15 05:37:10 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2012-08-15 05:37:10 +0000 |
commit | 50e55c591e3360faae6555381b8f6d03496848a7 (patch) | |
tree | 0148708ccb0c47afaebce0270bbe1d549f9ec6ea /sys/dev/uart/uart_bus_fdt.c | |
parent | 8b8633cc987a479a321d1f508e8cbed2e3b0907a (diff) | |
download | FreeBSD-src-50e55c591e3360faae6555381b8f6d03496848a7.zip FreeBSD-src-50e55c591e3360faae6555381b8f6d03496848a7.tar.gz |
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 <jceel@freebsd.org>
Diffstat (limited to 'sys/dev/uart/uart_bus_fdt.c')
-rw-r--r-- | sys/dev/uart/uart_bus_fdt.c | 15 |
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; |