Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217328
b: refs/heads/master
c: a2a571b
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Ferre committed Oct 26, 2010
1 parent cfb637a commit 1343b38
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 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: 8aeeda822fbfe7da2d4ea391a9757e9532796598
refs/heads/master: a2a571b74a3881963d8d09deb272d13afe5b49e3
9 changes: 7 additions & 2 deletions trunk/arch/arm/mach-at91/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,13 @@ static int at91_pm_enter(suspend_state_t state)
* For ARM 926 based chips, this requirement is weaker
* as at91sam9 can access a RAM in self-refresh mode.
*/
asm("b 1f; .align 5; 1:");
asm("mcr p15, 0, r0, c7, c10, 4"); /* drain write buffer */
asm volatile ( "mov r0, #0\n\t"
"b 1f\n\t"
".align 5\n\t"
"1: mcr p15, 0, r0, c7, c10, 4\n\t"
: /* no output */
: /* no input */
: "r0");
saved_lpr = sdram_selfrefresh_enable();
wait_for_interrupt_enable();
sdram_selfrefresh_disable(saved_lpr);
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-at91/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ static inline u32 sdram_selfrefresh_enable(void)
}

#define sdram_selfrefresh_disable(saved_lpr) at91_sys_write(AT91_SDRAMC_LPR, saved_lpr)
#define wait_for_interrupt_enable() asm("mcr p15, 0, r0, c7, c0, 4")
#define wait_for_interrupt_enable() asm volatile ("mcr p15, 0, %0, c7, c0, 4" \
: : "r" (0))

#elif defined(CONFIG_ARCH_AT91CAP9)
#include <mach/at91cap9_ddrsdr.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-at91/pm_slowclock.S
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ ENTRY(at91_slow_clock)
ldr r5, .at91_va_base_ramc1

/* Drain write buffer */
mov r0, #0
mcr p15, 0, r0, c7, c10, 4

#ifdef CONFIG_ARCH_AT91RM9200
Expand Down

0 comments on commit 1343b38

Please sign in to comment.