Commit 12bb3440 authored by Shawn Guo's avatar Shawn Guo

ARM: imx: move imx6q_cpuidle_driver into a separate file

Move imx6q_cpuidle_driver into a separate file as more codes will
be added when WAIT mode gets implemented as cpuidle.
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
parent 485863b8
...@@ -28,7 +28,11 @@ obj-$(CONFIG_MXC_ULPI) += ulpi.o ...@@ -28,7 +28,11 @@ obj-$(CONFIG_MXC_ULPI) += ulpi.o
obj-$(CONFIG_MXC_USE_EPIT) += epit.o obj-$(CONFIG_MXC_USE_EPIT) += epit.o
obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
ifeq ($(CONFIG_CPU_IDLE),y)
obj-y += cpuidle.o
obj-$(CONFIG_SOC_IMX6Q) += cpuidle-imx6q.o
endif
ifdef CONFIG_SND_IMX_SOC ifdef CONFIG_SND_IMX_SOC
obj-y += ssi-fiq.o obj-y += ssi-fiq.o
......
/*
* Copyright (C) 2012 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/cpuidle.h>
#include <linux/module.h>
#include <asm/cpuidle.h>
#include "cpuidle.h"
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,
};
int __init imx6q_cpuidle_init(void)
{
return imx_cpuidle_init(&imx6q_cpuidle_driver);
}
...@@ -14,9 +14,14 @@ ...@@ -14,9 +14,14 @@
#ifdef CONFIG_CPU_IDLE #ifdef CONFIG_CPU_IDLE
extern int imx_cpuidle_init(struct cpuidle_driver *drv); extern int imx_cpuidle_init(struct cpuidle_driver *drv);
extern int imx6q_cpuidle_init(void);
#else #else
static inline int imx_cpuidle_init(struct cpuidle_driver *drv) static inline int imx_cpuidle_init(struct cpuidle_driver *drv)
{ {
return -ENODEV; return -ENODEV;
} }
static inline int imx6q_cpuidle_init(void)
{
return -ENODEV;
}
#endif #endif
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/clkdev.h> #include <linux/clkdev.h>
#include <linux/cpuidle.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -26,7 +25,6 @@ ...@@ -26,7 +25,6 @@
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/micrel_phy.h> #include <linux/micrel_phy.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <asm/cpuidle.h>
#include <asm/smp_twd.h> #include <asm/smp_twd.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
...@@ -202,17 +200,9 @@ static void __init imx6q_init_machine(void) ...@@ -202,17 +200,9 @@ static void __init imx6q_init_machine(void)
imx6q_1588_init(); imx6q_1588_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) static void __init imx6q_init_late(void)
{ {
imx_cpuidle_init(&imx6q_cpuidle_driver); imx6q_cpuidle_init();
} }
static void __init imx6q_map_io(void) static void __init imx6q_map_io(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment