arm: zynq: Add support for cpufreq
authorSoren Brinkmann <soren.brinkmann@xilinx.com>
Wed, 19 Feb 2014 23:14:44 +0000 (15:14 -0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 11 Mar 2014 22:10:28 +0000 (23:10 +0100)
The generic cpufreq-cpu0 driver can scale the CPU frequency on Zynq
SOCs. Add the required platform device to the BSP and appropriate
OPPs to the dts.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: devicetree@vger.kernel.org
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/boot/dts/zynq-7000.dtsi
arch/arm/mach-zynq/Kconfig
arch/arm/mach-zynq/common.c

index 8b67b19392eca7ac1359dfe1db0ec4a16e5d1ade..789d0bacc11025ac2c333be1bb29748dcdeec3d2 100644 (file)
                        device_type = "cpu";
                        reg = <0>;
                        clocks = <&clkc 3>;
+                       operating-points = <
+                               /* kHz    uV */
+                               666667  1000000
+                               333334  1000000
+                               222223  1000000
+                       >;
                };
 
                cpu@1 {
index f84fab14f0b7f96e97697c9f99b45117036f747c..f03e75bd0b2b232f9afdfbbd4ea30e5da95a0adf 100644 (file)
@@ -2,6 +2,8 @@ config ARCH_ZYNQ
        bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7
        select ARM_AMBA
        select ARM_GIC
+       select ARCH_HAS_CPUFREQ
+       select ARCH_HAS_OPP
        select COMMON_CLK
        select CPU_V7
        select GENERIC_CLOCKEVENTS
index 1db2a5ca9ab8c8280dd11db69e1cc98538a76ba2..644468151c046fda63052ff2ebe2e3783e2e9207 100644 (file)
@@ -51,6 +51,8 @@ static struct platform_device zynq_cpuidle_device = {
  */
 static void __init zynq_init_machine(void)
 {
+       struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
+
        /*
         * 64KB way size, 8-way associativity, parity disabled
         */
@@ -59,6 +61,7 @@ static void __init zynq_init_machine(void)
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 
        platform_device_register(&zynq_cpuidle_device);
+       platform_device_register_full(&devinfo);
 }
 
 static void __init zynq_timer_init(void)
This page took 0.041736 seconds and 5 git commands to generate.