Skip to content

Commit

Permalink
Merge tag 'omap-devel-b-for-3.9' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/pjw/omap-pending into omap-for-v3.9/pm-wfi-take2

On OMAP2+ devices, standardize and clean up WFI entry and WFI blocking.

Basic test logs are available here:

   http://www.pwsan.com/omap/testlogs/wfi_devel_a_3.9/20130208085027/

Conflicts:
	arch/arm/mach-omap2/pm24xx.c
  • Loading branch information
Tony Lindgren committed Feb 11, 2013
2 parents 8d61d7f + 814a18a commit 58a656b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
7 changes: 6 additions & 1 deletion arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3493,7 +3493,12 @@ static struct omap_hwmod am35xx_emac_hwmod = {
.name = "davinci_emac",
.mpu_irqs = am35xx_emac_mpu_irqs,
.class = &am35xx_emac_class,
.flags = HWMOD_NO_IDLEST,
/*
* According to Mark Greer, the MPU will not return from WFI
* when the EMAC signals an interrupt.
* http://www.spinics.net/lists/arm-kernel/msg174734.html
*/
.flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
};

/* l3_core -> davinci emac interface */
Expand Down
12 changes: 6 additions & 6 deletions arch/arm/mach-omap2/pm24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
#include "powerdomain.h"
#include "clockdomain.h"

static void (*omap2_sram_idle)(void);
static void (*omap2_sram_suspend)(u32 dllctrl, void __iomem *sdrc_dlla_ctrl,
void __iomem *sdrc_power);

Expand Down Expand Up @@ -163,6 +162,8 @@ static int omap2_allow_mpu_retention(void)

static void omap2_enter_mpu_retention(void)
{
const int zero = 0;

/* The peripherals seem not to be able to wake up the MPU when
* it is in retention mode. */
if (omap2_allow_mpu_retention()) {
Expand All @@ -179,7 +180,8 @@ static void omap2_enter_mpu_retention(void)
pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON);
}

omap2_sram_idle();
/* WFI */
asm("mcr p15, 0, %0, c7, c0, 4" : : "r" (zero) : "memory", "cc");

pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON);
}
Expand Down Expand Up @@ -333,11 +335,9 @@ int __init omap2_pm_init(void)
/*
* We copy the assembler sleep/wakeup routines to SRAM.
* These routines need to be in SRAM as that's the only
* memory the MPU can see when it wakes up.
* memory the MPU can see when it wakes up after the entire
* chip enters idle.
*/
omap2_sram_idle = omap_sram_push(omap24xx_idle_loop_suspend,
omap24xx_idle_loop_suspend_sz);

omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend,
omap24xx_cpu_suspend_sz);

Expand Down
19 changes: 0 additions & 19 deletions arch/arm/mach-omap2/sleep24xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,6 @@

.text

/*
* Forces OMAP into idle state
*
* omap24xx_idle_loop_suspend() - This bit of code just executes the WFI
* for normal idles.
*
* Note: This code get's copied to internal SRAM at boot. When the OMAP
* wakes up it continues execution at the point it went to sleep.
*/
.align 3
ENTRY(omap24xx_idle_loop_suspend)
stmfd sp!, {r0, lr} @ save registers on stack
mov r0, #0 @ clear for mcr setup
mcr p15, 0, r0, c7, c0, 4 @ wait for interrupt
ldmfd sp!, {r0, pc} @ restore regs and return

ENTRY(omap24xx_idle_loop_suspend_sz)
.word . - omap24xx_idle_loop_suspend

/*
* omap24xx_cpu_suspend() - Forces OMAP into deep sleep state by completing
* SDRC shutdown then ARM shutdown. Upon wake MPU is back on so just restore
Expand Down

0 comments on commit 58a656b

Please sign in to comment.