Tegra: PMC: check if a CPU is already online

This patch checks if the target CPU is already online before
proceeding with it's power ON sequence.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
This commit is contained in:
Varun Wadekar 2015-07-16 10:35:12 +05:30
parent 03cd23a10a
commit 2e7aea3d48
1 changed files with 7 additions and 0 deletions

View File

@ -51,6 +51,13 @@ void tegra_pmc_cpu_on(int cpu)
{
uint32_t val;
/*
* Check if CPU is already power ungated
*/
val = tegra_pmc_read_32(PMC_PWRGATE_STATUS);
if (val & (1 << pmc_cpu_powergate_id[cpu]))
return;
/*
* The PMC deasserts the START bit when it starts the power
* ungate process. Loop till no power toggle is in progress.