diff options
Diffstat (limited to 'arch/arm/mach-omap2/pm.c')
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 472bf22d5e84..25b8c7f43852 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -60,19 +60,19 @@ EXPORT_SYMBOL(omap4_get_dsp_device); | |||
60 | static int _init_omap_device(char *name, struct device **new_dev) | 60 | static int _init_omap_device(char *name, struct device **new_dev) |
61 | { | 61 | { |
62 | struct omap_hwmod *oh; | 62 | struct omap_hwmod *oh; |
63 | struct omap_device *od; | 63 | struct platform_device *pdev; |
64 | 64 | ||
65 | oh = omap_hwmod_lookup(name); | 65 | oh = omap_hwmod_lookup(name); |
66 | if (WARN(!oh, "%s: could not find omap_hwmod for %s\n", | 66 | if (WARN(!oh, "%s: could not find omap_hwmod for %s\n", |
67 | __func__, name)) | 67 | __func__, name)) |
68 | return -ENODEV; | 68 | return -ENODEV; |
69 | 69 | ||
70 | od = omap_device_build(oh->name, 0, oh, NULL, 0, pm_lats, 0, false); | 70 | pdev = omap_device_build(oh->name, 0, oh, NULL, 0, pm_lats, 0, false); |
71 | if (WARN(IS_ERR(od), "%s: could not build omap_device for %s\n", | 71 | if (WARN(IS_ERR(pdev), "%s: could not build omap_device for %s\n", |
72 | __func__, name)) | 72 | __func__, name)) |
73 | return -ENODEV; | 73 | return -ENODEV; |
74 | 74 | ||
75 | *new_dev = &od->pdev.dev; | 75 | *new_dev = &pdev->dev; |
76 | 76 | ||
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
@@ -136,8 +136,8 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) | |||
136 | 136 | ||
137 | ret = pwrdm_set_next_pwrst(pwrdm, state); | 137 | ret = pwrdm_set_next_pwrst(pwrdm, state); |
138 | if (ret) { | 138 | if (ret) { |
139 | printk(KERN_ERR "Unable to set state of powerdomain: %s\n", | 139 | pr_err("%s: unable to set state of powerdomain: %s\n", |
140 | pwrdm->name); | 140 | __func__, pwrdm->name); |
141 | goto err; | 141 | goto err; |
142 | } | 142 | } |
143 | 143 | ||
@@ -161,11 +161,11 @@ err: | |||
161 | } | 161 | } |
162 | 162 | ||
163 | /* | 163 | /* |
164 | * This API is to be called during init to put the various voltage | 164 | * This API is to be called during init to set the various voltage |
165 | * domains to the voltage as per the opp table. Typically we boot up | 165 | * domains to the voltage as per the opp table. Typically we boot up |
166 | * at the nominal voltage. So this function finds out the rate of | 166 | * at the nominal voltage. So this function finds out the rate of |
167 | * the clock associated with the voltage domain, finds out the correct | 167 | * the clock associated with the voltage domain, finds out the correct |
168 | * opp entry and puts the voltage domain to the voltage specifies | 168 | * opp entry and sets the voltage domain to the voltage specified |
169 | * in the opp entry | 169 | * in the opp entry |
170 | */ | 170 | */ |
171 | static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | 171 | static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, |
@@ -177,21 +177,20 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
177 | unsigned long freq, bootup_volt; | 177 | unsigned long freq, bootup_volt; |
178 | 178 | ||
179 | if (!vdd_name || !clk_name || !dev) { | 179 | if (!vdd_name || !clk_name || !dev) { |
180 | printk(KERN_ERR "%s: Invalid parameters!\n", __func__); | 180 | pr_err("%s: invalid parameters\n", __func__); |
181 | goto exit; | 181 | goto exit; |
182 | } | 182 | } |
183 | 183 | ||
184 | voltdm = omap_voltage_domain_lookup(vdd_name); | 184 | voltdm = omap_voltage_domain_lookup(vdd_name); |
185 | if (IS_ERR(voltdm)) { | 185 | if (IS_ERR(voltdm)) { |
186 | printk(KERN_ERR "%s: Unable to get vdd pointer for vdd_%s\n", | 186 | pr_err("%s: unable to get vdd pointer for vdd_%s\n", |
187 | __func__, vdd_name); | 187 | __func__, vdd_name); |
188 | goto exit; | 188 | goto exit; |
189 | } | 189 | } |
190 | 190 | ||
191 | clk = clk_get(NULL, clk_name); | 191 | clk = clk_get(NULL, clk_name); |
192 | if (IS_ERR(clk)) { | 192 | if (IS_ERR(clk)) { |
193 | printk(KERN_ERR "%s: unable to get clk %s\n", | 193 | pr_err("%s: unable to get clk %s\n", __func__, clk_name); |
194 | __func__, clk_name); | ||
195 | goto exit; | 194 | goto exit; |
196 | } | 195 | } |
197 | 196 | ||
@@ -200,14 +199,14 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
200 | 199 | ||
201 | opp = opp_find_freq_ceil(dev, &freq); | 200 | opp = opp_find_freq_ceil(dev, &freq); |
202 | if (IS_ERR(opp)) { | 201 | if (IS_ERR(opp)) { |
203 | printk(KERN_ERR "%s: unable to find boot up OPP for vdd_%s\n", | 202 | pr_err("%s: unable to find boot up OPP for vdd_%s\n", |
204 | __func__, vdd_name); | 203 | __func__, vdd_name); |
205 | goto exit; | 204 | goto exit; |
206 | } | 205 | } |
207 | 206 | ||
208 | bootup_volt = opp_get_voltage(opp); | 207 | bootup_volt = opp_get_voltage(opp); |
209 | if (!bootup_volt) { | 208 | if (!bootup_volt) { |
210 | printk(KERN_ERR "%s: unable to find voltage corresponding" | 209 | pr_err("%s: unable to find voltage corresponding " |
211 | "to the bootup OPP for vdd_%s\n", __func__, vdd_name); | 210 | "to the bootup OPP for vdd_%s\n", __func__, vdd_name); |
212 | goto exit; | 211 | goto exit; |
213 | } | 212 | } |
@@ -216,8 +215,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
216 | return 0; | 215 | return 0; |
217 | 216 | ||
218 | exit: | 217 | exit: |
219 | printk(KERN_ERR "%s: Unable to put vdd_%s to its init voltage\n\n", | 218 | pr_err("%s: unable to set vdd_%s\n", __func__, vdd_name); |
220 | __func__, vdd_name); | ||
221 | return -EINVAL; | 219 | return -EINVAL; |
222 | } | 220 | } |
223 | 221 | ||