aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-05-12 07:08:23 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-05-23 13:04:53 -0400
commitfb593cf38fc426331275d761fefe13096070f56a (patch)
treef650ea0f76fe48d7e54a8cce506c099b6599c470 /arch/arm
parent933e54a53ccb68543ffb7ea32168ea086c93d09a (diff)
clocksource: ARM sp804: allow clocksource name to be specified
This allows platforms to specify the clocksource name upon registration, which is necessary should they wish to register more than one sp804 clocksource. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/common/timer-sp.c4
-rw-r--r--arch/arm/include/asm/hardware/timer-sp.h2
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c2
-rw-r--r--arch/arm/mach-realview/core.c2
-rw-r--r--arch/arm/mach-versatile/core.c2
-rw-r--r--arch/arm/mach-vexpress/ct-ca9x4.c2
-rw-r--r--arch/arm/mach-vexpress/v2m.c2
7 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index 445b05ee8511..f6b9011744aa 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -32,7 +32,7 @@
32#define TIMER_FREQ_KHZ (1000) 32#define TIMER_FREQ_KHZ (1000)
33#define TIMER_RELOAD (TIMER_FREQ_KHZ * 1000 / HZ) 33#define TIMER_RELOAD (TIMER_FREQ_KHZ * 1000 / HZ)
34 34
35void __init sp804_clocksource_init(void __iomem *base) 35void __init sp804_clocksource_init(void __iomem *base, const char *name)
36{ 36{
37 /* setup timer 0 as free-running clocksource */ 37 /* setup timer 0 as free-running clocksource */
38 writel(0, base + TIMER_CTRL); 38 writel(0, base + TIMER_CTRL);
@@ -41,7 +41,7 @@ void __init sp804_clocksource_init(void __iomem *base)
41 writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC, 41 writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC,
42 base + TIMER_CTRL); 42 base + TIMER_CTRL);
43 43
44 clocksource_mmio_init(base + TIMER_VALUE, "timer3", 44 clocksource_mmio_init(base + TIMER_VALUE, name,
45 TIMER_FREQ_KHZ * 1000, 200, 32, clocksource_mmio_readl_down); 45 TIMER_FREQ_KHZ * 1000, 200, 32, clocksource_mmio_readl_down);
46} 46}
47 47
diff --git a/arch/arm/include/asm/hardware/timer-sp.h b/arch/arm/include/asm/hardware/timer-sp.h
index 21e75e30d497..11c386bbbf36 100644
--- a/arch/arm/include/asm/hardware/timer-sp.h
+++ b/arch/arm/include/asm/hardware/timer-sp.h
@@ -1,2 +1,2 @@
1void sp804_clocksource_init(void __iomem *); 1void sp804_clocksource_init(void __iomem *, const char *);
2void sp804_clockevents_init(void __iomem *, unsigned int); 2void sp804_clockevents_init(void __iomem *, unsigned int);
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 9e3ce26023e8..46fb7f580fef 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -476,7 +476,7 @@ static void __init intcp_timer_init(void)
476 writel(0, TIMER1_VA_BASE + TIMER_CTRL); 476 writel(0, TIMER1_VA_BASE + TIMER_CTRL);
477 writel(0, TIMER2_VA_BASE + TIMER_CTRL); 477 writel(0, TIMER2_VA_BASE + TIMER_CTRL);
478 478
479 sp804_clocksource_init(TIMER2_VA_BASE); 479 sp804_clocksource_init(TIMER2_VA_BASE, "timer2");
480 sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1); 480 sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1);
481} 481}
482 482
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 75dbc8791d05..6356b5e2e111 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -545,7 +545,7 @@ void __init realview_timer_init(unsigned int timer_irq)
545 writel(0, timer2_va_base + TIMER_CTRL); 545 writel(0, timer2_va_base + TIMER_CTRL);
546 writel(0, timer3_va_base + TIMER_CTRL); 546 writel(0, timer3_va_base + TIMER_CTRL);
547 547
548 sp804_clocksource_init(timer3_va_base); 548 sp804_clocksource_init(timer3_va_base, "timer3");
549 sp804_clockevents_init(timer0_va_base, timer_irq); 549 sp804_clockevents_init(timer0_va_base, timer_irq);
550} 550}
551 551
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index eb7ffa0ee8b5..aad6d395be44 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -764,7 +764,7 @@ static void __init versatile_timer_init(void)
764 writel(0, TIMER2_VA_BASE + TIMER_CTRL); 764 writel(0, TIMER2_VA_BASE + TIMER_CTRL);
765 writel(0, TIMER3_VA_BASE + TIMER_CTRL); 765 writel(0, TIMER3_VA_BASE + TIMER_CTRL);
766 766
767 sp804_clocksource_init(TIMER3_VA_BASE); 767 sp804_clocksource_init(TIMER3_VA_BASE, "timer3");
768 sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMERINT0_1); 768 sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMERINT0_1);
769} 769}
770 770
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index ebc22e759325..c833fd9505c5 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -71,7 +71,7 @@ static void __init ct_ca9x4_timer_init(void)
71 writel(0, MMIO_P2V(CT_CA9X4_TIMER0) + TIMER_CTRL); 71 writel(0, MMIO_P2V(CT_CA9X4_TIMER0) + TIMER_CTRL);
72 writel(0, MMIO_P2V(CT_CA9X4_TIMER1) + TIMER_CTRL); 72 writel(0, MMIO_P2V(CT_CA9X4_TIMER1) + TIMER_CTRL);
73 73
74 sp804_clocksource_init(MMIO_P2V(CT_CA9X4_TIMER1)); 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} 76}
77 77
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index ba46e8e07437..ccf1f899ac21 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -65,7 +65,7 @@ static void __init v2m_timer_init(void)
65 writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL); 65 writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL);
66 writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL); 66 writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL);
67 67
68 sp804_clocksource_init(MMIO_P2V(V2M_TIMER1)); 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} 70}
71 71