diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2016-01-15 09:33:18 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2016-01-15 10:25:15 +0800 |
commit | 2bcd16a9e250b21f8e7ad8cbf945266213036cde (patch) | |
tree | 5f290f615f34fb353abaeb4573fc4db006ac82a1 /arch/arm/mach-imx/mach-imx7d.c | |
parent | c69d3546850f5bb23884c9e99671ce4f689ac00d (diff) |
MLK-12263 ARM: imx: disable arm_arch_timer for i.MX7D nosmp
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 kernel boot up,
if SMP is NOT enabled, ARM_ARCH_TIMER will be disabled and
using GPT timer always.
we have to put this check in early stage before common
arm_arch_timer driver probed.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Diffstat (limited to 'arch/arm/mach-imx/mach-imx7d.c')
-rw-r--r-- | arch/arm/mach-imx/mach-imx7d.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c index 101c140f42f0..8c5b71eb01e8 100644 --- a/arch/arm/mach-imx/mach-imx7d.c +++ b/arch/arm/mach-imx/mach-imx7d.c @@ -19,6 +19,12 @@ #include "common.h" #include "cpuidle.h" +static struct property device_disabled = { + .name = "status", + .length = sizeof("disabled"), + .value = "disabled", +}; + static int ar8031_phy_fixup(struct phy_device *dev) { u16 val; @@ -108,6 +114,17 @@ static inline void imx7d_enet_init(void) imx7d_enet_clk_sel(); } +static inline void imx7d_disable_arm_arch_timer(void) +{ + 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); + } +} + static void __init imx7d_init_machine(void) { struct device *parent; @@ -128,6 +145,9 @@ static void __init imx7d_init_irq(void) imx_init_revision_from_anatop(); imx_src_init(); irqchip_init(); +#ifndef CONFIG_SMP + imx7d_disable_arm_arch_timer(); +#endif } static void __init imx7d_init_late(void) |