diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-01-26 22:12:59 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-01-26 22:12:59 -0500 |
commit | 55ed96945b1f3d0f4ad21a27b32ce4bd99d8c268 (patch) | |
tree | 0bec60498742922a9c00f39ff63eb48549d391fc /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 6b04e0d99d4113ede24e263e3df246a17f490339 (diff) |
OMAP2/3 clkdm/pwrdm: move wkdep/sleepdep handling from pwrdm to clkdm
Move clockdomain wakeup dependency and sleep dependency data
structures from the powerdomain layer to the clockdomain layer, where
they belong. These dependencies were originally placed in the
powerdomain layer due to unclear documentation; however, it is clear
now that these dependencies are between clockdomains. For OMAP2/3,
this is not such a big problem, but for OMAP4 this needs to be fixed.
Thanks to Benoît Cousson <b-cousson@ti.com> for his advice on this
patch.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 478ae585ca39..ad884c0aaa42 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -299,15 +299,14 @@ static int _disable_wakeup(struct omap_hwmod *oh) | |||
299 | * be accessed by the IVA, there should be a sleepdep between the IVA | 299 | * be accessed by the IVA, there should be a sleepdep between the IVA |
300 | * initiator and the module). Only applies to modules in smart-idle | 300 | * initiator and the module). Only applies to modules in smart-idle |
301 | * mode. Returns -EINVAL upon error or passes along | 301 | * mode. Returns -EINVAL upon error or passes along |
302 | * pwrdm_add_sleepdep() value upon success. | 302 | * clkdm_add_sleepdep() value upon success. |
303 | */ | 303 | */ |
304 | static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) | 304 | static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) |
305 | { | 305 | { |
306 | if (!oh->_clk) | 306 | if (!oh->_clk) |
307 | return -EINVAL; | 307 | return -EINVAL; |
308 | 308 | ||
309 | return pwrdm_add_sleepdep(oh->_clk->clkdm->pwrdm.ptr, | 309 | return clkdm_add_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); |
310 | init_oh->_clk->clkdm->pwrdm.ptr); | ||
311 | } | 310 | } |
312 | 311 | ||
313 | /** | 312 | /** |
@@ -320,15 +319,14 @@ static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) | |||
320 | * be accessed by the IVA, there should be no sleepdep between the IVA | 319 | * be accessed by the IVA, there should be no sleepdep between the IVA |
321 | * initiator and the module). Only applies to modules in smart-idle | 320 | * initiator and the module). Only applies to modules in smart-idle |
322 | * mode. Returns -EINVAL upon error or passes along | 321 | * mode. Returns -EINVAL upon error or passes along |
323 | * pwrdm_add_sleepdep() value upon success. | 322 | * clkdm_del_sleepdep() value upon success. |
324 | */ | 323 | */ |
325 | static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) | 324 | static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh) |
326 | { | 325 | { |
327 | if (!oh->_clk) | 326 | if (!oh->_clk) |
328 | return -EINVAL; | 327 | return -EINVAL; |
329 | 328 | ||
330 | return pwrdm_del_sleepdep(oh->_clk->clkdm->pwrdm.ptr, | 329 | return clkdm_del_sleepdep(oh->_clk->clkdm, init_oh->_clk->clkdm); |
331 | init_oh->_clk->clkdm->pwrdm.ptr); | ||
332 | } | 330 | } |
333 | 331 | ||
334 | /** | 332 | /** |