diff options
author | Anson Huang <b20788@freescale.com> | 2015-06-27 00:23:36 +0800 |
---|---|---|
committer | Anson Huang <b20788@freescale.com> | 2015-06-27 17:06:57 +0800 |
commit | 2f122ee31de21a3e2c4d01c1087a45dddee85017 (patch) | |
tree | 0d48005d31c63a800094f92d5423ab3302698b2b /arch | |
parent | ff9d2afc63ed44d61aa466df0f3d7f47095cf9b7 (diff) |
MLK-11173 ARM: imx: disable arm arch timer when smp is NOT enabled
When SMP is deselected, ARM_ARCH_TIMER is still enabled while
broadcast time is disabled, so when system enters WAIT mode,
ARM platform's clock will be disabled, then system tick timer
will stop and cause system stay at WAIT mode and timer event
will NOT come as expected.
To fix this issue, we do runtime check in our timer driver,
if SMP is NOT enabled, ARM_ARCH_TIMER will be disabled and
using GPT timer always.
Signed-off-by: Anson Huang <b20788@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/time.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index 7d7df7a9bb72..9cbb26d55210 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c @@ -83,6 +83,14 @@ static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; static void __iomem *timer_base; +#ifndef CONFIG_SMP +static struct property device_disabled = { + .name = "status", + .length = sizeof("disabled"), + .value = "disabled", +}; +#endif + static inline void gpt_irq_disable(void) { unsigned int tmp; @@ -366,6 +374,15 @@ void __init mxc_timer_init_dt(struct device_node *np) { void __iomem *base; int irq; +#ifndef CONFIG_SMP + struct device_node *node; + + node = of_find_compatible_node(NULL, NULL, "arm,armv7-timer"); + if (node) { + pr_info("disable arm arch timer for nosmp!\n"); + of_add_property(node, &device_disabled); + } +#endif base = of_iomap(np, 0); WARN_ON(!base); |