aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-arm
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@linaro.org>2013-09-13 13:49:18 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-09-17 15:28:18 +0100
commitd90abf9aa6aea90f2ffe402ca3bad8e6fdb9ef1b (patch)
tree7a9b8da8e525ad47b179aa00b33b4bdd506e9b53 /xen/include/asm-arm
parent34743911e7a49f424fc2e92b5148e411aae8e71c (diff)
downloadxen-d90abf9aa6aea90f2ffe402ca3bad8e6fdb9ef1b.tar.gz
xen-d90abf9aa6aea90f2ffe402ca3bad8e6fdb9ef1b.tar.bz2
xen-d90abf9aa6aea90f2ffe402ca3bad8e6fdb9ef1b.zip
xen/arm: Use dt_device_match to avoid multiple if conditions
There is some place in Xen ARM code where multiple if conditions is used check the presence of a node or find a node. These pieces of code can be replace by an array and using proper device tree helpers. Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/include/asm-arm')
-rw-r--r--xen/include/asm-arm/time.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xen/include/asm-arm/time.h b/xen/include/asm-arm/time.h
index f7aa86864f..9d302d34e8 100644
--- a/xen/include/asm-arm/time.h
+++ b/xen/include/asm-arm/time.h
@@ -1,6 +1,10 @@
#ifndef __ARM_TIME_H__
#define __ARM_TIME_H__
+#define DT_MATCH_TIMER \
+ DT_MATCH_COMPATIBLE("arm,armv7-timer"), \
+ DT_MATCH_COMPATIBLE("arm,armv8-timer")
+
typedef unsigned long cycles_t;
static inline cycles_t get_cycles (void)