summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator/integrator_cp.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-01-16 23:52:12 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-02 09:35:36 +0100
commit5a46334ac688fb538b335599e1ff3b6cfaf769e9 (patch)
tree2d413d7d591fa23f7694c312514c3286078d576a /arch/arm/mach-integrator/integrator_cp.c
parente606a940cba4083b9c382c17251636856e03346b (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>
Diffstat (limited to 'arch/arm/mach-integrator/integrator_cp.c')
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index a9ab8fda399..a7575c431a2 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -29,6 +29,7 @@
#include <asm/irq.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
+#include <asm/hardware/arm_timer.h>
#include <asm/hardware/icst.h>
#include <mach/cm.h>
@@ -40,6 +41,8 @@
#include <asm/mach/map.h>
#include <asm/mach/time.h>
+#include <plat/timer-sp.h>
+
#include "common.h"
#define INTCP_PA_FLASH_BASE 0x24000000
@@ -569,11 +572,18 @@ static void __init intcp_init(void)
}
}
-#define TIMER_CTRL_IE (1 << 5) /* Interrupt Enable */
+#define TIMER0_VA_BASE __io_address(INTEGRATOR_TIMER0_BASE)
+#define TIMER1_VA_BASE __io_address(INTEGRATOR_TIMER1_BASE)
+#define TIMER2_VA_BASE __io_address(INTEGRATOR_TIMER2_BASE)
static void __init intcp_timer_init(void)
{
- integrator_time_init(1000, TIMER_CTRL_IE);
+ writel(0, TIMER0_VA_BASE + TIMER_CTRL);
+ writel(0, TIMER1_VA_BASE + TIMER_CTRL);
+ writel(0, TIMER2_VA_BASE + TIMER_CTRL);
+
+ sp804_clocksource_init(TIMER2_VA_BASE);
+ sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1);
}
static struct sys_timer cp_timer = {