diff options
| author | Nishanth Aravamudan <nacc@us.ibm.com> | 2004-10-21 21:11:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-10-21 21:11:36 -0700 |
| commit | 9b50506bb61b84958d7c36f892433bea8d384792 (patch) | |
| tree | a43dd121cdec0dde366b93fe4f1e600009d4eb77 | |
| parent | a90588e822e468f3899c2a2febfe2542852e914e (diff) | |
[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: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | arch/ppc/platforms/pmac_cpufreq.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c index 536d3829b092..c50aa7fd1958 100644 --- a/arch/ppc/platforms/pmac_cpufreq.c +++ b/arch/ppc/platforms/pmac_cpufreq.c @@ -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 |
