diff options
author | vjagadish <vjagadish@nvidia.com> | 2011-05-06 12:34:11 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:42:39 -0800 |
commit | 1305572a0496369aca768fa8f6b1faf072d2f475 (patch) | |
tree | 7105fe326480fb6395f29a6ffc5c128233b0a89d /arch/arm/mach-tegra/platsmp.c | |
parent | 1c31f0a1841cfa81331ea8c3a6391a23df24a0ff (diff) |
ARM: tegra: Check if the cpu already booted or not
Check the CPU is ever booted before entering into
powerup status confirmation loop.
BUG 824307
Original-Change-Id: I474d0536b00e84967a240037d2ed984a889dd2e0
Reviewed-on: http://git-master/r/30679
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Venkata Jagadish <vjagadish@nvidia.com>
Tested-by: Venkata Jagadish <vjagadish@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Rebase-Id: R2346bcc108f59eae21cc98a311b95dc702c0a57e
Diffstat (limited to 'arch/arm/mach-tegra/platsmp.c')
-rw-r--r-- | arch/arm/mach-tegra/platsmp.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 74af22d64f2b..04df5f6c0339 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c @@ -188,17 +188,21 @@ static int power_up_cpu(unsigned int cpu) BUG_ON(cpu == smp_processor_id()); BUG_ON(is_lp_cluster()); - /* This function is entered after CPU has been already un-gated by - flow controller. Wait for confirmation that cpu is powered and - remove clamps. */ - timeout = jiffies + HZ; - do { - if (is_cpu_powered(cpu)) - goto remove_clamps; - udelay(10); - } while (time_before(jiffies, timeout)); - - /* Flow controller did not work as expected - try directly toggle + /* If this cpu has booted this function is entered after + * CPU has been already un-gated by flow controller. Wait + * for confirmation that cpu is powered and remove clamps. + * On first boot entry do not wait - go to direct ungate. + */ + if (cpu_isset(cpu,*(cpumask_t*)&tegra_cpu_init_map)) + { + timeout = jiffies + HZ; + do { + if (is_cpu_powered(cpu)) + goto remove_clamps; + udelay(10); + } while (time_before(jiffies, timeout)); + } + /* 1'st boot or Flow controller did not work as expected - try directly toggle power gates. Bail out if direct power on also failed */ if (!is_cpu_powered(cpu)) { |