Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359835
b: refs/heads/master
c: db27c0c
h: refs/heads/master
i:
  359833: b548c56
  359831: b1483e9
v: v3
  • Loading branch information
Paul Walmsley committed Feb 6, 2013
1 parent 9cfd9e9 commit 6102627
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 088e8806c411f76216002a8b37c7eb8563614822
refs/heads/master: db27c0c0d05cafc0eb0bed4d58daea65ed5e6839
8 changes: 8 additions & 0 deletions trunk/arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@
#include <linux/slab.h>
#include <linux/bootmem.h>

#include <asm/system_misc.h>

#include "clock.h"
#include "omap_hwmod.h"

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/arm/mach-omap2/omap_hwmod.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,14 @@ struct omap_hwmod_omap4_prcm {
* enabled. This prevents the hwmod code from being able to
* enable and reset the IP block early. XXX Eventually it should
* be possible to query the clock framework for this information.
* HWMOD_BLOCK_WFI: Some OMAP peripherals apparently don't work
* correctly if the MPU is allowed to go idle while the
* peripherals are active. This is apparently true for the I2C on
* OMAP2420, and also the EMAC on AM3517/3505. It's unlikely that
* this is really true -- we're probably not configuring something
* correctly, or this is being abused to deal with some PM latency
* issues -- but we're currently suffering from a shortage of
* folks who are able to track these issues down properly.
*/
#define HWMOD_SWSUP_SIDLE (1 << 0)
#define HWMOD_SWSUP_MSTANDBY (1 << 1)
Expand All @@ -462,6 +470,7 @@ struct omap_hwmod_omap4_prcm {
#define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7)
#define HWMOD_16BIT_REG (1 << 8)
#define HWMOD_EXT_OPT_MAIN_CLK (1 << 9)
#define HWMOD_BLOCK_WFI (1 << 10)

/*
* omap_hwmod._int_flags definitions
Expand Down

0 comments on commit 6102627

Please sign in to comment.