summaryrefslogtreecommitdiff
path: root/include/linux/clockchips.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-11 00:55:28 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2010-02-11 00:55:28 (GMT)
commit84abd88a70090cf00f9e45c3a81680874f17626e (patch)
tree4f58b80057f6e1f5817af1dc33a5458b3dfc9a99 /include/linux/clockchips.h
parent13ca0fcaa33f6b1984c4111b6ec5df42689fea6f (diff)
parente28cab42f384745c8a947a9ccd51e4aae52f5d51 (diff)
downloadlinux-fsl-qoriq-84abd88a70090cf00f9e45c3a81680874f17626e.tar.xz
Merge remote branch 'linus/master' into x86/bootmem
Diffstat (limited to 'include/linux/clockchips.h')
-rw-r--r--include/linux/clockchips.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 3a1dbba..0cf725b 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -77,10 +77,10 @@ enum clock_event_nofitiers {
struct clock_event_device {
const char *name;
unsigned int features;
- unsigned long max_delta_ns;
- unsigned long min_delta_ns;
- unsigned long mult;
- int shift;
+ u64 max_delta_ns;
+ u64 min_delta_ns;
+ u32 mult;
+ u32 shift;
int rating;
int irq;
const struct cpumask *cpumask;
@@ -116,8 +116,8 @@ static inline unsigned long div_sc(unsigned long ticks, unsigned long nsec,
}
/* Clock event layer functions */
-extern unsigned long clockevent_delta2ns(unsigned long latch,
- struct clock_event_device *evt);
+extern u64 clockevent_delta2ns(unsigned long latch,
+ struct clock_event_device *evt);
extern void clockevents_register_device(struct clock_event_device *dev);
extern void clockevents_exchange_device(struct clock_event_device *old,
@@ -130,6 +130,13 @@ extern int clockevents_program_event(struct clock_event_device *dev,
extern void clockevents_handle_noop(struct clock_event_device *dev);
+static inline void
+clockevents_calc_mult_shift(struct clock_event_device *ce, u32 freq, u32 minsec)
+{
+ return clocks_calc_mult_shift(&ce->mult, &ce->shift, NSEC_PER_SEC,
+ freq, minsec);
+}
+
#ifdef CONFIG_GENERIC_CLOCKEVENTS
extern void clockevents_notify(unsigned long reason, void *arg);
#else