summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2013-10-13 10:36:30 +0200
committerKevin Hilman <khilman@linaro.org>2013-10-17 14:36:24 -0700
commitbf94d09ddacd3e2e3ebb602fd1826982b0ce825f (patch)
treef0dd90a7b6d41a33645cf0691dcc9e1514fe6bd5 /arch/arm
parent15c03dd4859ab16f9212238f29dd315654aa94f6 (diff)
ARM: davinci: convert to clockevents_config_and_register
clockevents_config_and_register is superior compared to setting shift/mult and {min,max}_delta_ns by hand. Tested-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [nsekhar@ti.com: fix an alignment related checkpatch warning] Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-davinci/time.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 7a55b5c95971..ef2645a6f39f 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -331,7 +331,6 @@ static void davinci_set_mode(enum clock_event_mode mode,
static struct clock_event_device clockevent_davinci = {
.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
- .shift = 32,
.set_next_event = davinci_set_next_event,
.set_mode = davinci_set_mode,
};
@@ -397,14 +396,10 @@ void __init davinci_timer_init(void)
/* setup clockevent */
clockevent_davinci.name = id_to_name[timers[TID_CLOCKEVENT].id];
- clockevent_davinci.mult = div_sc(davinci_clock_tick_rate, NSEC_PER_SEC,
- clockevent_davinci.shift);
- clockevent_davinci.max_delta_ns =
- clockevent_delta2ns(0xfffffffe, &clockevent_davinci);
- clockevent_davinci.min_delta_ns = 50000; /* 50 usec */
clockevent_davinci.cpumask = cpumask_of(0);
- clockevents_register_device(&clockevent_davinci);
+ clockevents_config_and_register(&clockevent_davinci,
+ davinci_clock_tick_rate, 1, 0xfffffffe);
for (i=0; i< ARRAY_SIZE(timers); i++)
timer32_config(&timers[i]);