linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3 1/7] ARM: mvebu: ensure CPU clocks are enabled
Date: Wed,  9 Jul 2014 17:45:09 +0200	[thread overview]
Message-ID: <1404920715-19834-2-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <1404920715-19834-1-git-send-email-thomas.petazzoni@free-electrons.com>

In the Armada XP SMP support code, we are reading the clock frequency
of the booting CPU, and use that to assign the same frequency to the
other CPUs, and we do this while the clocks are disabled.

However, the CPU clocks are in fact never prepared/enabled, and to
support cpufreq, we now have two code paths to change the frequency of
the CPU clocks in the CPU clock driver: one when the clock is enabled
(dynamic frequency scaling), one when the clock is disabled (adjusting
the CPU frequency before starting the CPU). In order for this to work,
the CPU clocks now have to be prepared and enabled after the initial
synchronization of the clock frequencies is done, so that all future
rate changes of the CPU clocks will trigger a dynamic frequency
scaling transition.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/mach-mvebu/platsmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
index 88b976b3..4880b0f 100644
--- a/arch/arm/mach-mvebu/platsmp.c
+++ b/arch/arm/mach-mvebu/platsmp.c
@@ -67,6 +67,7 @@ static void __init set_secondary_cpus_clock(void)
 		if (!cpu_clk)
 			return;
 		clk_set_rate(cpu_clk, rate);
+		clk_prepare_enable(cpu_clk);
 	}
 }
 
-- 
2.0.0

  reply	other threads:[~2014-07-09 15:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 15:45 [PATCHv3 0/7] cpufreq support for Marvell Armada XP Thomas Petazzoni
2014-07-09 15:45 ` Thomas Petazzoni [this message]
2014-07-16 13:02   ` [PATCHv3 1/7] ARM: mvebu: ensure CPU clocks are enabled Jason Cooper
2014-07-09 15:45 ` [PATCHv3 2/7] ARM: mvebu: extend PMSU code to support dynamic frequency scaling Thomas Petazzoni
2014-07-23 23:50   ` Mike Turquette
2014-07-24  6:29     ` Thomas Petazzoni
2014-07-24 11:11       ` Jason Cooper
2014-07-09 15:45 ` [PATCHv3 3/7] clk: mvebu: extend clk-cpu for " Thomas Petazzoni
2014-07-09 15:45 ` [PATCHv3 4/7] ARM: mvebu: update Armada XP DT " Thomas Petazzoni
2014-07-16 12:55   ` Jason Cooper
2014-07-09 15:45 ` [PATCHv3 5/7] ARM: mvebu: allow enabling of cpufreq on Armada XP Thomas Petazzoni
2014-07-09 15:45 ` [PATCHv3 6/7] ARM: mvebu: update mvebu_v7_defconfig with cpufreq support Thomas Petazzoni
2014-07-16 12:52   ` Jason Cooper
2014-07-09 15:45 ` [PATCHv3 7/7] ARM: configs: add cpufreq-generic in multi_v7_defconfig Thomas Petazzoni
2014-07-16 12:49   ` Jason Cooper
2014-07-13 22:33 ` [PATCHv3 0/7] cpufreq support for Marvell Armada XP Jason Cooper
2014-07-23 11:19 ` Thomas Petazzoni
2014-07-23 11:39   ` Jason Cooper
2014-07-23 11:53     ` Thomas Petazzoni
2014-07-23 16:52   ` Viresh Kumar
2014-07-23 23:53 ` [PATCHv3 3/7] clk: mvebu: extend clk-cpu for dynamic frequency scaling Thomas Petazzoni
2014-07-24  6:33   ` Thomas Petazzoni
2014-07-24 17:52     ` Mike Turquette
2014-07-24 18:24       ` Thomas Petazzoni

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=1404920715-19834-2-git-send-email-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).