diff options
Diffstat (limited to 'arch/arm/mach-lpc32xx/timer.c')
| -rw-r--r-- | arch/arm/mach-lpc32xx/timer.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/arm/mach-lpc32xx/timer.c b/arch/arm/mach-lpc32xx/timer.c index 6162ac308c20..b42c909bbeeb 100644 --- a/arch/arm/mach-lpc32xx/timer.c +++ b/arch/arm/mach-lpc32xx/timer.c | |||
| @@ -31,19 +31,6 @@ | |||
| 31 | #include <mach/platform.h> | 31 | #include <mach/platform.h> |
| 32 | #include "common.h" | 32 | #include "common.h" |
| 33 | 33 | ||
| 34 | static cycle_t lpc32xx_clksrc_read(struct clocksource *cs) | ||
| 35 | { | ||
| 36 | return (cycle_t)__raw_readl(LCP32XX_TIMER_TC(LPC32XX_TIMER1_BASE)); | ||
| 37 | } | ||
| 38 | |||
| 39 | static struct clocksource lpc32xx_clksrc = { | ||
| 40 | .name = "lpc32xx_clksrc", | ||
| 41 | .rating = 300, | ||
| 42 | .read = lpc32xx_clksrc_read, | ||
| 43 | .mask = CLOCKSOURCE_MASK(32), | ||
| 44 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
| 45 | }; | ||
| 46 | |||
| 47 | static int lpc32xx_clkevt_next_event(unsigned long delta, | 34 | static int lpc32xx_clkevt_next_event(unsigned long delta, |
| 48 | struct clock_event_device *dev) | 35 | struct clock_event_device *dev) |
| 49 | { | 36 | { |
| @@ -170,7 +157,9 @@ static void __init lpc32xx_timer_init(void) | |||
| 170 | __raw_writel(0, LCP32XX_TIMER_MCR(LPC32XX_TIMER1_BASE)); | 157 | __raw_writel(0, LCP32XX_TIMER_MCR(LPC32XX_TIMER1_BASE)); |
| 171 | __raw_writel(LCP32XX_TIMER_CNTR_TCR_EN, | 158 | __raw_writel(LCP32XX_TIMER_CNTR_TCR_EN, |
| 172 | LCP32XX_TIMER_TCR(LPC32XX_TIMER1_BASE)); | 159 | LCP32XX_TIMER_TCR(LPC32XX_TIMER1_BASE)); |
| 173 | clocksource_register_hz(&lpc32xx_clksrc, clkrate); | 160 | |
| 161 | clocksource_mmio_init(LCP32XX_TIMER_TC(LPC32XX_TIMER1_BASE), | ||
| 162 | "lpc32xx_clksrc", clkrate, 300, 32, clocksource_mmio_readl_up); | ||
| 174 | } | 163 | } |
| 175 | 164 | ||
| 176 | struct sys_timer lpc32xx_timer = { | 165 | struct sys_timer lpc32xx_timer = { |
