aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 19:06:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 19:06:17 -0400
commit48d554418d3bfbba5e9dc1ebdf352f1b1f3ff4ee (patch)
tree696bdc0c1087e82c6493c852bca514bb0fcd7881 /arch/arm/mach-omap2
parentd61b7a572b292e2be409e13b4b3adf475f18fb29 (diff)
parent2cbe23e3a432e3d09a849adb197c8fcc09e7391d (diff)
Merge tag 'timer' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull "ARM: timer cleanup work" from Arnd Bergmann: "These are split out from the generic soc and driver updates because there was a lot of conflicting work by multiple people. Marc Zyngier worked on simplifying the "localtimer" interfaces, and some of the platforms are touching the same code as they move to device tree based booting. Signed-off-by: Arnd Bergmann <arnd@arndb.de>" * tag 'timer' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (61 commits) ARM: tegra: select USB_ULPI if USB is selected arm/tegra: pcie: fix return value of function ARM: ux500: fix compilation after local timer rework ARM: shmobile: remove additional __io() macro use ARM: local timers: make the runtime registration interface mandatory ARM: local timers: convert MSM to runtime registration interface ARM: local timers: convert exynos to runtime registration interface ARM: smp_twd: remove old local timer interface ARM: imx6q: convert to twd_local_timer_register() interface ARM: highbank: convert to twd_local_timer_register() interface ARM: ux500: convert to twd_local_timer_register() interface ARM: shmobile: convert to twd_local_timer_register() interface ARM: tegra: convert to twd_local_timer_register() interface ARM: plat-versatile: convert to twd_local_timer_register() interface ARM: OMAP4: convert to twd_local_timer_register() interface ARM: smp_twd: add device tree support ARM: smp_twd: add runtime registration support ARM: local timers: introduce a new registration interface ARM: smp_twd: make local_timer_stop a symbol instead of a #define ARM: mach-shmobile: default to no earlytimer ...
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/timer-mpu.c39
-rw-r--r--arch/arm/mach-omap2/timer.c22
3 files changed, 17 insertions, 45 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 28f15006593..3f850fca8c9 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -25,7 +25,6 @@ obj-$(CONFIG_TWL4030_CORE) += omap_twl.o
25 25
26# SMP support ONLY available for OMAP4 26# SMP support ONLY available for OMAP4
27obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o 27obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o
28obj-$(CONFIG_LOCAL_TIMERS) += timer-mpu.o
29obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o 28obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
30obj-$(CONFIG_ARCH_OMAP4) += omap4-common.o omap-wakeupgen.o \ 29obj-$(CONFIG_ARCH_OMAP4) += omap4-common.o omap-wakeupgen.o \
31 sleep44xx.o 30 sleep44xx.o
diff --git a/arch/arm/mach-omap2/timer-mpu.c b/arch/arm/mach-omap2/timer-mpu.c
deleted file mode 100644
index 31c0ac4cd66..00000000000
--- a/arch/arm/mach-omap2/timer-mpu.c
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * The MPU local timer source file. In OMAP4, both cortex-a9 cores have
3 * own timer in it's MPU domain. These timers will be driving the
4 * linux kernel SMP tick framework when active. These timers are not
5 * part of the wake up domain.
6 *
7 * Copyright (C) 2009 Texas Instruments, Inc.
8 *
9 * Author:
10 * Santosh Shilimkar <santosh.shilimkar@ti.com>
11 *
12 * This file is based on arm realview smp platform file.
13 * Copyright (C) 2002 ARM Ltd.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License version 2 as
17 * published by the Free Software Foundation.
18 */
19#include <linux/init.h>
20#include <linux/smp.h>
21#include <linux/clockchips.h>
22#include <asm/irq.h>
23#include <asm/smp_twd.h>
24#include <asm/localtimer.h>
25
26/*
27 * Setup the local clock events for a CPU.
28 */
29int __cpuinit local_timer_setup(struct clock_event_device *evt)
30{
31 /* Local timers are not supprted on OMAP4430 ES1.0 */
32 if (omap_rev() == OMAP4430_REV_ES1_0)
33 return -ENXIO;
34
35 evt->irq = OMAP44XX_IRQ_LOCALTIMER;
36 twd_timer_setup(evt);
37 return 0;
38}
39
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 5c9acea9576..c512bac69ec 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -39,7 +39,7 @@
39 39
40#include <asm/mach/time.h> 40#include <asm/mach/time.h>
41#include <plat/dmtimer.h> 41#include <plat/dmtimer.h>
42#include <asm/localtimer.h> 42#include <asm/smp_twd.h>
43#include <asm/sched_clock.h> 43#include <asm/sched_clock.h>
44#include "common.h" 44#include "common.h"
45#include <plat/omap_hwmod.h> 45#include <plat/omap_hwmod.h>
@@ -324,14 +324,26 @@ OMAP_SYS_TIMER(3_secure)
324#endif 324#endif
325 325
326#ifdef CONFIG_ARCH_OMAP4 326#ifdef CONFIG_ARCH_OMAP4
327static void __init omap4_timer_init(void)
328{
329#ifdef CONFIG_LOCAL_TIMERS 327#ifdef CONFIG_LOCAL_TIMERS
330 twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256); 328static DEFINE_TWD_LOCAL_TIMER(twd_local_timer,
331 BUG_ON(!twd_base); 329 OMAP44XX_LOCAL_TWD_BASE,
330 OMAP44XX_IRQ_LOCALTIMER);
332#endif 331#endif
332
333static void __init omap4_timer_init(void)
334{
333 omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE); 335 omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
334 omap2_gp_clocksource_init(2, OMAP4_MPU_SOURCE); 336 omap2_gp_clocksource_init(2, OMAP4_MPU_SOURCE);
337#ifdef CONFIG_LOCAL_TIMERS
338 /* Local timers are not supprted on OMAP4430 ES1.0 */
339 if (omap_rev() != OMAP4430_REV_ES1_0) {
340 int err;
341
342 err = twd_local_timer_register(&twd_local_timer);
343 if (err)
344 pr_err("twd_local_timer_register failed %d\n", err);
345 }
346#endif
335} 347}
336OMAP_SYS_TIMER(4) 348OMAP_SYS_TIMER(4)
337#endif 349#endif