Commit cd325295 authored by Soren Brinkmann's avatar Soren Brinkmann Committed by Daniel Lezcano

arm: zynq: Add support for cpufreq

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: default avatarSoren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 61f1fc7e
...@@ -24,6 +24,12 @@ cpu@0 { ...@@ -24,6 +24,12 @@ cpu@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0>; reg = <0>;
clocks = <&clkc 3>; clocks = <&clkc 3>;
operating-points = <
/* kHz uV */
666667 1000000
333334 1000000
222223 1000000
>;
}; };
cpu@1 { cpu@1 {
......
...@@ -2,6 +2,8 @@ config ARCH_ZYNQ ...@@ -2,6 +2,8 @@ config ARCH_ZYNQ
bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7 bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7
select ARM_AMBA select ARM_AMBA
select ARM_GIC select ARM_GIC
select ARCH_HAS_CPUFREQ
select ARCH_HAS_OPP
select COMMON_CLK select COMMON_CLK
select CPU_V7 select CPU_V7
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
......
...@@ -51,6 +51,8 @@ static struct platform_device zynq_cpuidle_device = { ...@@ -51,6 +51,8 @@ static struct platform_device zynq_cpuidle_device = {
*/ */
static void __init zynq_init_machine(void) static void __init zynq_init_machine(void)
{ {
struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
/* /*
* 64KB way size, 8-way associativity, parity disabled * 64KB way size, 8-way associativity, parity disabled
*/ */
...@@ -59,6 +61,7 @@ static void __init zynq_init_machine(void) ...@@ -59,6 +61,7 @@ static void __init zynq_init_machine(void)
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
platform_device_register(&zynq_cpuidle_device); platform_device_register(&zynq_cpuidle_device);
platform_device_register_full(&devinfo);
} }
static void __init zynq_timer_init(void) static void __init zynq_timer_init(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