summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/time.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-11-11 17:05:34 +0300
committerThomas Gleixner <tglx@linutronix.de>2009-11-13 22:46:24 +0300
commite3a4fab0c0c30e21e104712f4e9cb39f175d0f21 (patch)
tree3e785ac76f07c043f9eaecc59427cda61bc54b67 /arch/mips/include/asm/time.h
parent7d2f944a2b836c69a9d260a0a5f0d1720d57fdff (diff)
downloadlinux-e3a4fab0c0c30e21e104712f4e9cb39f175d0f21.tar.xz
mips: Use generic mult/shift factor calculation for clocks
Replace the MIPS functions of mult/shift factor calculation for clock events and clock sources with inline functions which call the generic functions. The minimum guaranteed conversion range is set to 4 seconds which corresponds to the current MIPS implementation. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Mikael Pettersson <mikpe@it.uu.se> Acked-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Cc: John Stultz <johnstul@us.ibm.com> LKML-Reference: <20091111134229.807255074@linutronix.de>
Diffstat (limited to 'arch/mips/include/asm/time.h')
-rw-r--r--arch/mips/include/asm/time.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h
index df6a430de5eb..c7f1bfef1574 100644
--- a/arch/mips/include/asm/time.h
+++ b/arch/mips/include/asm/time.h
@@ -84,8 +84,16 @@ static inline int init_mips_clocksource(void)
#endif
}
-extern void clocksource_set_clock(struct clocksource *cs, unsigned int clock);
-extern void clockevent_set_clock(struct clock_event_device *cd,
- unsigned int clock);
+static inline void clocksource_set_clock(struct clocksource *cs,
+ unsigned int clock)
+{
+ clocksource_calc_mult_shift(cs, clock, 4);
+}
+
+static inline void clockevent_set_clock(struct clock_event_device *cd,
+ unsigned int clock)
+{
+ clockevents_calc_mult_shift(cd, clock, 4);
+}
#endif /* _ASM_TIME_H */