aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 45ad7f74f356..58e16aef40bb 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 939bd6f70b51..173c2be14d5d 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
@@ -168,7 +169,15 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
168 goto exit; 169 goto exit;
169 } 170 }
170 171
171 dev = omap_device_get_by_hwmod_name(oh_name); 172 if (!strncmp(oh_name, "mpu", 3))
173 /*
174 * All current OMAPs share voltage rail and clock
175 * source, so CPU0 is used to represent the MPU-SS.
176 */
177 dev = get_cpu_device(0);
178 else
179 dev = omap_device_get_by_hwmod_name(oh_name);
180
172 if (IS_ERR(dev)) { 181 if (IS_ERR(dev)) {
173 pr_err("%s: Unable to get dev pointer for hwmod %s\n", 182 pr_err("%s: Unable to get dev pointer for hwmod %s\n",
174 __func__, oh_name); 183 __func__, oh_name);
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 45f77413c21d..3f5eaccf6d8f 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[] = {