diff options
author | Andy Green <andy.green@linaro.org> | 2012-04-25 14:26:04 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-06-13 21:35:29 +0800 |
commit | ba624e137a71cde61ef0654f295af21c75a53442 (patch) | |
tree | 78c551a097a873039902408bdf3941411ce1ef6d /arch | |
parent | fd848381271c938754d89c707c788cb24f0632b8 (diff) |
debug lump
Signed-off-by: Andy Green <andy.green@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/include/asm/localtimer.h | 6 | ||||
-rw-r--r-- | arch/arm/include/asm/smp_twd.h | 15 | ||||
-rw-r--r-- | arch/arm/kernel/smp_twd.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/timer.c | 41 |
5 files changed, 5 insertions, 73 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 910c096bb1a1..17574ff43a33 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1586,10 +1586,6 @@ config HAVE_ARM_TWD help This options enables support for the ARM timer and watchdog unit -config ARM_SMP_TWD - bool - select HAVE_ARM_TWD if SMP - choice prompt "Memory split" default VMSPLIT_3G @@ -1628,8 +1624,9 @@ config HOTPLUG_CPU config LOCAL_TIMERS bool "Use local timer interrupts" - depends on SMP #&& !ARM_SMP_TWD + depends on SMP default y + select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !EXYNOS4_MCT) help Enable support for local timers on SMP platforms, rather then the legacy IPI broadcast method. Local timers allows the system diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h index 6d69fd2b5592..f77ffc1eb0c2 100644 --- a/arch/arm/include/asm/localtimer.h +++ b/arch/arm/include/asm/localtimer.h @@ -20,12 +20,6 @@ struct local_timer_ops { }; #ifdef CONFIG_LOCAL_TIMERS - -/* - * Stop the local timer - */ -void local_timer_stop(struct clock_event_device *); - /* * Register a local timer driver */ diff --git a/arch/arm/include/asm/smp_twd.h b/arch/arm/include/asm/smp_twd.h index c9df3d2746d9..0f01f4677bd2 100644 --- a/arch/arm/include/asm/smp_twd.h +++ b/arch/arm/include/asm/smp_twd.h @@ -20,9 +20,6 @@ #include <linux/ioport.h> -struct clock_event_device; -struct resource; - struct twd_local_timer { struct resource res[2]; }; @@ -44,17 +41,5 @@ static inline void twd_local_timer_of_register(void) { } #endif -//int __cpuinit twd_timer_setup(struct clock_event_device *); -//void twd_timer_stop(struct clock_event_device *); -struct resource; - -#ifdef CONFIG_HAVE_ARM_TWD -int twd_timer_register(struct resource *res, int res_nr); -#else -static inline int twd_timer_register(struct resource *res, int res_nr) -{ - return 0; -} -#endif #endif diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 562c63063c37..4f7d0466bcb1 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -16,7 +16,6 @@ #include <linux/device.h> #include <linux/err.h> #include <linux/smp.h> -#include <linux/cpu.h> #include <linux/jiffies.h> #include <linux/clockchips.h> #include <linux/interrupt.h> @@ -28,6 +27,7 @@ #include <asm/smp_twd.h> #include <asm/localtimer.h> +#include <asm/hardware/gic.h> /* set up by the platform code */ static void __iomem *twd_base; @@ -95,13 +95,12 @@ static int twd_timer_ack(void) return 0; } -#if 1 + static void twd_timer_stop(struct clock_event_device *clk) { twd_set_mode(CLOCK_EVT_MODE_UNUSED, clk); disable_percpu_irq(clk->irq); } -#endif #ifdef CONFIG_CPU_FREQ @@ -229,8 +228,6 @@ static struct clk *twd_get_clock(void) return clk; } -extern void smp_timer_broadcast(const struct cpumask *mask); - /* * Setup the local clock events for a CPU. */ @@ -251,7 +248,7 @@ static int __cpuinit twd_timer_setup(struct clock_event_device *clk) clk->name = "local_timer"; clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP; - clk->rating = 450; /* Make sure this is higher than broadcast */ + clk->rating = 350; clk->set_mode = twd_set_mode; clk->set_next_event = twd_set_next_event; clk->irq = twd_ppi; diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 08b195cf3531..d6a00cf17c6f 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -341,47 +341,6 @@ OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE, OMAP_SYS_TIMER(3_secure) #endif -#if 0 -#ifdef CONFIG_ARM_SMP_TWD -static struct resource omap4_twd_resources[] __initdata = { - { - .start = OMAP44XX_LOCAL_TWD_BASE, - .end = OMAP44XX_LOCAL_TWD_BASE + 0x10, - .flags = IORESOURCE_MEM, - }, - { - .start = OMAP44XX_IRQ_LOCALTIMER, - .end = OMAP44XX_IRQ_LOCALTIMER, - .flags = IORESOURCE_IRQ, - }, -}; - -static void __init omap4_twd_init(void) -{ - int err; - - /* Local timers are not supprted on OMAP4430 ES1.0 */ - if (omap_rev() == OMAP4430_REV_ES1_0) - return; - - err = twd_timer_register(omap4_twd_resources, - ARRAY_SIZE(omap4_twd_resources)); - if (err) - pr_err("twd_timer_register failed %d\n", err); -} - -#else -#define omap4_twd_init NULL -#endif - -/* main twd code wants to see this, despite it is deprecated now */ - -int __cpuinit local_timer_setup(struct clock_event_device *evt) -{ - return 0; -} -#endif - #ifdef CONFIG_ARCH_OMAP4 #ifdef CONFIG_LOCAL_TIMERS static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, |