From 57cc4f7de2b896ca79185e337eaf7ff9906c4656 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 12 May 2011 15:31:13 +0100 Subject: clockevents: ARM sp804: allow clockevent name to be specified This allows platforms to specify the clcokevent name upon registration. Acked-by: Catalin Marinas Signed-off-by: Russell King --- arch/arm/common/timer-sp.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'arch/arm/common') diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index 166f892a24d..5b7e8c9046b 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c @@ -139,7 +139,6 @@ static int sp804_set_next_event(unsigned long next, } static struct clock_event_device sp804_clockevent = { - .name = "timer0", .shift = 32, .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, .set_mode = sp804_set_mode, @@ -155,17 +154,19 @@ static struct irqaction sp804_timer_irq = { .dev_id = &sp804_clockevent, }; -void __init sp804_clockevents_init(void __iomem *base, unsigned int timer_irq) +void __init sp804_clockevents_init(void __iomem *base, unsigned int irq, + const char *name) { struct clock_event_device *evt = &sp804_clockevent; clkevt_base = base; - evt->irq = timer_irq; + evt->name = name; + evt->irq = irq; evt->mult = div_sc(TIMER_FREQ_KHZ, NSEC_PER_MSEC, evt->shift); evt->max_delta_ns = clockevent_delta2ns(0xffffffff, evt); evt->min_delta_ns = clockevent_delta2ns(0xf, evt); - setup_irq(timer_irq, &sp804_timer_irq); + setup_irq(irq, &sp804_timer_irq); clockevents_register_device(evt); } -- cgit v1.2.3