]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-omap2/omap_hwmod.c
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[karo-tx-linux.git] / arch / arm / mach-omap2 / omap_hwmod.c
index 6e70707cbb3454434d42bf952bf63c26d4b1b1c4..a8984989dec842098442ecb2a6e42833224ecf0f 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);