aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-10-09 17:05:38 -0400
committerOlof Johansson <olof@lixom.net>2012-10-09 18:00:57 -0400
commit1e574e3a7dbef1c0365494687d7a0b6dca7eac93 (patch)
treec01ad64304ac7538542173b60b45f11828d915d5 /arch
parentccd7e49c241d8db86d7935a3976d11f2e2301d1f (diff)
parent37fedb4c423ab78639e65a7c15d2f23cb412aa7e (diff)
Merge tag 'omap-for-v3.7-rc1/fixes-cpufreq-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Tony Lindgren: These were agreed to be merged via arm soc tree as Rafael is on vacation. From Kevin Hilman <khilman@deeprootsystems.com>: This series a couple bug fixes and a couple fixes that make this driver support recently added OMAP-based SoCs. The 'get_cpu_device' patch is needed due to a change in the OMAP OMAP PM core code which enforces use of get_cpu_device() instead of a deprecated OMAP-specific API. The usage of plat/*.h headers breaks single zImage, so platforms are cleaning up and/or removing plat/*.h so the driver needs to be fixed accordingly. This series is based on the merge of Rafael's pm-for-3.7-rc1 tag into Linus' master branch: commit 16642a2e7be23bbda013fc32d8f6c68982eab603. * tag 'omap-for-v3.7-rc1/fixes-cpufreq-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: PM: MPU DVFS: use generic CPU device for MPU-SS cpufreq: OMAP: use get_cpu_device() instead of omap_device API cpufreq: OMAP: fix clock usage to be SoC independent, remove plat/ includes cpufreq: OMAP: remove unused <plat/omap-pm.h> cpufreq: OMAP: ensure valid clock rate before scaling
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/opp.c23
-rw-r--r--arch/arm/mach-omap2/pm.c11
-rw-r--r--arch/arm/mach-omap2/twl-common.c2
3 files changed, 28 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c
index 45ad7f74f35..58e16aef40b 100644
--- a/arch/arm/mach-omap2/opp.c
+++ b/arch/arm/mach-omap2/opp.c
@@ -18,6 +18,7 @@
18 */ 18 */
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/opp.h> 20#include <linux/opp.h>
21#include <linux/cpu.h>
21 22
22#include <plat/omap_device.h> 23#include <plat/omap_device.h>
23 24
@@ -62,13 +63,23 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
62 __func__, i); 63 __func__, i);
63 return -EINVAL; 64 return -EINVAL;
64 } 65 }
65 oh = omap_hwmod_lookup(opp_def->hwmod_name); 66
66 if (!oh || !oh->od) { 67 if (!strncmp(opp_def->hwmod_name, "mpu", 3)) {
67 pr_debug("%s: no hwmod or odev for %s, [%d] cannot add OPPs.\n", 68 /*
68 __func__, opp_def->hwmod_name, i); 69 * All current OMAPs share voltage rail and
69 continue; 70 * clock source, so CPU0 is used to represent
71 * the MPU-SS.
72 */
73 dev = get_cpu_device(0);
74 } else {
75 oh = omap_hwmod_lookup(opp_def->hwmod_name);
76 if (!oh || !oh->od) {
77 pr_debug("%s: no hwmod or odev for %s, [%d] cannot add OPPs.\n",
78 __func__, opp_def->hwmod_name, i);
79 continue;
80 }
81 dev = &oh->od->pdev->dev;
70 } 82 }
71 dev = &oh->od->pdev->dev;
72 83
73 r = opp_add(dev, opp_def->freq, opp_def->u_volt); 84 r = opp_add(dev, opp_def->freq, opp_def->u_volt);
74 if (r) { 85 if (r) {
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 1e40afe7ed3..ea61c32957b 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -16,6 +16,7 @@
16#include <linux/opp.h> 16#include <linux/opp.h>
17#include <linux/export.h> 17#include <linux/export.h>
18#include <linux/suspend.h> 18#include <linux/suspend.h>
19#include <linux/cpu.h>
19 20
20#include <asm/system_misc.h> 21#include <asm/system_misc.h>
21 22
@@ -169,7 +170,15 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
169 goto exit; 170 goto exit;
170 } 171 }
171 172
172 dev = omap_device_get_by_hwmod_name(oh_name); 173 if (!strncmp(oh_name, "mpu", 3))
174 /*
175 * All current OMAPs share voltage rail and clock
176 * source, so CPU0 is used to represent the MPU-SS.
177 */
178 dev = get_cpu_device(0);
179 else
180 dev = omap_device_get_by_hwmod_name(oh_name);
181
173 if (IS_ERR(dev)) { 182 if (IS_ERR(dev)) {
174 pr_err("%s: Unable to get dev pointer for hwmod %s\n", 183 pr_err("%s: Unable to get dev pointer for hwmod %s\n",
175 __func__, oh_name); 184 __func__, oh_name);
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 45f77413c21..3f5eaccf6d8 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -158,7 +158,7 @@ static struct regulator_init_data omap3_vpll2_idata = {
158}; 158};
159 159
160static struct regulator_consumer_supply omap3_vdd1_supply[] = { 160static struct regulator_consumer_supply omap3_vdd1_supply[] = {
161 REGULATOR_SUPPLY("vcc", "mpu.0"), 161 REGULATOR_SUPPLY("vcc", "cpu0"),
162}; 162};
163 163
164static struct regulator_consumer_supply omap3_vdd2_supply[] = { 164static struct regulator_consumer_supply omap3_vdd2_supply[] = {