Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313555
b: refs/heads/master
c: 8a680ea
h: refs/heads/master
i:
  313553: 5bb1eff
  313551: 03e4e6c
v: v3
  • Loading branch information
Tero Kristo authored and Paul Walmsley committed Jun 22, 2012
1 parent 432972b commit 675d8da
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dea6200ba0a43afb90a277802c3edf0124848eed
refs/heads/master: 8a680ea2eb2e9ad602e290396add29e9eaed0911
20 changes: 19 additions & 1 deletion trunk/arch/arm/mach-omap2/prm2xxx_3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,28 @@ void omap3xxx_prm_reconfigure_io_chain(void)
omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST);
}

/**
* omap3xxx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches
*
* Activates the I/O wakeup event latches and allows events logged by
* those latches to signal a wakeup event to the PRCM. For I/O
* wakeups to occur, WAKEUPENABLE bits must be set in the pad mux
* registers, and omap3xxx_prm_reconfigure_io_chain() must be called.
* No return value.
*/
static void __init omap3xxx_prm_enable_io_wakeup(void)
{
if (omap3_has_io_wakeup())
omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
PM_WKEN);
}

static int __init omap3xxx_prcm_init(void)
{
if (cpu_is_omap34xx())
if (cpu_is_omap34xx()) {
omap3xxx_prm_enable_io_wakeup();
return omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
}
return 0;
}
subsys_initcall(omap3xxx_prcm_init);
31 changes: 19 additions & 12 deletions trunk/arch/arm/mach-omap2/prm44xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,6 @@ void omap44xx_prm_restore_irqen(u32 *saved_mask)
void omap44xx_prm_reconfigure_io_chain(void)
{
int i = 0;
u32 v;

v = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
OMAP4_PRM_IO_PMCTRL_OFFSET);

/* Enable GLOBAL_WUEN */
if (!(v & OMAP4430_GLOBAL_WUEN_MASK))
omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK,
OMAP4430_GLOBAL_WUEN_MASK,
OMAP4430_PRM_DEVICE_INST,
OMAP4_PRM_IO_PMCTRL_OFFSET);

/* Trigger WUCLKIN enable */
omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK,
Expand Down Expand Up @@ -287,10 +276,28 @@ void omap44xx_prm_reconfigure_io_chain(void)
return;
}

/**
* omap44xx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches
*
* Activates the I/O wakeup event latches and allows events logged by
* those latches to signal a wakeup event to the PRCM. For I/O wakeups
* to occur, WAKEUPENABLE bits must be set in the pad mux registers, and
* omap44xx_prm_reconfigure_io_chain() must be called. No return value.
*/
static void __init omap44xx_prm_enable_io_wakeup(void)
{
omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK,
OMAP4430_GLOBAL_WUEN_MASK,
OMAP4430_PRM_DEVICE_INST,
OMAP4_PRM_IO_PMCTRL_OFFSET);
}

static int __init omap4xxx_prcm_init(void)
{
if (cpu_is_omap44xx())
if (cpu_is_omap44xx()) {
omap44xx_prm_enable_io_wakeup();
return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup);
}
return 0;
}
subsys_initcall(omap4xxx_prcm_init);

0 comments on commit 675d8da

Please sign in to comment.