summaryrefslogtreecommitdiff
path: root/sys/arch/arm/mainbus
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-05-18 22:55:24 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-05-18 22:55:24 +0000
commit242c5841110a7ae4dc1cc7247dbca585cb677344 (patch)
tree356e345c3fc83d8adfac9d69b26d15821c29193a /sys/arch/arm/mainbus
parentdfa61228962db91293426cd4a998572bd0ef0260 (diff)
Introduce a per-platform init_mainbus() hook that can be used to attach
platform-specific devices to mainbus before we start walking the FDT. ok patrick@
Diffstat (limited to 'sys/arch/arm/mainbus')
-rw-r--r--sys/arch/arm/mainbus/mainbus.c7
-rw-r--r--sys/arch/arm/mainbus/mainbus.h4
2 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/arm/mainbus/mainbus.c b/sys/arch/arm/mainbus/mainbus.c
index c42e0dcbdf6..91b5811f043 100644
--- a/sys/arch/arm/mainbus/mainbus.c
+++ b/sys/arch/arm/mainbus/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.8 2016/05/02 08:15:55 patrick Exp $ */
+/* $OpenBSD: mainbus.c,v 1.9 2016/05/18 22:55:23 kettenis Exp $ */
/*
* Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
*
@@ -30,7 +30,6 @@ void mainbus_attach(struct device *, struct device *, void *);
void mainbus_attach_node(struct device *, int);
int mainbus_legacy_search(struct device *, void *, void *);
-void mainbus_legacy_found(struct device *, char *);
struct mainbus_softc {
struct device sc_dev;
@@ -102,6 +101,10 @@ mainbus_attach(struct device *parent, struct device *self, void *aux)
/* Attach CPU first. */
mainbus_legacy_found(self, "cpu");
+#ifdef CPU_ARMv7
+ extern void platform_init_mainbus(struct device *);
+ platform_init_mainbus(self);
+#endif
/* TODO: Scan for interrupt controllers and attach them first? */
diff --git a/sys/arch/arm/mainbus/mainbus.h b/sys/arch/arm/mainbus/mainbus.h
index 42a4076de34..059ca2550e8 100644
--- a/sys/arch/arm/mainbus/mainbus.h
+++ b/sys/arch/arm/mainbus/mainbus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.h,v 1.3 2016/05/02 08:15:55 patrick Exp $ */
+/* $OpenBSD: mainbus.h,v 1.4 2016/05/18 22:55:23 kettenis Exp $ */
/*
* Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
*
@@ -26,4 +26,6 @@ union mainbus_attach_args {
struct fdt_attach_args ma_faa;
};
+void mainbus_legacy_found(struct device *, char *);
+
#endif /* __MAINBUS_H__ */