summaryrefslogtreecommitdiffstats
path: root/include/clock.h
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-11-26 20:56:26 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2010-11-29 21:55:25 +0100
commitc448d8c6595a6a2a4725f71b27b2ad41875a0ef6 (patch)
treeaa20068b5ec80b17ec5705c383918078634555e2 /include/clock.h
parent53dbaf3fc7b8371ed1e24ef96715e41d60b8ebc3 (diff)
downloadbarebox-c448d8c6595a6a2a4725f71b27b2ad41875a0ef6.tar.gz
barebox-c448d8c6595a6a2a4725f71b27b2ad41875a0ef6.tar.xz
clocksource: import CLOCKSOURCE_MASK from the kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/clock.h')
-rw-r--r--include/clock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clock.h b/include/clock.h
index 278f6e87b2..b9acdb9b69 100644
--- a/include/clock.h
+++ b/include/clock.h
@@ -3,6 +3,8 @@
#ifndef CLOCK_H
#define CLOCK_H
+#define CLOCKSOURCE_MASK(bits) (uint64_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
+
struct clocksource {
uint32_t shift;
uint32_t mult;