summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart/uart_dev_pl011.c
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-03-07 15:24:15 +0000
committerian <ian@FreeBSD.org>2015-03-07 15:24:15 +0000
commit550c116c702749dbb815eb45b23be45cebc2bddf (patch)
tree88196238c24ac63246b527ccfa8cfddcb66fc935 /sys/dev/uart/uart_dev_pl011.c
parent7292a1689e4ab84c597c91255e4c24a2313d2420 (diff)
downloadFreeBSD-src-550c116c702749dbb815eb45b23be45cebc2bddf.zip
FreeBSD-src-550c116c702749dbb815eb45b23be45cebc2bddf.tar.gz
Move the uart_class definitions and fdt compat data into the individual
uart implementations, and export them using the new linker-set mechanism. Differential Revision: https://reviews.freebsd.org/D1993 Submitted by: Michal Meloun
Diffstat (limited to 'sys/dev/uart/uart_dev_pl011.c')
-rw-r--r--sys/dev/uart/uart_dev_pl011.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c
index e8e23d5..8443adb 100644
--- a/sys/dev/uart/uart_dev_pl011.c
+++ b/sys/dev/uart/uart_dev_pl011.c
@@ -35,6 +35,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"
@@ -266,7 +267,7 @@ static kobj_method_t uart_pl011_methods[] = {
{ 0, 0 }
};
-struct uart_class uart_pl011_class = {
+static struct uart_class uart_pl011_class = {
"uart_pl011",
uart_pl011_methods,
sizeof(struct uart_pl011_softc),
@@ -275,6 +276,12 @@ struct uart_class uart_pl011_class = {
.uc_rclk = 0
};
+static struct ofw_compat_data compat_data[] = {
+ {"arm,pl011", (uintptr_t)&uart_pl011_class},
+ {NULL, (uintptr_t)NULL},
+};
+UART_FDT_CLASS_AND_DEVICE(compat_data);
+
static int
uart_pl011_bus_attach(struct uart_softc *sc)
{
OpenPOWER on IntegriCloud