summaryrefslogtreecommitdiff
path: root/sys/arch/armv7/exynos
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-05-20 00:14:57 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-05-20 00:14:57 +0000
commit6ac17d698e9f2555d6a749c220845b8f7efc534f (patch)
treef2878769f10d63efcc7c6668cc77d4442c38b343 /sys/arch/armv7/exynos
parent4c7b8e46dd62891a15569e870093e0333bb3a057 (diff)
add per soc match functions instead of using armv7_match
Diffstat (limited to 'sys/arch/armv7/exynos')
-rw-r--r--sys/arch/armv7/exynos/exynos.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/sys/arch/armv7/exynos/exynos.c b/sys/arch/armv7/exynos/exynos.c
index 8b2e79849cd..f2dcf8c4762 100644
--- a/sys/arch/armv7/exynos/exynos.c
+++ b/sys/arch/armv7/exynos/exynos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exynos.c,v 1.3 2015/05/19 03:30:54 jsg Exp $ */
+/* $OpenBSD: exynos.c,v 1.4 2015/05/20 00:14:55 jsg Exp $ */
/*
* Copyright (c) 2005,2008 Dale Rahn <drahn@openbsd.com>
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
@@ -24,24 +24,8 @@
#include <armv7/armv7/armv7var.h>
-static int
-exynos_match(struct device *parent, void *cfdata, void *aux)
-{
- /* If we're running with fdt, do not attach. */
- /* XXX: Find a better way. */
- if (fdt_next_node(0))
- return (0);
-
- switch (board_id)
- {
- case BOARD_ID_EXYNOS5_CHROMEBOOK:
- return (1);
- }
-
- return (0);
-}
-
-void exynos5_init();
+int exynos_match(struct device *, void *, void *);
+void exynos5_init();
struct cfattach exynos_ca = {
sizeof(struct armv7_softc), exynos_match, armv7_attach, NULL,
@@ -120,3 +104,14 @@ exynos_board_name(void)
}
return (NULL);
}
+
+int
+exynos_match(struct device *parent, void *cfdata, void *aux)
+{
+ /* If we're running with fdt, do not attach. */
+ /* XXX: Find a better way. */
+ if (fdt_next_node(0))
+ return (0);
+
+ return (imx_board_devs() != NULL);
+}