Merge tag 'omap-for-v3.9/pm-wfi-take2-signed-v2' of git://git.kernel.org/pub/scm...
[deliverable/linux.git] / arch / arm / mach-omap2 / omap_hwmod.c
index 6549439d8d5fdaf19cf0d8d91bea9db66fcb576c..30657b7c3e336dad260ebe73fc4f3881ada00a82 100644 (file)
 #include <linux/slab.h>
 #include <linux/bootmem.h>
 
+#include <asm/system_misc.h>
+
 #include "clock.h"
 #include "omap_hwmod.h"
 
@@ -2134,6 +2136,8 @@ static int _enable(struct omap_hwmod *oh)
        _enable_clocks(oh);
        if (soc_ops.enable_module)
                soc_ops.enable_module(oh);
+       if (oh->flags & HWMOD_BLOCK_WFI)
+               disable_hlt();
 
        if (soc_ops.update_context_lost)
                soc_ops.update_context_lost(oh);
@@ -2195,6 +2199,8 @@ static int _idle(struct omap_hwmod *oh)
                _idle_sysc(oh);
        _del_initiator_dep(oh, mpu_oh);
 
+       if (oh->flags & HWMOD_BLOCK_WFI)
+               enable_hlt();
        if (soc_ops.disable_module)
                soc_ops.disable_module(oh);
 
@@ -2303,6 +2309,8 @@ static int _shutdown(struct omap_hwmod *oh)
        if (oh->_state == _HWMOD_STATE_ENABLED) {
                _del_initiator_dep(oh, mpu_oh);
                /* XXX what about the other system initiators here? dma, dsp */
+               if (oh->flags & HWMOD_BLOCK_WFI)
+                       enable_hlt();
                if (soc_ops.disable_module)
                        soc_ops.disable_module(oh);
                _disable_clocks(oh);
This page took 0.026414 seconds and 5 git commands to generate.