diff options
author | vjagadish <vjagadish@nvidia.com> | 2011-05-06 12:34:11 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-05-18 11:47:14 -0700 |
commit | 74328aae69acd3919025d69bc99ab763e6e0aa23 (patch) | |
tree | cd612a30f8756288ef7dcc971c2b326a44b0fdbf | |
parent | 8ca73d0f803d29682042864bcdf545fa46731b81 (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
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>
-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 26aa6471f1f1..a62470468802 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c @@ -365,17 +365,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)) { |