summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2018-03-29 20:33:54 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2018-03-29 20:33:54 +0000
commite95aaa532d5b40ff17620063a3e639c76bf81887 (patch)
tree9388ca3eb4a525086be3faacb631216fb3ad7fcc
parent9d9c11a38a3463d3ce8191edd4cd16089649b27e (diff)
Move imxuart(4) to sys/dev/fdt so it can be shared between arm64 and armv7.
Discussed with kettenis@
-rw-r--r--sys/arch/arm64/conf/GENERIC5
-rw-r--r--sys/arch/arm64/conf/RAMDISK5
-rw-r--r--sys/arch/armv7/imx/files.imx6
-rw-r--r--sys/dev/fdt/files.fdt8
-rw-r--r--sys/dev/fdt/imxuart.c (renamed from sys/arch/armv7/imx/imxuart.c)6
-rw-r--r--sys/dev/fdt/imxuartreg.h (renamed from sys/arch/armv7/imx/imxuartreg.h)2
-rw-r--r--sys/dev/fdt/imxuartvar.h (renamed from sys/arch/armv7/imx/imxuartvar.h)2
7 files changed, 20 insertions, 14 deletions
diff --git a/sys/arch/arm64/conf/GENERIC b/sys/arch/arm64/conf/GENERIC
index f57311b53cd..1bb6051a8b1 100644
--- a/sys/arch/arm64/conf/GENERIC
+++ b/sys/arch/arm64/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.53 2018/03/29 18:57:41 kettenis Exp $
+# $OpenBSD: GENERIC,v 1.54 2018/03/29 20:33:53 patrick Exp $
#
# GENERIC machine description file
#
@@ -83,6 +83,9 @@ option WSDISPLAY_DEFAULTSCREENS=6 # initial number of text consoles
simplefb* at fdt?
wsdisplay* at simplefb?
+# iMX
+imxuart* at fdt?
+
# Raspberry Pi 3
bcmaux* at fdt?
bcmintc* at fdt?
diff --git a/sys/arch/arm64/conf/RAMDISK b/sys/arch/arm64/conf/RAMDISK
index 666a4bfc6cd..bf5a2793d13 100644
--- a/sys/arch/arm64/conf/RAMDISK
+++ b/sys/arch/arm64/conf/RAMDISK
@@ -1,4 +1,4 @@
-# $OpenBSD: RAMDISK,v 1.45 2018/03/29 18:57:41 kettenis Exp $
+# $OpenBSD: RAMDISK,v 1.46 2018/03/29 20:33:53 patrick Exp $
#
# GENERIC machine description file
#
@@ -90,6 +90,9 @@ vioscsi* at virtio?
simplefb* at fdt?
wsdisplay* at simplefb?
+# iMX
+imxuart* at fdt?
+
# Raspberry Pi 3
bcmaux* at fdt?
bcmintc* at fdt?
diff --git a/sys/arch/armv7/imx/files.imx b/sys/arch/armv7/imx/files.imx
index a286af0cd09..73e2e2cce1e 100644
--- a/sys/arch/armv7/imx/files.imx
+++ b/sys/arch/armv7/imx/files.imx
@@ -1,8 +1,4 @@
-# $OpenBSD: files.imx,v 1.21 2017/10/23 17:37:51 kettenis Exp $
-
-device imxuart
-attach imxuart at fdt
-file arch/armv7/imx/imxuart.c imxuart
+# $OpenBSD: files.imx,v 1.22 2018/03/29 20:33:53 patrick Exp $
device imxccm
attach imxccm at fdt
diff --git a/sys/dev/fdt/files.fdt b/sys/dev/fdt/files.fdt
index 66dc17370cd..d6e3ee451b2 100644
--- a/sys/dev/fdt/files.fdt
+++ b/sys/dev/fdt/files.fdt
@@ -1,4 +1,4 @@
-# $OpenBSD: files.fdt,v 1.45 2018/03/29 18:20:52 kettenis Exp $
+# $OpenBSD: files.fdt,v 1.46 2018/03/29 20:33:53 patrick Exp $
#
# Config file and device description for machine-independent FDT code.
# Included by ports that need it.
@@ -180,4 +180,8 @@ file dev/fdt/if_dwxe.c dwxe
device acrtc
attach acrtc at rsb
-file dev/fdt/acrtc.c acrtc \ No newline at end of file
+file dev/fdt/acrtc.c acrtc
+
+device imxuart
+attach imxuart at fdt
+file dev/fdt/imxuart.c imxuart
diff --git a/sys/arch/armv7/imx/imxuart.c b/sys/dev/fdt/imxuart.c
index 90c1d54ce67..3880835ff59 100644
--- a/sys/arch/armv7/imx/imxuart.c
+++ b/sys/dev/fdt/imxuart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxuart.c,v 1.19 2018/03/20 23:05:54 patrick Exp $ */
+/* $OpenBSD: imxuart.c,v 1.1 2018/03/29 20:33:53 patrick Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*
@@ -38,8 +38,8 @@
#include <ddb/db_var.h>
#endif
-#include <armv7/imx/imxuartreg.h>
-#include <armv7/imx/imxuartvar.h>
+#include <dev/fdt/imxuartreg.h>
+#include <dev/fdt/imxuartvar.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_clock.h>
diff --git a/sys/arch/armv7/imx/imxuartreg.h b/sys/dev/fdt/imxuartreg.h
index 4518afd547c..d7e561adeca 100644
--- a/sys/arch/armv7/imx/imxuartreg.h
+++ b/sys/dev/fdt/imxuartreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxuartreg.h,v 1.1 2013/09/06 20:45:54 patrick Exp $ */
+/* $OpenBSD: imxuartreg.h,v 1.1 2018/03/29 20:33:53 patrick Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*
diff --git a/sys/arch/armv7/imx/imxuartvar.h b/sys/dev/fdt/imxuartvar.h
index 66b9a4d2123..fda3963ffac 100644
--- a/sys/arch/armv7/imx/imxuartvar.h
+++ b/sys/dev/fdt/imxuartvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxuartvar.h,v 1.1 2013/09/06 20:45:54 patrick Exp $ */
+/* $OpenBSD: imxuartvar.h,v 1.1 2018/03/29 20:33:53 patrick Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*