@@ -2156,13 +2156,6 @@ if ARCH_HAS_CPUFREQ
source "drivers/cpufreq/Kconfig"
-config CPU_FREQ_IMX
- tristate "CPUfreq driver for i.MX CPUs"
- depends on ARCH_MXC && CPU_FREQ
- select CPU_FREQ_TABLE
- help
- This enables the CPUfreq driver for i.MX CPUs.
-
config CPU_FREQ_SA1100
bool
@@ -27,7 +27,6 @@ obj-$(CONFIG_IRAM_ALLOC) += iram_alloc.o
obj-$(CONFIG_MXC_ULPI) += ulpi.o
obj-$(CONFIG_MXC_USE_EPIT) += epit.o
obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
-obj-$(CONFIG_CPU_FREQ_IMX) += cpufreq.o
ifeq ($(CONFIG_CPU_IDLE),y)
obj-y += cpuidle.o
@@ -151,13 +151,9 @@ extern unsigned int __mxc_cpu_type;
#ifndef __ASSEMBLY__
-struct cpu_op {
- u32 cpu_rate;
-};
+#include <linux/cpufreq/imx.h>
int tzic_enable_wake(void);
-
-extern struct cpu_op *(*get_cpu_op)(int *op);
#endif
#define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35())
@@ -45,6 +45,13 @@ config ARM_HIGHBANK_CPUFREQ
If in doubt, say N.
+config ARM_IMX_CPUFREQ
+ tristate "CPUfreq driver for i.MX CPUs"
+ depends on ARCH_MXC
+ select CPU_FREQ_TABLE
+ help
+ This enables the CPUfreq driver for i.MX CPUs.
+
config ARM_IMX6Q_CPUFREQ
tristate "Freescale i.MX6Q cpufreq support"
depends on SOC_IMX6Q
@@ -51,6 +51,7 @@ obj-$(CONFIG_ARM_EXYNOS4210_CPUFREQ) += exynos4210-cpufreq.o
obj-$(CONFIG_ARM_EXYNOS4X12_CPUFREQ) += exynos4x12-cpufreq.o
obj-$(CONFIG_ARM_EXYNOS5250_CPUFREQ) += exynos5250-cpufreq.o
obj-$(CONFIG_ARM_HIGHBANK_CPUFREQ) += highbank-cpufreq.o
+obj-$(CONFIG_ARM_IMX_CPUFREQ) += imx-cpufreq.o
obj-$(CONFIG_ARM_IMX6Q_CPUFREQ) += imx6q-cpufreq.o
obj-$(CONFIG_ARM_KIRKWOOD_CPUFREQ) += kirkwood-cpufreq.o
obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o
similarity index 99%
rename from arch/arm/mach-imx/cpufreq.c
rename to drivers/cpufreq/imx-cpufreq.c
@@ -17,14 +17,13 @@
* the CPU clock speed on the fly.
*/
-#include <linux/module.h>
-#include <linux/cpufreq.h>
#include <linux/clk.h>
+#include <linux/cpufreq.h>
+#include <linux/cpufreq/imx.h>
#include <linux/err.h>
+#include <linux/module.h>
#include <linux/slab.h>
-#include "hardware.h"
-
#define CLK32_FREQ 32768
#define NANOSECOND (1000 * 1000 * 1000)
new file mode 100644
@@ -0,0 +1,10 @@
+#ifndef CPUFREQ_IMX_H
+#define CPUFREQ_IMX_H
+
+struct cpu_op {
+ u32 cpu_rate;
+};
+
+extern struct cpu_op *(*get_cpu_op)(int *op);
+
+#endif
This patch moves cpufreq driver of ARM based imx platform to drivers/cpufreq. Cc: Sascha Hauer <kernel@pengutronix.de> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- arch/arm/Kconfig | 7 ------- arch/arm/mach-imx/Makefile | 1 - arch/arm/mach-imx/mxc.h | 6 +----- drivers/cpufreq/Kconfig.arm | 7 +++++++ drivers/cpufreq/Makefile | 1 + arch/arm/mach-imx/cpufreq.c => drivers/cpufreq/imx-cpufreq.c | 7 +++---- include/linux/cpufreq/imx.h | 10 ++++++++++ 7 files changed, 22 insertions(+), 17 deletions(-) rename arch/arm/mach-imx/cpufreq.c => drivers/cpufreq/imx-cpufreq.c (99%) create mode 100644 include/linux/cpufreq/imx.h