diff options
author | Olof Johansson <olof@lixom.net> | 2012-06-30 16:13:15 -0700 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-06-30 16:13:15 -0700 |
commit | 839ab0c18fe4cf83dd99ca814f2b4cf822cd99be (patch) | |
tree | 868e835a3cee2d3bb5071a0f00eb98bcce8ebdea /arch/arm/mach-imx/mach-imx6q.c | |
parent | 6b16351acbd415e66ba16bf7d473ece1574cf0bc (diff) | |
parent | b9d18dc3a05d59894d60d5e173ebfb89a4b91bdf (diff) |
Merge branch 'imx/cpuidle' into next/pm
* imx/cpuidle:
ARM: imx: Add imx6q cpuidle driver
ARM: imx: Add imx5 cpuidle
ARM: imx: Add common imx cpuidle init functionality.
ARM: imx: Enable imx53 low power idle
ARM: imx: clean and consolidate imx5 suspend and idle code
ARM: imx: Add comments to tzic_enable_waker()
ARM: imx: Modify IMX_IO_P2V macro
Resolved trivial context conflict in arch/arm/plat-mxc/include/mach/common.h
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-imx/mach-imx6q.c')
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index b47e98b7d53..d4ca2c47014 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -12,7 +12,9 @@ #include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/cpuidle.h> #include <linux/delay.h> +#include <linux/export.h> #include <linux/init.h> #include <linux/io.h> #include <linux/irq.h> @@ -24,6 +26,7 @@ #include <linux/pinctrl/machine.h> #include <linux/phy.h> #include <linux/micrel_phy.h> +#include <asm/cpuidle.h> #include <asm/smp_twd.h> #include <asm/hardware/cache-l2x0.h> #include <asm/hardware/gic.h> @@ -31,8 +34,10 @@ #include <asm/mach/time.h> #include <asm/system_misc.h> #include <mach/common.h> +#include <mach/cpuidle.h> #include <mach/hardware.h> + void imx6q_restart(char mode, const char *cmd) { struct device_node *np; @@ -129,6 +134,19 @@ static void __init imx6q_init_machine(void) imx6q_pm_init(); } +static struct cpuidle_driver imx6q_cpuidle_driver = { + .name = "imx6q_cpuidle", + .owner = THIS_MODULE, + .en_core_tk_irqen = 1, + .states[0] = ARM_CPUIDLE_WFI_STATE, + .state_count = 1, +}; + +static void __init imx6q_init_late(void) +{ + imx_cpuidle_init(&imx6q_cpuidle_driver); +} + static void __init imx6q_map_io(void) { imx_lluart_map_io(); @@ -186,6 +204,7 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)") .handle_irq = imx6q_handle_irq, .timer = &imx6q_timer, .init_machine = imx6q_init_machine, + .init_late = imx6q_init_late, .dt_compat = imx6q_dt_compat, .restart = imx6q_restart, MACHINE_END |