summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stmp37xx
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-02-22 22:09:38 -0700
committerPaul Walmsley <paul@pwsan.com>2010-02-24 17:45:16 -0700
commit30962d9d0c74f6b00a7dece200fa08392b62817d (patch)
tree72c1e60fd4f42c244fb8fe9c68f8e3d95a880edb /arch/arm/mach-stmp37xx
parent4d30e82c26b7212021b9a5ab57760d9b8a3075fe (diff)
OMAP2+ clock: revise omap2_clk_{disable,enable}()
Simplify the code in the omap2_clk_disable() and omap2_clk_enable() functions, reducing levels of indentation. This makes the code easier to read. Add some additional debugging pr_debug()s here also to help others understand what is going on. Revise the omap2_clk_disable() logic so that it now attempts to disable the clock's clockdomain before recursing up the clock tree. Simultaneously, ensure that omap2_clk_enable() is called on parent clocks first, before enabling the clockdomain. This ensures that a parent clock's clockdomain is enabled before the child clock's clockdomain. These sequences should be the inverse of each other. Revise the omap2_clk_enable() logic so that it now cleans up after itself upon encountering an error. Previously, an error enabling a parent clock could have resulted in inconsistent usecounts on the enclosing clockdomain. Remove the trivial _omap2_clk_disable() and _omap2_clk_enable() static functions, and replace it with the clkops calls that they were executing. For all this to work, the clockdomain omap2_clkdm_clk_enable() and omap2_clkdm_clk_disable() code must not return an error on clockdomains without CLKSTCTRL registers; so modify those functions to simply return 0 in that case. While here, add some basic kerneldoc documentation on both functions, and get rid of some old non-CodingStyle-compliant comments that have existed since the dawn of time (at least, the OMAP clock framework's time). Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Richard Woodruff <r-woodruff2@ti.com> Cc: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-stmp37xx')
0 files changed, 0 insertions, 0 deletions