aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-realview/core.h4
-rw-r--r--arch/arm/mach-realview/localtimer.c9
-rw-r--r--arch/arm/mach-realview/realview_eb.c8
3 files changed, 16 insertions, 5 deletions
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 16c9d45ce2c2..492a14c0d604 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -51,6 +51,10 @@ extern struct mmc_platform_data realview_mmc1_plat_data;
51extern struct clk realview_clcd_clk; 51extern struct clk realview_clcd_clk;
52extern struct clcd_board clcd_plat_data; 52extern struct clcd_board clcd_plat_data;
53extern void __iomem *gic_cpu_base_addr; 53extern void __iomem *gic_cpu_base_addr;
54#ifdef CONFIG_LOCAL_TIMERS
55extern void __iomem *twd_base_addr;
56extern unsigned int twd_size;
57#endif
54 58
55extern void realview_leds_event(led_event_t ledevt); 59extern void realview_leds_event(led_event_t ledevt);
56extern void realview_timer_init(unsigned int timer_irq); 60extern void realview_timer_init(unsigned int timer_irq);
diff --git a/arch/arm/mach-realview/localtimer.c b/arch/arm/mach-realview/localtimer.c
index 60500f0b878d..50604360479f 100644
--- a/arch/arm/mach-realview/localtimer.c
+++ b/arch/arm/mach-realview/localtimer.c
@@ -24,9 +24,6 @@
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26 26
27#define TWD_BASE(cpu) (__io_address(REALVIEW_EB11MP_TWD_BASE) + \
28 ((cpu) * REALVIEW_EB11MP_TWD_SIZE))
29
30static DEFINE_PER_CPU(struct clock_event_device, local_clockevent); 27static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
31 28
32/* 29/*
@@ -41,6 +38,12 @@ void local_timer_interrupt(void)
41 38
42#ifdef CONFIG_LOCAL_TIMERS 39#ifdef CONFIG_LOCAL_TIMERS
43 40
41#define TWD_BASE(cpu) (twd_base_addr + (cpu) * twd_size)
42
43/* set up by the platform code */
44void __iomem *twd_base_addr;
45unsigned int twd_size;
46
44static unsigned long mpcore_timer_rate; 47static unsigned long mpcore_timer_rate;
45 48
46static void local_timer_set_mode(enum clock_event_mode mode, 49static void local_timer_set_mode(enum clock_event_mode mode,
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 20b05f2ed61c..8ded2cc79cca 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -309,9 +309,13 @@ static void __init realview_eb_timer_init(void)
309{ 309{
310 unsigned int timer_irq; 310 unsigned int timer_irq;
311 311
312 if (core_tile_eb11mp()) 312 if (core_tile_eb11mp()) {
313#ifdef CONFIG_LOCAL_TIMERS
314 twd_base_addr = __io_address(REALVIEW_EB11MP_TWD_BASE);
315 twd_size = REALVIEW_EB11MP_TWD_SIZE;
316#endif
313 timer_irq = IRQ_EB11MP_TIMER0_1; 317 timer_irq = IRQ_EB11MP_TIMER0_1;
314 else 318 } else
315 timer_irq = IRQ_EB_TIMER0_1; 319 timer_irq = IRQ_EB_TIMER0_1;
316 320
317 realview_timer_init(timer_irq); 321 realview_timer_init(timer_irq);