int pm_do_bus_sleep(void) { local_irq_disable(); /* * Here is where we need some platform-dependent setup * of the interrupt state so that appropriate wakeup * sources are allowed and all others are masked. */ __power_switch_wake_setup(); __set_LEDS(0xa1); /* go zzz * * This is in a loop in case power switch shares an irq with other * devices. The wake_check() tells us if we need to finish waking * or go back to sleep. */ do { frv_cpu_suspend(HSR0_PDM_BUS_SLEEP); } while (__power_switch_wake_check && !__power_switch_wake_check()); __set_LEDS(0xa2); /* * Here is where we need some platform-dependent restore * of the interrupt state prior to being called. */ __power_switch_wake_cleanup(); local_irq_enable(); return 0; }
int pm_do_suspend(void) { local_irq_disable(); __set_LEDS(0xb1); /* go zzz */ frv_cpu_suspend(pdm_suspend_mode); __set_LEDS(0xb2); local_irq_enable(); return 0; }
int pm_do_bus_sleep(void) { local_irq_disable(); __power_switch_wake_setup(); __set_LEDS(0xa1); do { frv_cpu_suspend(HSR0_PDM_BUS_SLEEP); } while (__power_switch_wake_check && !__power_switch_wake_check()); __set_LEDS(0xa2); __power_switch_wake_cleanup(); local_irq_enable(); return 0; }