summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2011-12-29 13:37:31 +0800
committerAndy Green <andy.green@linaro.org>2011-12-29 13:37:31 +0800
commit4572e78b859fa8887e8b1e562579420d8e3f475f (patch)
tree83bda57badb3ede16f1f1f13a70bdf5f37504bb6
parenteadf117f6fc03b95f1f62790dbc1a529e3e48953 (diff)
omap dvfs fail scale if smartreflex not happy to disable right then
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r--arch/arm/mach-omap2/dvfs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c
index 45c8b346e78..fdf1fac881e 100644
--- a/arch/arm/mach-omap2/dvfs.c
+++ b/arch/arm/mach-omap2/dvfs.c
@@ -701,7 +701,8 @@ static int _dvfs_scale(struct device *req_dev, struct device *target_dev,
curr_volt = voltdm_get_voltage(voltdm);
/* Disable smartreflex module across voltage and frequency scaling */
- omap_sr_disable(voltdm);
+ if (omap_sr_disable(voltdm))
+ return -EAGAIN;
if (curr_volt == new_volt) {
volt_scale_dir = DVFS_VOLT_SCALE_NONE;
@@ -875,8 +876,10 @@ int omap_device_scale(struct device *req_dev, struct device *target_dev,
/* Do the actual scaling */
ret = _dvfs_scale(req_dev, target_dev, tdvfs_info);
if (ret) {
- dev_err(target_dev, "%s: scale by %s failed %d[f=%ld, v=%ld]\n",
- __func__, dev_name(req_dev), ret, freq, volt);
+ if (ret != -EAGAIN)
+ dev_err(target_dev, "%s: scale by %s failed "
+ "%d[f=%ld, v=%ld]\n",
+ __func__, dev_name(req_dev), ret, freq, volt);
_remove_freq_request(tdvfs_info, req_dev,
target_dev);
_remove_vdd_user(tdvfs_info, target_dev);