Browse Source

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>
pull/337/head
Varun Wadekar 9 years ago
parent
commit
2e7aea3d48
  1. 7
      plat/nvidia/tegra/common/drivers/pmc/pmc.c

7
plat/nvidia/tegra/common/drivers/pmc/pmc.c

@ -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.

Loading…
Cancel
Save