diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-16 18:52:12 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-02 04:35:36 -0400 |
commit | 5a46334ac688fb538b335599e1ff3b6cfaf769e9 (patch) | |
tree | 2d413d7d591fa23f7694c312514c3286078d576a | |
parent | e606a940cba4083b9c382c17251636856e03346b (diff) |
ARM: Integrator: convert Integrator/CP to use SP804 timer support
The Integrator/CP board has SP804-compatible timer modules, so use
the SP804-compatible code from Versatile and Realview.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-integrator/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_cp.c | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index df97d16390e3..27db275b367c 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig | |||
@@ -11,6 +11,7 @@ config ARCH_INTEGRATOR_AP | |||
11 | config ARCH_INTEGRATOR_CP | 11 | config ARCH_INTEGRATOR_CP |
12 | bool "Support Integrator/CP platform" | 12 | bool "Support Integrator/CP platform" |
13 | select ARCH_CINTEGRATOR | 13 | select ARCH_CINTEGRATOR |
14 | select ARM_TIMER_SP804 | ||
14 | help | 15 | help |
15 | Include support for the ARM(R) Integrator CP platform. | 16 | Include support for the ARM(R) Integrator CP platform. |
16 | 17 | ||
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index a9ab8fda3992..a7575c431a22 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
31 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
32 | #include <asm/hardware/arm_timer.h> | ||
32 | #include <asm/hardware/icst.h> | 33 | #include <asm/hardware/icst.h> |
33 | 34 | ||
34 | #include <mach/cm.h> | 35 | #include <mach/cm.h> |
@@ -40,6 +41,8 @@ | |||
40 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
41 | #include <asm/mach/time.h> | 42 | #include <asm/mach/time.h> |
42 | 43 | ||
44 | #include <plat/timer-sp.h> | ||
45 | |||
43 | #include "common.h" | 46 | #include "common.h" |
44 | 47 | ||
45 | #define INTCP_PA_FLASH_BASE 0x24000000 | 48 | #define INTCP_PA_FLASH_BASE 0x24000000 |
@@ -569,11 +572,18 @@ static void __init intcp_init(void) | |||
569 | } | 572 | } |
570 | } | 573 | } |
571 | 574 | ||
572 | #define TIMER_CTRL_IE (1 << 5) /* Interrupt Enable */ | 575 | #define TIMER0_VA_BASE __io_address(INTEGRATOR_TIMER0_BASE) |
576 | #define TIMER1_VA_BASE __io_address(INTEGRATOR_TIMER1_BASE) | ||
577 | #define TIMER2_VA_BASE __io_address(INTEGRATOR_TIMER2_BASE) | ||
573 | 578 | ||
574 | static void __init intcp_timer_init(void) | 579 | static void __init intcp_timer_init(void) |
575 | { | 580 | { |
576 | integrator_time_init(1000, TIMER_CTRL_IE); | 581 | writel(0, TIMER0_VA_BASE + TIMER_CTRL); |
582 | writel(0, TIMER1_VA_BASE + TIMER_CTRL); | ||
583 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); | ||
584 | |||
585 | sp804_clocksource_init(TIMER2_VA_BASE); | ||
586 | sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1); | ||
577 | } | 587 | } |
578 | 588 | ||
579 | static struct sys_timer cp_timer = { | 589 | static struct sys_timer cp_timer = { |