summaryrefslogtreecommitdiffstats
path: root/sys/arm/samsung
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-05-23 20:54:25 +0000
committerian <ian@FreeBSD.org>2015-05-23 20:54:25 +0000
commitf3f411e10b20906a8640a6316ddcc3c1f24725e3 (patch)
treeb8226cf0be8fe4cd6baeb7595bf89042db51e870 /sys/arm/samsung
parentce1bf49e72ea9be2396679cd9569beeec685e9c6 (diff)
downloadFreeBSD-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/samsung')
-rw-r--r--sys/arm/samsung/exynos/exynos_uart.c9
-rw-r--r--sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c2
-rw-r--r--sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c4
3 files changed, 12 insertions, 3 deletions
diff --git a/sys/arm/samsung/exynos/exynos_uart.c b/sys/arm/samsung/exynos/exynos_uart.c
index 0b3c7f7..9e33bcb 100644
--- a/sys/arm/samsung/exynos/exynos_uart.c
+++ b/sys/arm/samsung/exynos/exynos_uart.c
@@ -41,6 +41,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 <arm/samsung/exynos/exynos_uart.h>
@@ -372,7 +373,7 @@ exynos4210_bus_ioctl(struct uart_softc *sc, int request, intptr_t data)
return (EINVAL);
}
-struct uart_class uart_exynos4210_class = {
+static struct uart_class uart_exynos4210_class = {
"exynos4210 class",
exynos4210_methods,
1,
@@ -380,3 +381,9 @@ struct uart_class uart_exynos4210_class = {
.uc_range = 8,
.uc_rclk = 0,
};
+
+static struct ofw_compat_data compat_data[] = {
+ {"exynos", (uintptr_t)&uart_exynos4210_class},
+ {NULL, (uintptr_t)NULL},
+};
+UART_FDT_CLASS_AND_DEVICE(compat_data);
diff --git a/sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c b/sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c
index 2102d8b..882a546 100644
--- a/sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c
+++ b/sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c
@@ -19,6 +19,8 @@ __FBSDID("$FreeBSD$");
#include "uart_if.h"
+extern struct uart_class uart_s3c2410_class;
+
static int uart_s3c2410_probe(device_t dev);
static device_method_t uart_s3c2410_methods[] = {
diff --git a/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c b/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c
index 1beb12d..4be4b39 100644
--- a/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c
+++ b/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c
@@ -39,11 +39,11 @@ __FBSDID("$FreeBSD$");
#include <arm/samsung/s3c2xx0/s3c2xx0var.h>
+extern struct uart_class uart_s3c2410_class;
+
bus_space_tag_t uart_bus_space_io;
bus_space_tag_t uart_bus_space_mem;
-extern struct uart_ops uart_s3c2410_ops;
-
vm_offset_t s3c2410_uart_vaddr;
unsigned int s3c2410_pclk;
OpenPOWER on IntegriCloud