summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2017-03-03 13:34:01 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-09 07:36:15 +0100
commit6bc48eabbfe78906ac2b7fa8e12cc9b0608c76bd (patch)
treef33412aab697a989397b0152ab4256ada4a138ee /include
parent92c1033036a0f1d65fb71e7c04cfb9393d31aa1c (diff)
downloadbarebox-6bc48eabbfe78906ac2b7fa8e12cc9b0608c76bd.tar.gz
barebox-6bc48eabbfe78906ac2b7fa8e12cc9b0608c76bd.tar.xz
clocksource: allow to have multiple device from clock source
use the one with the most priority. We can not select the clocksource at user level. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/clock.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clock.h b/include/clock.h
index d65e404e86..5f2f53ab66 100644
--- a/include/clock.h
+++ b/include/clock.h
@@ -12,7 +12,8 @@ struct clocksource {
uint64_t (*read)(void);
uint64_t cycle_last;
uint64_t mask;
-
+ int priority;
+ int (*init)(struct clocksource*);
};
static inline uint32_t cyc2ns(struct clocksource *cs, uint64_t cycles)