aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorSteven Miao <realmz6@gmail.com>2012-06-07 02:25:14 -0400
committerBob Liu <lliubbo@gmail.com>2012-07-24 01:39:50 -0400
commit6b6c37bf9d9295228b63a06b34fea91a02317bce (patch)
treec632d2314e403f2d3ceb3e8612fe6dbc35a536bf /arch/blackfin
parent923680cbee19bf7be11c3ec3ad6e5c14c4aa2194 (diff)
bf60x: pm: pass wakeup param
Pass wake up source mask and wakeup source polarity to deepsleep and hibernate. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mach-bf609/pm.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/blackfin/mach-bf609/pm.c b/arch/blackfin/mach-bf609/pm.c
index 4f6977762630..8d815e057100 100644
--- a/arch/blackfin/mach-bf609/pm.c
+++ b/arch/blackfin/mach-bf609/pm.c
@@ -182,18 +182,18 @@ void bfin_hibernate_syscontrol(void)
182asmlinkage void enter_deepsleep(void); 182asmlinkage void enter_deepsleep(void);
183 183
184__attribute__((l1_text)) 184__attribute__((l1_text))
185void bfin_deepsleep(unsigned long mask) 185void bfin_deepsleep(unsigned long mask, unsigned long pol_mask)
186{ 186{
187 bfin_write32(DPM0_WAKE_EN, 0x10); 187 bfin_write32(DPM0_WAKE_EN, mask);
188 bfin_write32(DPM0_WAKE_POL, 0x10); 188 bfin_write32(DPM0_WAKE_POL, pol_mask);
189 SSYNC(); 189 SSYNC();
190 enter_deepsleep(); 190 enter_deepsleep();
191} 191}
192 192
193void bfin_hibernate(unsigned long mask) 193void bfin_hibernate(unsigned long mask, unsigned long pol_mask)
194{ 194{
195 bfin_write32(DPM0_WAKE_EN, 0x10); 195 bfin_write32(DPM0_WAKE_EN, mask);
196 bfin_write32(DPM0_WAKE_POL, 0x10); 196 bfin_write32(DPM0_WAKE_POL, pol_mask);
197 bfin_write32(DPM0_PGCNTR, 0x0000FFFF); 197 bfin_write32(DPM0_PGCNTR, 0x0000FFFF);
198 bfin_write32(DPM0_HIB_DIS, 0xFFFF); 198 bfin_write32(DPM0_HIB_DIS, 0xFFFF);
199 199
@@ -270,9 +270,9 @@ void bf609_cpu_pm_enter(suspend_state_t state)
270 printk(KERN_DEBUG "Unable to get irq wake\n"); 270 printk(KERN_DEBUG "Unable to get irq wake\n");
271 271
272 if (state == PM_SUSPEND_STANDBY) 272 if (state == PM_SUSPEND_STANDBY)
273 bfin_deepsleep(wakeup); 273 bfin_deepsleep(wakeup, wakeup_pol);
274 else { 274 else {
275 bfin_hibernate(wakeup); 275 bfin_hibernate(wakeup, wakeup_pol);
276 } 276 }
277 277
278} 278}
@@ -294,9 +294,10 @@ static struct bfin_cpu_pm_fns bf609_cpu_pm = {
294}; 294};
295 295
296#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 296#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
297static void smc_pm_syscore_suspend(void) 297static int smc_pm_syscore_suspend(void)
298{ 298{
299 bf609_nor_flash_exit(); 299 bf609_nor_flash_exit();
300 return 0;
300} 301}
301 302
302static void smc_pm_syscore_resume(void) 303static void smc_pm_syscore_resume(void)