diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 20:42:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 20:42:18 -0400 |
commit | b0189cd087aa82bd23277cb5c8960ab030e13e5c (patch) | |
tree | 7b1a4c152cd62ce136fd5b0e4379d58eb2244e66 /arch/arm/mach-omap2/clock.c | |
parent | 69f1d1a6acbaa7d83ef3f4ee26209c58cd000204 (diff) | |
parent | bc574e190d3fbed37d724e33a16aee326d6f2ac4 (diff) |
Merge branch 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (47 commits)
OMAP: Add debugfs node to show the summary of all clocks
OMAP2+: hwmod: Follow the recommended PRCM module enable sequence
OMAP2+: clock: allow per-SoC clock init code to prevent clockdomain calls from clock code
OMAP2+: clockdomain: Add per clkdm lock to prevent concurrent state programming
OMAP2+: PM: idle clkdms only if already in idle
OMAP2+: clockdomain: add clkdm_in_hwsup()
OMAP2+: clockdomain: Add 2 APIs to control clockdomain from hwmod framework
OMAP: clockdomain: Remove redundant call to pwrdm_wait_transition()
OMAP4: hwmod: Introduce the module control in hwmod control
OMAP4: cm: Add two new APIs for modulemode control
OMAP4: hwmod data: Add modulemode entry in omap_hwmod structure
OMAP4: hwmod data: Add PRM context register offset
OMAP4: prm: Remove deprecated functions
OMAP4: prm: Replace warm reset API with the offset based version
OMAP4: hwmod: Replace RSTCTRL absolute address with offset macros
OMAP: hwmod: Wait the idle status to be disabled
OMAP4: hwmod: Replace CLKCTRL absolute address with offset macros
OMAP2+: hwmod: Init clkdm field at boot time
OMAP4: hwmod data: Add clock domain attribute
OMAP4: clock data: Add missing divider selection for auxclks
...
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index bf9c36c7dffd..1f3481f8d695 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -38,6 +38,14 @@ | |||
38 | u8 cpu_mask; | 38 | u8 cpu_mask; |
39 | 39 | ||
40 | /* | 40 | /* |
41 | * clkdm_control: if true, then when a clock is enabled in the | ||
42 | * hardware, its clockdomain will first be enabled; and when a clock | ||
43 | * is disabled in the hardware, its clockdomain will be disabled | ||
44 | * afterwards. | ||
45 | */ | ||
46 | static bool clkdm_control = true; | ||
47 | |||
48 | /* | ||
41 | * OMAP2+ specific clock functions | 49 | * OMAP2+ specific clock functions |
42 | */ | 50 | */ |
43 | 51 | ||
@@ -100,6 +108,19 @@ void omap2_init_clk_clkdm(struct clk *clk) | |||
100 | } | 108 | } |
101 | 109 | ||
102 | /** | 110 | /** |
111 | * omap2_clk_disable_clkdm_control - disable clkdm control on clk enable/disable | ||
112 | * | ||
113 | * Prevent the OMAP clock code from calling into the clockdomain code | ||
114 | * when a hardware clock in that clockdomain is enabled or disabled. | ||
115 | * Intended to be called at init time from omap*_clk_init(). No | ||
116 | * return value. | ||
117 | */ | ||
118 | void __init omap2_clk_disable_clkdm_control(void) | ||
119 | { | ||
120 | clkdm_control = false; | ||
121 | } | ||
122 | |||
123 | /** | ||
103 | * omap2_clk_dflt_find_companion - find companion clock to @clk | 124 | * omap2_clk_dflt_find_companion - find companion clock to @clk |
104 | * @clk: struct clk * to find the companion clock of | 125 | * @clk: struct clk * to find the companion clock of |
105 | * @other_reg: void __iomem ** to return the companion clock CM_*CLKEN va in | 126 | * @other_reg: void __iomem ** to return the companion clock CM_*CLKEN va in |
@@ -268,7 +289,7 @@ void omap2_clk_disable(struct clk *clk) | |||
268 | clk->ops->disable(clk); | 289 | clk->ops->disable(clk); |
269 | } | 290 | } |
270 | 291 | ||
271 | if (clk->clkdm) | 292 | if (clkdm_control && clk->clkdm) |
272 | clkdm_clk_disable(clk->clkdm, clk); | 293 | clkdm_clk_disable(clk->clkdm, clk); |
273 | 294 | ||
274 | if (clk->parent) | 295 | if (clk->parent) |
@@ -308,7 +329,7 @@ int omap2_clk_enable(struct clk *clk) | |||
308 | } | 329 | } |
309 | } | 330 | } |
310 | 331 | ||
311 | if (clk->clkdm) { | 332 | if (clkdm_control && clk->clkdm) { |
312 | ret = clkdm_clk_enable(clk->clkdm, clk); | 333 | ret = clkdm_clk_enable(clk->clkdm, clk); |
313 | if (ret) { | 334 | if (ret) { |
314 | WARN(1, "clock: %s: could not enable clockdomain %s: " | 335 | WARN(1, "clock: %s: could not enable clockdomain %s: " |
@@ -330,7 +351,7 @@ int omap2_clk_enable(struct clk *clk) | |||
330 | return 0; | 351 | return 0; |
331 | 352 | ||
332 | oce_err3: | 353 | oce_err3: |
333 | if (clk->clkdm) | 354 | if (clkdm_control && clk->clkdm) |
334 | clkdm_clk_disable(clk->clkdm, clk); | 355 | clkdm_clk_disable(clk->clkdm, clk); |
335 | oce_err2: | 356 | oce_err2: |
336 | if (clk->parent) | 357 | if (clk->parent) |