summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra3_clocks.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2011-08-05 00:28:10 -0700
committerVarun Colbert <vcolbert@nvidia.com>2011-08-08 11:36:51 -0700
commit6527d8347a132f443d88b54f9548e76d522e8d9d (patch)
treed11ac7e6326cc8425d50169902127da5c159bd5c /arch/arm/mach-tegra/tegra3_clocks.c
parent3b25cf262df6e4cd33fd99329a62c42608f12b98 (diff)
ARM: tegra: power: Propagate Tegra3 EMC parent ref count
Since, Tegra3 low level suspend code may change EMC parent underneath clock framework ref count for the new parent is propagated up to the clock root during clock resume procedure. Bug 853986 Change-Id: Iae84ee391e8940fc2d2fcfe47a7a3aae4faa6888 Reviewed-on: http://git-master/r/45712 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra3_clocks.c')
-rw-r--r--arch/arm/mach-tegra/tegra3_clocks.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra3_clocks.c b/arch/arm/mach-tegra/tegra3_clocks.c
index 15bd15360bd9..2455a3655e66 100644
--- a/arch/arm/mach-tegra/tegra3_clocks.c
+++ b/arch/arm/mach-tegra/tegra3_clocks.c
@@ -4444,7 +4444,12 @@ void tegra_clk_resume(void)
BUG_ON(!p->refcnt);
p->refcnt--;
- tegra_clk_emc.parent->refcnt++;
+
+ /* the new parent is enabled by low level code, but ref count
+ need to be updated up to the root */
+ p = tegra_clk_emc.parent;
+ while (p && ((p->refcnt++) == 0))
+ p = p->parent;
}
tegra_emc_timing_invalidate();