summaryrefslogtreecommitdiff
path: root/sys/arch/armv7
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2016-08-15 13:42:50 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2016-08-15 13:42:50 +0000
commit3136daf2094ee57c5b7e4786c7729720d116fc4a (patch)
tree1fd53c2085ff83e6a983c1e44ee2bf1401280dfc /sys/arch/armv7
parent7bdcb30229e15c4c6e635ab6da38dfe8b1ee2882 (diff)
Move the com(4) fdt attachment driver to a more generic location and
rename it to fit the typical scheme of such an attachment driver. ok kettenis@ jsg@
Diffstat (limited to 'sys/arch/armv7')
-rw-r--r--sys/arch/armv7/armv7/platform.c6
-rw-r--r--sys/arch/armv7/conf/files.armv76
-rw-r--r--sys/arch/armv7/dev/com_fdt.c (renamed from sys/arch/armv7/omap/omap_com.c)22
-rw-r--r--sys/arch/armv7/omap/files.omap6
4 files changed, 20 insertions, 20 deletions
diff --git a/sys/arch/armv7/armv7/platform.c b/sys/arch/armv7/armv7/platform.c
index aa2bafa1d86..80ce5f1ad87 100644
--- a/sys/arch/armv7/armv7/platform.c
+++ b/sys/arch/armv7/armv7/platform.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: platform.c,v 1.10 2016/08/10 06:51:57 kettenis Exp $ */
+/* $OpenBSD: platform.c,v 1.11 2016/08/15 13:42:49 patrick Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
*
@@ -38,7 +38,7 @@ void agtimer_init(void);
void exuart_init_cons(void);
void imxuart_init_cons(void);
-void omapuart_init_cons(void);
+void com_fdt_init_cons(void);
void sxiuart_init_cons(void);
void pl011_init_cons(void);
void bcmmuart_init_cons(void);
@@ -106,7 +106,7 @@ platform_init_cons(void)
}
exuart_init_cons();
imxuart_init_cons();
- omapuart_init_cons();
+ com_fdt_init_cons();
sxiuart_init_cons();
pl011_init_cons();
bcmmuart_init_cons();
diff --git a/sys/arch/armv7/conf/files.armv7 b/sys/arch/armv7/conf/files.armv7
index c427ccf6176..60a9e2bb68e 100644
--- a/sys/arch/armv7/conf/files.armv7
+++ b/sys/arch/armv7/conf/files.armv7
@@ -1,4 +1,4 @@
-# $OpenBSD: files.armv7,v 1.23 2016/08/13 10:58:45 kettenis Exp $
+# $OpenBSD: files.armv7,v 1.24 2016/08/15 13:42:49 patrick Exp $
maxpartitions 16
maxusers 2 8 64
@@ -71,3 +71,7 @@ include "arch/armv7/sunxi/files.sunxi"
include "arch/armv7/exynos/files.exynos"
include "arch/armv7/vexpress/files.vexpress"
include "arch/armv7/broadcom/files.broadcom"
+
+# Console related stuff
+attach com at fdt with com_fdt
+file arch/armv7/dev/com_fdt.c com_fdt
diff --git a/sys/arch/armv7/omap/omap_com.c b/sys/arch/armv7/dev/com_fdt.c
index 4b80887e737..9e83c243779 100644
--- a/sys/arch/armv7/omap/omap_com.c
+++ b/sys/arch/armv7/dev/com_fdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omap_com.c,v 1.10 2016/08/12 03:22:41 jsg Exp $ */
+/* $OpenBSD: com_fdt.c,v 1.1 2016/08/15 13:42:49 patrick Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
* All rights reserved.
@@ -59,20 +59,20 @@
#define com_isr 8
#define ISR_RECV (ISR_RXPL | ISR_XMODE | ISR_RCVEIR)
-int omapuart_match(struct device *, void *, void *);
-void omapuart_attach(struct device *, struct device *, void *);
-int omapuart_activate(struct device *, int);
+int com_fdt_match(struct device *, void *, void *);
+void com_fdt_attach(struct device *, struct device *, void *);
+int com_fdt_activate(struct device *, int);
extern int comcnspeed;
extern int comcnmode;
-struct cfattach com_omap_ca = {
- sizeof (struct com_softc), omapuart_match, omapuart_attach, NULL,
- omapuart_activate
+struct cfattach com_fdt_ca = {
+ sizeof (struct com_softc), com_fdt_match, com_fdt_attach, NULL,
+ com_fdt_activate
};
void
-omapuart_init_cons(void)
+com_fdt_init_cons(void)
{
struct fdt_reg reg;
void *node;
@@ -89,7 +89,7 @@ omapuart_init_cons(void)
}
int
-omapuart_match(struct device *parent, void *match, void *aux)
+com_fdt_match(struct device *parent, void *match, void *aux)
{
struct fdt_attach_args *faa = aux;
@@ -98,7 +98,7 @@ omapuart_match(struct device *parent, void *match, void *aux)
}
void
-omapuart_attach(struct device *parent, struct device *self, void *aux)
+com_fdt_attach(struct device *parent, struct device *self, void *aux)
{
struct com_softc *sc = (struct com_softc *)self;
struct fdt_attach_args *faa = aux;
@@ -126,7 +126,7 @@ omapuart_attach(struct device *parent, struct device *self, void *aux)
}
int
-omapuart_activate(struct device *self, int act)
+com_fdt_activate(struct device *self, int act)
{
struct com_softc *sc = (struct com_softc *)self;
bus_space_tag_t iot = sc->sc_iot;
diff --git a/sys/arch/armv7/omap/files.omap b/sys/arch/armv7/omap/files.omap
index 295d9ead933..976733b6852 100644
--- a/sys/arch/armv7/omap/files.omap
+++ b/sys/arch/armv7/omap/files.omap
@@ -1,4 +1,4 @@
-# $OpenBSD: files.omap,v 1.16 2016/08/11 04:33:06 jsg Exp $
+# $OpenBSD: files.omap,v 1.17 2016/08/15 13:42:49 patrick Exp $
define omap {}
device omap: omap
@@ -65,10 +65,6 @@ device omehci: usbus
attach omehci at fdt
file arch/armv7/omap/omehci.c omehci
-# NS16550 compatible serial ports
-attach com at fdt with com_omap
-file arch/armv7/omap/omap_com.c com_omap
-
device omusbtll
attach omusbtll at omap
file arch/armv7/omap/omusbtll.c omusbtll