summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-05-20 01:42:57 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-05-20 01:42:57 +0000
commite93c49b02bd4bfcad098ac55ece59a0a74c7747e (patch)
treeb4412f751e6a97cdced372450f2c41d4c95c398b /sys
parent38435d8d807781175be775f4cb1b51e0805a1c1d (diff)
add init_mainbus() hooks for the other armv7 platforms
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/armv7/exynos/exynos_machdep.c11
-rw-r--r--sys/arch/armv7/omap/omap_machdep.c11
-rw-r--r--sys/arch/armv7/sunxi/sunxi_machdep.c11
-rw-r--r--sys/arch/armv7/vexpress/vexpress_machdep.c11
4 files changed, 40 insertions, 4 deletions
diff --git a/sys/arch/armv7/exynos/exynos_machdep.c b/sys/arch/armv7/exynos/exynos_machdep.c
index 4ccae1ac771..b96e246773c 100644
--- a/sys/arch/armv7/exynos/exynos_machdep.c
+++ b/sys/arch/armv7/exynos/exynos_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exynos_machdep.c,v 1.6 2016/04/24 00:57:23 patrick Exp $ */
+/* $OpenBSD: exynos_machdep.c,v 1.7 2016/05/20 01:42:56 jsg Exp $ */
/*
* Copyright (c) 2013 Patrick Wildt <patrick@blueri.se>
*
@@ -28,6 +28,7 @@
#include <arm/cortex/smc.h>
#include <arm/armv7/armv7var.h>
+#include <arm/mainbus/mainbus.h>
#include <armv7/armv7/armv7var.h>
#include <armv7/exynos/exdisplayvar.h>
#include <armv7/exynos/exuartvar.h>
@@ -83,6 +84,13 @@ exynos_platform_init_cons(void)
}
}
+void
+exynos_platform_init_mainbus(struct device *self)
+{
+ mainbus_legacy_found(self, "cortex");
+ mainbus_legacy_found(self, "exynos");
+}
+
static void
exynos_platform_watchdog_reset(void)
{
@@ -122,6 +130,7 @@ struct armv7_platform exynos_platform = {
.watchdog_reset = exynos_platform_watchdog_reset,
.powerdown = exynos_platform_powerdown,
.disable_l2_if_needed = exynos_platform_disable_l2_if_needed,
+ .init_mainbus = exynos_platform_init_mainbus,
};
struct armv7_platform *
diff --git a/sys/arch/armv7/omap/omap_machdep.c b/sys/arch/armv7/omap/omap_machdep.c
index 4e29a3e8291..d04e9d52992 100644
--- a/sys/arch/armv7/omap/omap_machdep.c
+++ b/sys/arch/armv7/omap/omap_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omap_machdep.c,v 1.6 2015/05/19 03:30:54 jsg Exp $ */
+/* $OpenBSD: omap_machdep.c,v 1.7 2016/05/20 01:42:56 jsg Exp $ */
/*
* Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -29,6 +29,7 @@
#include <arm/cortex/smc.h>
#include <arm/armv7/armv7var.h>
+#include <arm/mainbus/mainbus.h>
#include <armv7/armv7/armv7var.h>
#include <armv7/armv7/armv7_machdep.h>
@@ -78,6 +79,13 @@ omap_platform_init_cons(void)
}
void
+omap_platform_init_mainbus(struct device *self)
+{
+ mainbus_legacy_found(self, "cortex");
+ mainbus_legacy_found(self, "omap");
+}
+
+void
omap_platform_watchdog_reset(void)
{
omdog_reset();
@@ -121,6 +129,7 @@ struct armv7_platform omap_platform = {
.watchdog_reset = omap_platform_watchdog_reset,
.powerdown = omap_platform_powerdown,
.disable_l2_if_needed = omap_platform_disable_l2_if_needed,
+ .init_mainbus = omap_platform_init_mainbus,
};
struct armv7_platform *
diff --git a/sys/arch/armv7/sunxi/sunxi_machdep.c b/sys/arch/armv7/sunxi/sunxi_machdep.c
index 808b3b89dbe..32dfcc80dd7 100644
--- a/sys/arch/armv7/sunxi/sunxi_machdep.c
+++ b/sys/arch/armv7/sunxi/sunxi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sunxi_machdep.c,v 1.8 2015/05/19 03:30:54 jsg Exp $ */
+/* $OpenBSD: sunxi_machdep.c,v 1.9 2016/05/20 01:42:56 jsg Exp $ */
/*
* Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -28,6 +28,7 @@
#include <arm/cortex/smc.h>
#include <arm/armv7/armv7var.h>
+#include <arm/mainbus/mainbus.h>
#include <armv7/armv7/armv7var.h>
#include <armv7/armv7/armv7_machdep.h>
@@ -67,6 +68,13 @@ sunxi_platform_init_cons(void)
}
void
+sunxi_platform_init_mainbus(struct device *self)
+{
+ mainbus_legacy_found(self, "cortex");
+ mainbus_legacy_found(self, "sunxi");
+}
+
+void
sunxi_platform_watchdog_reset(void)
{
sxidog_reset();
@@ -105,6 +113,7 @@ struct armv7_platform sunxi_platform = {
.watchdog_reset = sunxi_platform_watchdog_reset,
.powerdown = sunxi_platform_powerdown,
.disable_l2_if_needed = sunxi_platform_disable_l2_if_needed,
+ .init_mainbus = sunxi_platform_init_mainbus,
};
struct armv7_platform *
diff --git a/sys/arch/armv7/vexpress/vexpress_machdep.c b/sys/arch/armv7/vexpress/vexpress_machdep.c
index 836712db247..f03331289fa 100644
--- a/sys/arch/armv7/vexpress/vexpress_machdep.c
+++ b/sys/arch/armv7/vexpress/vexpress_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vexpress_machdep.c,v 1.1 2015/06/08 06:33:16 jsg Exp $ */
+/* $OpenBSD: vexpress_machdep.c,v 1.2 2016/05/20 01:42:56 jsg Exp $ */
/*
* Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -28,6 +28,7 @@
#include <arm/cortex/smc.h>
#include <arm/armv7/armv7var.h>
+#include <arm/mainbus/mainbus.h>
#include <armv7/armv7/armv7var.h>
#include <armv7/vexpress/pl011var.h>
#include <armv7/armv7/armv7_machdep.h>
@@ -66,6 +67,13 @@ vexpress_platform_init_cons(void)
}
void
+vexpress_platform_init_mainbus(struct device *self)
+{
+ mainbus_legacy_found(self, "cortex");
+ mainbus_legacy_found(self, "vexpress");
+}
+
+void
vexpress_platform_watchdog_reset(void)
{
sysconf_reboot();
@@ -104,6 +112,7 @@ struct armv7_platform vexpress_platform = {
.watchdog_reset = vexpress_platform_watchdog_reset,
.powerdown = vexpress_platform_powerdown,
.disable_l2_if_needed = vexpress_platform_disable_l2_if_needed,
+ .init_mainbus = vexpress_platform_init_mainbus,
};
struct armv7_platform *