[PATCH] clocksource: import CLOCKSOURCE_MASK from the kernel
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Nov 26 14:56:26 EST 2010
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
include/clock.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/clock.h b/include/clock.h
index 278f6e8..b9acdb9 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;
--
1.7.1
More information about the barebox
mailing list