diff options
author | ian <ian@FreeBSD.org> | 2015-05-23 20:54:25 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2015-05-23 20:54:25 +0000 |
commit | f3f411e10b20906a8640a6316ddcc3c1f24725e3 (patch) | |
tree | b8226cf0be8fe4cd6baeb7595bf89042db51e870 /sys/arm/freescale | |
parent | ce1bf49e72ea9be2396679cd9569beeec685e9c6 (diff) | |
download | FreeBSD-src-f3f411e10b20906a8640a6316ddcc3c1f24725e3.zip FreeBSD-src-f3f411e10b20906a8640a6316ddcc3c1f24725e3.tar.gz |
MFC r279723, r279724:
Define new linker set, UART_FDT_CLASS_AND_DEVICE, for registering full
(class and device) FDT UART. Define second one, UART_FDT_CLASS, for UART
class only.
Move the uart_class definitions and fdt compat data into the individual
uart implementations, and export them using the new linker-set mechanism.
Diffstat (limited to 'sys/arm/freescale')
-rw-r--r-- | sys/arm/freescale/vybrid/vf_uart.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arm/freescale/vybrid/vf_uart.c b/sys/arm/freescale/vybrid/vf_uart.c index d181432..da11871 100644 --- a/sys/arm/freescale/vybrid/vf_uart.c +++ b/sys/arm/freescale/vybrid/vf_uart.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include <dev/uart/uart.h> #include <dev/uart/uart_cpu.h> +#include <dev/uart/uart_cpu_fdt.h> #include <dev/uart/uart_bus.h> #include "uart_if.h" @@ -270,7 +271,7 @@ static kobj_method_t vf_uart_methods[] = { { 0, 0 } }; -struct uart_class uart_vybrid_class = { +static struct uart_class uart_vybrid_class = { "vybrid", vf_uart_methods, sizeof(struct vf_uart_softc), @@ -279,6 +280,12 @@ struct uart_class uart_vybrid_class = { .uc_rclk = 24000000 /* TODO: get value from CCM */ }; +static struct ofw_compat_data compat_data[] = { + {"fsl,mvf600-uart", (uintptr_t)&uart_vybrid_class}, + {NULL, (uintptr_t)NULL}, +}; +UART_FDT_CLASS_AND_DEVICE(compat_data); + static int vf_uart_bus_attach(struct uart_softc *sc) { |