Skip to content

Commit

Permalink
ARM: tegra30: make the wait time of CPU power up to proportional to HZ
Browse files Browse the repository at this point in the history
It would rather to use the API of time_to_jiffies than a constant number
of jiffies for the wait time of CPU power up.

Based on the work by:
Sang-Hun Lee <sanlee@nvidia.com>

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
  • Loading branch information
Joseph Lo authored and Stephen Warren committed Jan 28, 2013
1 parent 9e32366 commit 1395868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-tegra/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int tegra30_power_up_cpu(unsigned int cpu)
* next time around.
*/
if (cpumask_test_cpu(cpu, &tegra_cpu_init_mask)) {
timeout = jiffies + 5*HZ;
timeout = jiffies + msecs_to_jiffies(50);
do {
if (!tegra_powergate_is_powered(pwrgateid))
goto remove_clamps;
Expand All @@ -110,7 +110,7 @@ static int tegra30_power_up_cpu(unsigned int cpu)
return ret;

/* Wait for the power to come up. */
timeout = jiffies + 10*HZ;
timeout = jiffies + msecs_to_jiffies(100);
while (tegra_powergate_is_powered(pwrgateid)) {
if (time_after(jiffies, timeout))
return -ETIMEDOUT;
Expand Down

0 comments on commit 1395868

Please sign in to comment.