summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/mach-imx7d.c
diff options
context:
space:
mode:
authorBai Ping <b51503@freescale.com>2015-02-13 01:02:03 +0800
committerJason Liu <r64343@freescale.com>2015-05-08 16:33:07 +0800
commit27642021d28555c37aab5e2b75214d8c383f668d (patch)
tree0400112b058efd5e32dce67e7462d128c533cb95 /arch/arm/mach-imx/mach-imx7d.c
parent394e782d4ae79f6f174e382807e6121ac5da6f35 (diff)
MLK-10257-03 arm: imx7: Add cpufreq platform device
Add cpufreq platform device support for DVFS. Signed-off-by: Bai Ping <b51503@freescale.com>
Diffstat (limited to 'arch/arm/mach-imx/mach-imx7d.c')
-rw-r--r--arch/arm/mach-imx/mach-imx7d.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c
index 5a61da590eb7..bf7abf01d881 100644
--- a/arch/arm/mach-imx/mach-imx7d.c
+++ b/arch/arm/mach-imx/mach-imx7d.c
@@ -11,6 +11,7 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <linux/phy.h>
+#include <linux/pm_opp.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#include <linux/mfd/syscon/imx7-iomuxc-gpr.h>
@@ -109,6 +110,13 @@ static void __init imx7d_init_irq(void)
irqchip_init();
}
+static void __init imx7d_init_late(void)
+{
+ if (IS_ENABLED(CONFIG_ARM_IMX7D_CPUFREQ)) {
+ platform_device_register_simple("imx7d-cpufreq", -1, NULL, 0);
+ }
+}
+
static const char *imx7d_dt_compat[] __initconst = {
"fsl,imx7d",
NULL,
@@ -125,6 +133,7 @@ DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)")
.smp = smp_ops(imx_smp_ops),
.init_irq = imx7d_init_irq,
.init_machine = imx7d_init_machine,
+ .init_late = imx7d_init_late,
.dt_compat = imx7d_dt_compat,
.restart = mxc_restart,
MACHINE_END