Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=39e823e35b791b905e0d8eba62e8b3a0b3351936 Commit: 39e823e35b791b905e0d8eba62e8b3a0b3351936 Parent: 8cc4c5488a28fe6a1f834e99317bb762798600f7 Author: Catalin Marinas <[EMAIL PROTECTED]> AuthorDate: Mon Feb 4 17:45:03 2008 +0100 Committer: Russell King <[EMAIL PROTECTED]> CommitDate: Mon Feb 4 17:52:27 2008 +0000
[ARM] 4821/1: RealView: Remove the platform dependencies from localtimer.c This patch removes the TWD_BASE macro used to set up and configure the local timers on ARM11MPCore. The twd_base_addr and twd_size variables are defined in localtimer.c and set from the realview_eb_init function. Signed-off-by: Catalin Marinas <[EMAIL PROTECTED]> Signed-off-by: Russell King <[EMAIL PROTECTED]> --- arch/arm/mach-realview/core.h | 4 ++++ arch/arm/mach-realview/localtimer.c | 9 ++++++--- arch/arm/mach-realview/realview_eb.c | 8 ++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 16c9d45..492a14c 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; extern struct clk realview_clcd_clk; extern struct clcd_board clcd_plat_data; extern void __iomem *gic_cpu_base_addr; +#ifdef CONFIG_LOCAL_TIMERS +extern void __iomem *twd_base_addr; +extern unsigned int twd_size; +#endif extern void realview_leds_event(led_event_t ledevt); extern 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 60500f0..5060436 100644 --- a/arch/arm/mach-realview/localtimer.c +++ b/arch/arm/mach-realview/localtimer.c @@ -24,9 +24,6 @@ #include <asm/io.h> #include <asm/irq.h> -#define TWD_BASE(cpu) (__io_address(REALVIEW_EB11MP_TWD_BASE) + \ - ((cpu) * REALVIEW_EB11MP_TWD_SIZE)) - static DEFINE_PER_CPU(struct clock_event_device, local_clockevent); /* @@ -41,6 +38,12 @@ void local_timer_interrupt(void) #ifdef CONFIG_LOCAL_TIMERS +#define TWD_BASE(cpu) (twd_base_addr + (cpu) * twd_size) + +/* set up by the platform code */ +void __iomem *twd_base_addr; +unsigned int twd_size; + static unsigned long mpcore_timer_rate; static 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 20b05f2..8ded2cc 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) { unsigned int timer_irq; - if (core_tile_eb11mp()) + if (core_tile_eb11mp()) { +#ifdef CONFIG_LOCAL_TIMERS + twd_base_addr = __io_address(REALVIEW_EB11MP_TWD_BASE); + twd_size = REALVIEW_EB11MP_TWD_SIZE; +#endif timer_irq = IRQ_EB11MP_TIMER0_1; - else + } else timer_irq = IRQ_EB_TIMER0_1; realview_timer_init(timer_irq); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html