aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-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 abefbc4d8e0..fbe31313d7e 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[] = {