diff options
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm24xx.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap2/sleep24xx.S | 19 |
3 files changed, 12 insertions, 26 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 8bb2628df34e..ac7e03ec952f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -3493,7 +3493,12 @@ static struct omap_hwmod am35xx_emac_hwmod = { | |||
3493 | .name = "davinci_emac", | 3493 | .name = "davinci_emac", |
3494 | .mpu_irqs = am35xx_emac_mpu_irqs, | 3494 | .mpu_irqs = am35xx_emac_mpu_irqs, |
3495 | .class = &am35xx_emac_class, | 3495 | .class = &am35xx_emac_class, |
3496 | .flags = HWMOD_NO_IDLEST, | 3496 | /* |
3497 | * According to Mark Greer, the MPU will not return from WFI | ||
3498 | * when the EMAC signals an interrupt. | ||
3499 | * http://www.spinics.net/lists/arm-kernel/msg174734.html | ||
3500 | */ | ||
3501 | .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI), | ||
3497 | }; | 3502 | }; |
3498 | 3503 | ||
3499 | /* l3_core -> davinci emac interface */ | 3504 | /* l3_core -> davinci emac interface */ |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index b2a4df623545..b59d93908341 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -54,7 +54,6 @@ | |||
54 | #include "powerdomain.h" | 54 | #include "powerdomain.h" |
55 | #include "clockdomain.h" | 55 | #include "clockdomain.h" |
56 | 56 | ||
57 | static void (*omap2_sram_idle)(void); | ||
58 | static void (*omap2_sram_suspend)(u32 dllctrl, void __iomem *sdrc_dlla_ctrl, | 57 | static void (*omap2_sram_suspend)(u32 dllctrl, void __iomem *sdrc_dlla_ctrl, |
59 | void __iomem *sdrc_power); | 58 | void __iomem *sdrc_power); |
60 | 59 | ||
@@ -163,6 +162,8 @@ static int omap2_allow_mpu_retention(void) | |||
163 | 162 | ||
164 | static void omap2_enter_mpu_retention(void) | 163 | static void omap2_enter_mpu_retention(void) |
165 | { | 164 | { |
165 | const int zero = 0; | ||
166 | |||
166 | /* The peripherals seem not to be able to wake up the MPU when | 167 | /* The peripherals seem not to be able to wake up the MPU when |
167 | * it is in retention mode. */ | 168 | * it is in retention mode. */ |
168 | if (omap2_allow_mpu_retention()) { | 169 | if (omap2_allow_mpu_retention()) { |
@@ -179,7 +180,8 @@ static void omap2_enter_mpu_retention(void) | |||
179 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); | 180 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); |
180 | } | 181 | } |
181 | 182 | ||
182 | omap2_sram_idle(); | 183 | /* WFI */ |
184 | asm("mcr p15, 0, %0, c7, c0, 4" : : "r" (zero) : "memory", "cc"); | ||
183 | 185 | ||
184 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); | 186 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); |
185 | } | 187 | } |
@@ -333,11 +335,9 @@ int __init omap2_pm_init(void) | |||
333 | /* | 335 | /* |
334 | * We copy the assembler sleep/wakeup routines to SRAM. | 336 | * We copy the assembler sleep/wakeup routines to SRAM. |
335 | * These routines need to be in SRAM as that's the only | 337 | * These routines need to be in SRAM as that's the only |
336 | * memory the MPU can see when it wakes up. | 338 | * memory the MPU can see when it wakes up after the entire |
339 | * chip enters idle. | ||
337 | */ | 340 | */ |
338 | omap2_sram_idle = omap_sram_push(omap24xx_idle_loop_suspend, | ||
339 | omap24xx_idle_loop_suspend_sz); | ||
340 | |||
341 | omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend, | 341 | omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend, |
342 | omap24xx_cpu_suspend_sz); | 342 | omap24xx_cpu_suspend_sz); |
343 | 343 | ||
diff --git a/arch/arm/mach-omap2/sleep24xx.S b/arch/arm/mach-omap2/sleep24xx.S index ce0ccd26efbd..1d3cb25c9629 100644 --- a/arch/arm/mach-omap2/sleep24xx.S +++ b/arch/arm/mach-omap2/sleep24xx.S | |||
@@ -37,25 +37,6 @@ | |||
37 | .text | 37 | .text |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * Forces OMAP into idle state | ||
41 | * | ||
42 | * omap24xx_idle_loop_suspend() - This bit of code just executes the WFI | ||
43 | * for normal idles. | ||
44 | * | ||
45 | * Note: This code get's copied to internal SRAM at boot. When the OMAP | ||
46 | * wakes up it continues execution at the point it went to sleep. | ||
47 | */ | ||
48 | .align 3 | ||
49 | ENTRY(omap24xx_idle_loop_suspend) | ||
50 | stmfd sp!, {r0, lr} @ save registers on stack | ||
51 | mov r0, #0 @ clear for mcr setup | ||
52 | mcr p15, 0, r0, c7, c0, 4 @ wait for interrupt | ||
53 | ldmfd sp!, {r0, pc} @ restore regs and return | ||
54 | |||
55 | ENTRY(omap24xx_idle_loop_suspend_sz) | ||
56 | .word . - omap24xx_idle_loop_suspend | ||
57 | |||
58 | /* | ||
59 | * omap24xx_cpu_suspend() - Forces OMAP into deep sleep state by completing | 40 | * omap24xx_cpu_suspend() - Forces OMAP into deep sleep state by completing |
60 | * SDRC shutdown then ARM shutdown. Upon wake MPU is back on so just restore | 41 | * SDRC shutdown then ARM shutdown. Upon wake MPU is back on so just restore |
61 | * SDRC. | 42 | * SDRC. |