ARM: tegra11: clock: Don't propagate boot clock clean up
Alex Frid [Thu, 31 Jan 2013 05:27:50 +0000 (21:27 -0800)]
When disabling coupled gate clocks left on by boot-loader, but not
ref-counted during kernel initialization, do not propagate disable
operation to coupled parents.

Bug 1226948

Change-Id: I4b4e56138f46d08dd70be2ba3781c5845098bf22
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/195843
(cherry picked from commit d157d234ea5f5fc993c8002d40aee761118d937b)
Reviewed-on: http://git-master/r/196808
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>

arch/arm/mach-tegra/tegra11_clocks.c

index 3f17113..d8f2e90 100644 (file)
@@ -5157,6 +5157,9 @@ static void tegra11_clk_coupled_gate_disable(struct clk *c)
 
        tegra11_periph_clk_disable(c);
 
+       if (!c->refcnt) /* happens only on boot clean-up: don't propagate */
+               return;
+
        for (sel = c->inputs; sel->input != NULL; sel++) {
                if (sel->input == c->parent)
                        continue;