Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149336
b: refs/heads/master
c: d082d36
h: refs/heads/master
v: v3
  • Loading branch information
Mike Rapoport authored and Eric Miao committed Jun 5, 2009
1 parent 4be9586 commit 95e34fd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 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: 94c35a6b5129bc370893d74085c13607f260ef39
refs/heads/master: d082d36ea82aff6f25e8380770713e6fd0c7290a
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-pxa/include/mach/pxa27x.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
#define ARB_DMA_PARK (1<<25) /* Be parked with DMA when idle */
#define ARB_CORE_PARK (1<<24) /* Be parked with core when idle */
#define ARB_LOCK_FLAG (1<<23) /* Only Locking masters gain access to the bus */

extern int __init pxa27x_set_pwrmode(unsigned int mode);

#endif /* __MACH_PXA27x_H */
19 changes: 18 additions & 1 deletion trunk/arch/arm/mach-pxa/pxa27x.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,23 @@ static struct clk_lookup pxa27x_clkregs[] = {
#define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x
#define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x]

/*
* allow platforms to override default PWRMODE setting used for PM_SUSPEND_MEM
*/
static unsigned int pwrmode = PWRMODE_SLEEP;

int __init pxa27x_set_pwrmode(unsigned int mode)
{
switch (mode) {
case PWRMODE_SLEEP:
case PWRMODE_DEEPSLEEP:
pwrmode = mode;
return 0;
}

return -EINVAL;
}

/*
* List of global PXA peripheral registers to preserve.
* More ones like CP and general purpose register values are preserved
Expand Down Expand Up @@ -254,7 +271,7 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)
pxa_cpu_standby();
break;
case PM_SUSPEND_MEM:
pxa27x_cpu_suspend(PWRMODE_SLEEP);
pxa27x_cpu_suspend(pwrmode);
break;
}
}
Expand Down

0 comments on commit 95e34fd

Please sign in to comment.