Commit 9b50506b authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Linus Torvalds

[PATCH] pmac_cpufreq msleep cleanup/fixes

Uses msleep() instead of schedule_timeout() to guarantee the task delays
as expected.  Two of the changes are reworks of previous msleep() calls
which unnecessarily added a jiffy to the parameter.
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a90588e8
......@@ -141,7 +141,7 @@ static int __pmac dfs_set_cpu_speed(int low_speed)
/* ramping up, set voltage first */
pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 0x05);
/* Make sure we sleep for at least 1ms */
msleep(1 + jiffies_to_msecs(1));
msleep(1);
}
/* set frequency */
......@@ -150,7 +150,7 @@ static int __pmac dfs_set_cpu_speed(int low_speed)
if (low_speed == 1) {
/* ramping down, set voltage last */
pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 0x04);
msleep(1 + jiffies_to_msecs(1));
msleep(1);
}
return 0;
......@@ -167,8 +167,7 @@ static int __pmac gpios_set_cpu_speed(int low_speed)
if (low_speed == 0) {
pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 0x05);
/* Delay is way too big but it's ok, we schedule */
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/100);
msleep(10);
}
/* Set frequency */
......@@ -185,8 +184,7 @@ static int __pmac gpios_set_cpu_speed(int low_speed)
if (low_speed == 1) {
pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 0x04);
/* Delay is way too big but it's ok, we schedule */
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/100);
msleep(10);
}
#ifdef DEBUG_FREQ
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment