From: Kevin Hilman <khilman@deeprootsystems.com>
To: linux-omap@vger.kernel.org
Cc: nm@ti.com, thara@ti.com, b-cousson@ti.com
Subject: [PATCH 09/12] OMAP3: CPUfreq: update to device-based OPP API
Date: Wed, 16 Jun 2010 17:17:10 -0700 [thread overview]
Message-ID: <1276733833-18510-10-git-send-email-khilman@deeprootsystems.com> (raw)
In-Reply-To: <1276733833-18510-1-git-send-email-khilman@deeprootsystems.com>
Update usage of OPP API to use new device-based API. This requires
getting the 'struct device' for the MPU and using that with the OPP
API.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/plat-omap/cpu-omap.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
index 0674405..b086795 100644
--- a/arch/arm/plat-omap/cpu-omap.c
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -89,6 +89,7 @@ static int omap_target(struct cpufreq_policy *policy,
#endif
#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
unsigned long freq;
+ struct device *mpu_dev = omap_get_mpu_device();
#endif
int ret = 0;
@@ -115,7 +116,7 @@ static int omap_target(struct cpufreq_policy *policy,
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
#elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
freq = target_freq * 1000;
- if (opp_find_freq_ceil(OPP_MPU, &freq))
+ if (opp_find_freq_ceil(mpu_dev, &freq))
omap_pm_cpu_set_freq(freq);
#endif
return ret;
@@ -134,10 +135,13 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy)
policy->cur = policy->min = policy->max = omap_getspeed(0);
- if (!cpu_is_omap34xx())
+ if (!cpu_is_omap34xx()) {
clk_init_cpufreq_table(&freq_table);
- else
- opp_init_cpufreq_table(OPP_MPU, &freq_table);
+ } else {
+ struct device *mpu_dev = omap_get_mpu_device();
+
+ opp_init_cpufreq_table(mpu_dev, &freq_table);
+ }
if (freq_table) {
result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
--
1.7.0.2
next prev parent reply other threads:[~2010-06-17 0:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 0:17 [PATCH 00/12] rework OPP layer to handle device-based OPPs Kevin Hilman
2010-06-17 0:17 ` [PATCH 01/12] OMAP2/3: hwmod: remove '_hwmod' suffix from names Kevin Hilman
2010-06-17 14:23 ` Kevin Hilman
2010-06-17 0:17 ` [PATCH 02/12] OMAP: hwmod: add class for DSP hwmods Kevin Hilman
2010-06-17 0:17 ` [PATCH 03/12] OMAP3: hwmod: add data for OMAP3 IVA2 Kevin Hilman
2010-06-17 0:17 ` [PATCH 04/12] OMAP: omap_device: ensure hwmod tracks attached omap_device pointer Kevin Hilman
2010-06-17 0:17 ` [PATCH 05/12] OMAP: create omap_devices for MPU, DSP, L3 Kevin Hilman
2010-06-23 11:01 ` Gopinath, Thara
2010-06-23 14:48 ` Kevin Hilman
2010-06-23 15:03 ` Gopinath, Thara
2010-06-23 17:46 ` Kevin Hilman
2010-06-24 6:23 ` Gopinath, Thara
2010-06-24 18:09 ` Kevin Hilman
2010-06-17 0:17 ` [PATCH 06/12] OMAP: voltage: use device_initcall() Kevin Hilman
2010-06-17 0:17 ` [PATCH 07/12] OMAP: SR: " Kevin Hilman
2010-06-17 0:17 ` [PATCH 08/12] OMAP2: OPP: update API to be device-based Kevin Hilman
2010-06-17 0:17 ` Kevin Hilman [this message]
2010-06-17 0:17 ` [PATCH 10/12] OMAP: voltage: update to new device-based OPP API Kevin Hilman
2010-06-17 0:17 ` [PATCH 11/12] OMAP: SRF: " Kevin Hilman
2010-06-17 0:17 ` [PATCH 12/12] OMAP: SRF: must be initialized before allowing constraints to be set Kevin Hilman
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=1276733833-18510-10-git-send-email-khilman@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=b-cousson@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=thara@ti.com \
/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).