aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s5p/s5p-time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s5p/s5p-time.c')
-rw-r--r--arch/arm/plat-s5p/s5p-time.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/arch/arm/plat-s5p/s5p-time.c b/arch/arm/plat-s5p/s5p-time.c
index 7c82f06baf57..c833e7b57599 100644
--- a/arch/arm/plat-s5p/s5p-time.c
+++ b/arch/arm/plat-s5p/s5p-time.c
@@ -314,13 +314,6 @@ static void __iomem *s5p_timer_reg(void)
314 return S3C_TIMERREG(offset); 314 return S3C_TIMERREG(offset);
315} 315}
316 316
317static cycle_t s5p_timer_read(struct clocksource *cs)
318{
319 void __iomem *reg = s5p_timer_reg();
320
321 return (cycle_t) (reg ? ~__raw_readl(reg) : 0);
322}
323
324/* 317/*
325 * Override the global weak sched_clock symbol with this 318 * Override the global weak sched_clock symbol with this
326 * local implementation which uses the clocksource to get some 319 * local implementation which uses the clocksource to get some
@@ -350,14 +343,6 @@ static void notrace s5p_update_sched_clock(void)
350 update_sched_clock(&cd, ~__raw_readl(reg), (u32)~0); 343 update_sched_clock(&cd, ~__raw_readl(reg), (u32)~0);
351} 344}
352 345
353struct clocksource time_clocksource = {
354 .name = "s5p_clocksource_timer",
355 .rating = 250,
356 .read = s5p_timer_read,
357 .mask = CLOCKSOURCE_MASK(32),
358 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
359};
360
361static void __init s5p_clocksource_init(void) 346static void __init s5p_clocksource_init(void)
362{ 347{
363 unsigned long pclk; 348 unsigned long pclk;
@@ -375,8 +360,9 @@ static void __init s5p_clocksource_init(void)
375 360
376 init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate); 361 init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate);
377 362
378 if (clocksource_register_hz(&time_clocksource, clock_rate)) 363 if (clocksource_mmio_init(s5p_timer_reg(), "s5p_clocksource_timer",
379 panic("%s: can't register clocksource\n", time_clocksource.name); 364 clock_rate, 250, 32, clocksource_mmio_readl_down))
365 panic("s5p_clocksource_timer: can't register clocksource\n");
380} 366}
381 367
382static void __init s5p_timer_resources(void) 368static void __init s5p_timer_resources(void)