summaryrefslogtreecommitdiff
path: root/sys/arch/armv7
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-10-23 13:24:43 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-10-23 13:24:43 +0000
commita8c708926cfd7755b9eb9d41c5cd93e89fef24fe (patch)
tree69af9a5216ded99bf18293a13050c8063c59855b /sys/arch/armv7
parentf4f7538feb83a756171d2c2d3ec47431287f52c4 (diff)
Only attach on sun4i and sun5i. The timer implemented on later SoCs lacks
the 64-bit counter that we use as timecounter. Those SoCs have a generic timer so we don't need the SoC-specific one.
Diffstat (limited to 'sys/arch/armv7')
-rw-r--r--sys/arch/armv7/sunxi/sxitimer.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/armv7/sunxi/sxitimer.c b/sys/arch/armv7/sunxi/sxitimer.c
index 76864b49413..34df3d97de9 100644
--- a/sys/arch/armv7/sunxi/sxitimer.c
+++ b/sys/arch/armv7/sunxi/sxitimer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sxitimer.c,v 1.8 2016/10/22 15:16:25 kettenis Exp $ */
+/* $OpenBSD: sxitimer.c,v 1.9 2016/10/23 13:24:42 kettenis Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2013 Raphael Graf <r@undefined.ch>
@@ -133,6 +133,13 @@ int
sxitimer_match(struct device *parent, void *match, void *aux)
{
struct fdt_attach_args *faa = aux;
+ int node;
+
+ node = OF_finddevice("/");
+ if (!OF_is_compatible(node, "allwinner,sun4i-a10") &&
+ !OF_is_compatible(node, "allwinner,sun5i-a10s") &&
+ !OF_is_compatible(node, "allwinner,sun5i-a13"))
+ return 0;
return OF_is_compatible(faa->fa_node, "allwinner,sun4i-a10-timer");
}