summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMattias WALLIN <mattias.wallin@stericsson.com>2011-05-27 10:30:34 +0200
committerRobert Marklund <robert.marklund@stericsson.com>2011-10-05 12:59:45 +0200
commita54d0f7b6f687c64880925e2d8c482f8dcfb7354 (patch)
treeaf4cc794cc27eb40ebd109d8a374e003a3aac2c5 /arch
parenta8e225992f20fe5208d1f4d85b5a45c3a2fe42de (diff)
mach-ux500: add support for clocksource DBX500 PRCMU
This patch adds support for the DBX500 PRCMU clocksource to the mach-ux500 platform. Change-Id: I6f14d032c0def1e8625afdcfc10dece3d39890f7 Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.co> Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32053
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/cpu.c9
-rw-r--r--arch/arm/mach-ux500/include/mach/db5500-regs.h2
-rw-r--r--arch/arm/mach-ux500/include/mach/db8500-regs.h2
3 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 700fd5256bf..4f5d72f4ea8 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -9,6 +9,7 @@
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/delay.h>
+#include <linux/clksrc-dbx500-prcmu.h>
#include <asm/cacheflush.h>
#include <asm/hardware/cache-l2x0.h>
@@ -49,7 +50,15 @@ static void __init ux500_timer_init(void)
else
ux500_unknown_soc();
+ if (cpu_is_u8500())
+ clksrc_dbx500_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE);
+ else if (cpu_is_u5500())
+ clksrc_dbx500_timer_base = __io_address(U5500_PRCMU_TIMER_3_BASE);
+ else
+ ux500_unknown_soc();
+
nmdk_timer_init();
+ clksrc_dbx500_prcmu_init();
}
struct sys_timer ux500_timer = {
diff --git a/arch/arm/mach-ux500/include/mach/db5500-regs.h b/arch/arm/mach-ux500/include/mach/db5500-regs.h
index 9abdc09f3af..870c3ff574c 100644
--- a/arch/arm/mach-ux500/include/mach/db5500-regs.h
+++ b/arch/arm/mach-ux500/include/mach/db5500-regs.h
@@ -62,6 +62,8 @@
#define U5500_SCR_BASE (U5500_PER4_BASE + 0x5000)
#define U5500_DMC_BASE (U5500_PER4_BASE + 0x6000)
#define U5500_PRCMU_BASE (U5500_PER4_BASE + 0x7000)
+#define U5500_PRCMU_TIMER_3_BASE (U5500_PER4_BASE + 0x07338)
+#define U5500_PRCMU_TIMER_4_BASE (U5500_PER4_BASE + 0x07450)
#define U5500_MSP1_BASE (U5500_PER4_BASE + 0x9000)
#define U5500_GPIO2_BASE (U5500_PER4_BASE + 0xA000)
#define U5500_CDETECT_BASE (U5500_PER4_BASE + 0xF000)
diff --git a/arch/arm/mach-ux500/include/mach/db8500-regs.h b/arch/arm/mach-ux500/include/mach/db8500-regs.h
index 45d0c506e43..80e10f50282 100644
--- a/arch/arm/mach-ux500/include/mach/db8500-regs.h
+++ b/arch/arm/mach-ux500/include/mach/db8500-regs.h
@@ -98,6 +98,8 @@
#define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000)
#define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x68000)
#define U8500_PRCMU_TCPM_BASE (U8500_PER4_BASE + 0x60000)
+#define U8500_PRCMU_TIMER_3_BASE (U8500_PER4_BASE + 0x07338)
+#define U8500_PRCMU_TIMER_4_BASE (U8500_PER4_BASE + 0x07450)
/* per3 base addresses */
#define U8500_FSMC_BASE (U8500_PER3_BASE + 0x0000)