diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2011-09-27 11:04:33 +0530 |
---|---|---|
committer | Rabin VINCENT <rabin.vincent@stericsson.com> | 2011-10-28 05:03:33 +0200 |
commit | c03e09ea5245e207b581a4b44016f0e989e56e33 (patch) | |
tree | d39e7766d763ea40d11aec1cd4cb3dbd07e93d18 /arch/arm | |
parent | 83f9d2918ef0c8da5e0b07fc83e3da83cf3f7cd8 (diff) |
u5500: add MTIMER clocksource
ST-Ericsson ID: 368260
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Depends-On: I5307cb7f58fdf890896d641a8e4f49098a90b68e
Change-Id: I9ef4ff1c63f6ec9293ece4013f13cf3caa707d9d
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34307
Reviewed-by: QATOOLS
Reviewed-by: QABUILD
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-ux500/cpu-db5500.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/db5500-regs.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/timer.c | 11 |
3 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c index 9518c6db7f7..ea4fbbb1fc6 100644 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ b/arch/arm/mach-ux500/cpu-db5500.c @@ -41,6 +41,7 @@ static struct map_desc u5500_io_desc[] __initdata = { __IO_DEV_DESC(U5500_MTU1_BASE, SZ_4K), __IO_DEV_DESC(U5500_SCU_BASE, SZ_4K), __IO_DEV_DESC(U5500_RTC_BASE, SZ_4K), + __IO_DEV_DESC(U5500_MTIMER_BASE, SZ_4K), __IO_DEV_DESC(U5500_BACKUPRAM0_BASE, SZ_8K), __MEM_DEV_DESC(U5500_BOOT_ROM_BASE, SZ_1M), diff --git a/arch/arm/mach-ux500/include/mach/db5500-regs.h b/arch/arm/mach-ux500/include/mach/db5500-regs.h index 870c3ff574c..f853c20587a 100644 --- a/arch/arm/mach-ux500/include/mach/db5500-regs.h +++ b/arch/arm/mach-ux500/include/mach/db5500-regs.h @@ -66,6 +66,7 @@ #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_MTIMER_BASE (U5500_PER4_BASE + 0xC000) #define U5500_CDETECT_BASE (U5500_PER4_BASE + 0xF000) #define U5500_PRCMU_TCDM_BASE (U5500_PER4_BASE + 0x18000) #define U5500_PRCMU_TCPM_BASE (U5500_PER4_BASE + 0x10000) diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index c395f5c8992..df1945b1991 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c @@ -7,6 +7,7 @@ #include <linux/io.h> #include <linux/errno.h> #include <linux/clksrc-dbx500-prcmu.h> +#include <linux/clksrc-db5500-mtimer.h> #include <asm/localtimer.h> @@ -67,12 +68,18 @@ static void __init ux500_timer_init(void) * depending on delay which is not yet calibrated. RTC-RTT is in the * always-on powerdomain and is used as clockevent instead of twd when * sleeping. - * The PRCMU timer 4(3 for DB5500) register a clocksource and - * sched_clock with higher rating then MTU since is always-on. * + * The PRCMU timer 4 (3 for DB5500) registers a clocksource and + * sched_clock with higher rating than the MTU since it is + * always-on. + * + * On DB5500, the MTIMER is the best clocksource since, unlike the + * PRCMU timer, it doesn't occasionally go backwards. */ nmdk_timer_init(); + if (cpu_is_u5500()) + db5500_mtimer_init(__io_address(U5500_MTIMER_BASE)); clksrc_dbx500_prcmu_init(prcmu_timer_base); #ifdef CONFIG_UX500_CONTEXT |