]> Pileus Git - ~andy/linux/commit
ARM: OMAP2+: clockdomain: bypass clockdomain handling when disabling unused clks
authorMike Turquette <mturquette@ti.com>
Fri, 9 Nov 2012 18:28:42 +0000 (11:28 -0700)
committerPaul Walmsley <paul@pwsan.com>
Tue, 13 Nov 2012 02:10:19 +0000 (19:10 -0700)
commitd043d87cd33ef0a6bec707077ef88f4c020db4c8
tree826aa2c9038d5e8bfb83ccf2ed9b2fc547f076ab
parentb797be1d4c079e78a3cb4e95f4a74274a4aef9f5
ARM: OMAP2+: clockdomain: bypass clockdomain handling when disabling unused clks

The OMAP port to the common clk framework[1] resulted in spurious WARNs
while disable unused clocks.  This is due to _clkdm_clk_hwmod_disable
catching clkdm->usecount's with a value of zero.  Even less desirable it
would not allow the clkdm_clk_disable function pointer to get called due
to an early return of -ERANGE.

This patch adds a check for such a corner case by skipping the WARN and
early return in the event that clkdm->usecount and clk->enable_usecount
are both zero.  Presumably this could only happen during the check for
unused clocks at boot-time.

[1] http://article.gmane.org/gmane.linux.ports.arm.omap/88824

Signed-off-by: Mike Turquette <mturquette@ti.com>
[paul@pwsan.com: split the hwmod and clock disable cases; modified the
 code to skip the clockdomain handling during the disable-unused-clocks phase;
 added COMMON_CLK ifdef; removed include of clk-private.h at Mike's request]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/mach-omap2/clockdomain.c