Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clockevents: ARM sp804: allow clockevent name to be specified

This allows platforms to specify the clcokevent name upon registration.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

+13 -10
+5 -4
arch/arm/common/timer-sp.c
··· 139 139 } 140 140 141 141 static struct clock_event_device sp804_clockevent = { 142 - .name = "timer0", 143 142 .shift = 32, 144 143 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 145 144 .set_mode = sp804_set_mode, ··· 154 155 .dev_id = &sp804_clockevent, 155 156 }; 156 157 157 - void __init sp804_clockevents_init(void __iomem *base, unsigned int timer_irq) 158 + void __init sp804_clockevents_init(void __iomem *base, unsigned int irq, 159 + const char *name) 158 160 { 159 161 struct clock_event_device *evt = &sp804_clockevent; 160 162 161 163 clkevt_base = base; 162 164 163 - evt->irq = timer_irq; 165 + evt->name = name; 166 + evt->irq = irq; 164 167 evt->mult = div_sc(TIMER_FREQ_KHZ, NSEC_PER_MSEC, evt->shift); 165 168 evt->max_delta_ns = clockevent_delta2ns(0xffffffff, evt); 166 169 evt->min_delta_ns = clockevent_delta2ns(0xf, evt); 167 170 168 - setup_irq(timer_irq, &sp804_timer_irq); 171 + setup_irq(irq, &sp804_timer_irq); 169 172 clockevents_register_device(evt); 170 173 }
+1 -1
arch/arm/include/asm/hardware/timer-sp.h
··· 1 1 void sp804_clocksource_init(void __iomem *, const char *); 2 - void sp804_clockevents_init(void __iomem *, unsigned int); 2 + void sp804_clockevents_init(void __iomem *, unsigned int, const char *);
+1 -1
arch/arm/mach-integrator/integrator_cp.c
··· 484 484 writel(0, TIMER2_VA_BASE + TIMER_CTRL); 485 485 486 486 sp804_clocksource_init(TIMER2_VA_BASE, "timer2"); 487 - sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1); 487 + sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1, "timer1"); 488 488 } 489 489 490 490 static struct sys_timer cp_timer = {
+1 -1
arch/arm/mach-realview/core.c
··· 553 553 writel(0, timer3_va_base + TIMER_CTRL); 554 554 555 555 sp804_clocksource_init(timer3_va_base, "timer3"); 556 - sp804_clockevents_init(timer0_va_base, timer_irq); 556 + sp804_clockevents_init(timer0_va_base, timer_irq, "timer0"); 557 557 } 558 558 559 559 /*
+1 -1
arch/arm/mach-versatile/core.c
··· 772 772 writel(0, TIMER3_VA_BASE + TIMER_CTRL); 773 773 774 774 sp804_clocksource_init(TIMER3_VA_BASE, "timer3"); 775 - sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMERINT0_1); 775 + sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMERINT0_1, "timer0"); 776 776 } 777 777 778 778 struct sys_timer versatile_timer = {
+2 -1
arch/arm/mach-vexpress/ct-ca9x4.c
··· 72 72 writel(0, MMIO_P2V(CT_CA9X4_TIMER1) + TIMER_CTRL); 73 73 74 74 sp804_clocksource_init(MMIO_P2V(CT_CA9X4_TIMER1), "ct-timer1"); 75 - sp804_clockevents_init(MMIO_P2V(CT_CA9X4_TIMER0), IRQ_CT_CA9X4_TIMER0); 75 + sp804_clockevents_init(MMIO_P2V(CT_CA9X4_TIMER0), IRQ_CT_CA9X4_TIMER0, 76 + "ct-timer0"); 76 77 } 77 78 78 79 static struct sys_timer ct_ca9x4_timer = {
+2 -1
arch/arm/mach-vexpress/v2m.c
··· 66 66 writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL); 67 67 68 68 sp804_clocksource_init(MMIO_P2V(V2M_TIMER1), "v2m-timer1"); 69 - sp804_clockevents_init(MMIO_P2V(V2M_TIMER0), IRQ_V2M_TIMER0); 69 + sp804_clockevents_init(MMIO_P2V(V2M_TIMER0), IRQ_V2M_TIMER0, 70 + "v2m-timer0"); 70 71 } 71 72 72 73 static struct sys_timer v2m_timer = {