From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: tglx@linutronix.de, mingo@kernel.org
Cc: linux-kernel@vger.kernel.org, dan.carpenter@oracle.com,
ezequiel.garcia@free-electrons.com, ivan.khoronzhuk@ti.com,
linus.walleij@linaro.org, magnus.damm@gmail.com,
matthias.bgg@gmail.com, soren.brinkmann@xilinx.com,
sboyd@codeaurora.org
Subject: [PATCH 16/17] arm: zynq: Add support for cpufreq
Date: Tue, 11 Mar 2014 23:40:52 +0100 [thread overview]
Message-ID: <1394577653-8615-16-git-send-email-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <1394577653-8615-1-git-send-email-daniel.lezcano@linaro.org>
From: Soren Brinkmann <soren.brinkmann@xilinx.com>
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 | 6 ++++++
arch/arm/mach-zynq/Kconfig | 2 ++
arch/arm/mach-zynq/common.c | 3 +++
3 files changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi
index 8b67b19..789d0ba 100644
--- a/arch/arm/boot/dts/zynq-7000.dtsi
+++ b/arch/arm/boot/dts/zynq-7000.dtsi
@@ -24,6 +24,12 @@
device_type = "cpu";
reg = <0>;
clocks = <&clkc 3>;
+ operating-points = <
+ /* kHz uV */
+ 666667 1000000
+ 333334 1000000
+ 222223 1000000
+ >;
};
cpu@1 {
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index f84fab1..f03e75b 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -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
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 1db2a5ca..6444681 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -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)
--
1.7.9.5
next prev parent reply other threads:[~2014-03-11 22:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 22:35 [GIT PR] clockevents : new material for 3.15 Daniel Lezcano
2014-03-11 22:40 ` [PATCH 01/17] clocksource: arch_timer: Set dynamic irq affinity on mmio clockevent Daniel Lezcano
2014-03-11 22:40 ` [PATCH 02/17] ARM: u300: move timer driver to clocksource Daniel Lezcano
2014-03-11 22:40 ` [PATCH 03/17] clocksource: sunxi: Add new compatibles Daniel Lezcano
2014-03-11 22:40 ` [PATCH 04/17] ARM: sunxi: dt: Convert to the new clocksource compatible Daniel Lezcano
2014-03-11 22:40 ` [PATCH 05/17] clocksource: keystone: add bindings for keystone timer Daniel Lezcano
2014-03-11 22:40 ` [PATCH 06/17] clocksource: timer-keystone: introduce clocksource driver for Keystone Daniel Lezcano
2014-03-11 22:40 ` [PATCH 07/17] clocksource: timer-keystone: Delete unnecessary variable Daniel Lezcano
2014-03-11 22:40 ` [PATCH 08/17] clocksource: orion: Use atomic access for shared registers Daniel Lezcano
2014-03-11 22:40 ` [PATCH 09/17] clocksource: armada-370-xp: " Daniel Lezcano
2014-03-11 22:40 ` [PATCH 10/17] ARM: shmobile: Remove CMT, TMU and STI Kconfig entries Daniel Lezcano
2014-03-11 22:40 ` [PATCH 11/17] sh: Remove Kconfig entries for TMU, CMT and MTU2 Daniel Lezcano
2014-03-11 22:40 ` [PATCH 12/17] clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI Daniel Lezcano
2014-03-11 22:40 ` [PATCH 13/17] clocksource/cadence_ttc: Call clockevents_update_freq() with IRQs enabled Daniel Lezcano
2014-03-11 22:40 ` [PATCH 14/17] clocksource/cadence_ttc: Overhaul clocksource frequency adjustment Daniel Lezcano
2014-03-11 22:40 ` [PATCH 15/17] arm: zynq: Don't use arm_global_timer with cpufreq Daniel Lezcano
2014-03-11 22:40 ` Daniel Lezcano [this message]
2014-03-11 22:40 ` [PATCH 17/17] clocksource: exynos_mct: silence a static checker warning Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394577653-8615-16-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=dan.carpenter@oracle.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=ivan.khoronzhuk@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=mingo@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=soren.brinkmann@xilinx.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome