*/
enum { SLEEP_SAVE_SP = 0,
- SLEEP_SAVE_OIER,
- SLEEP_SAVE_OSMR0, SLEEP_SAVE_OSMR1, SLEEP_SAVE_OSMR2, SLEEP_SAVE_OSMR3,
-
SLEEP_SAVE_GPDR, SLEEP_SAVE_GAFR,
SLEEP_SAVE_PPDR, SLEEP_SAVE_PPSR, SLEEP_SAVE_PPAR, SLEEP_SAVE_PSDR,
};
-static int sa11x0_pm_enter(u32 state)
+static int sa11x0_pm_enter(suspend_state_t state)
{
unsigned long gpio, sleep_save[SLEEP_SAVE_SIZE];
struct timespec delta, rtc;
gpio = GPLR;
/* save vital registers */
- SAVE(OSMR0);
- SAVE(OSMR1);
- SAVE(OSMR2);
- SAVE(OSMR3);
- SAVE(OIER);
-
SAVE(GPDR);
SAVE(GAFR);
*/
PSSR = PSSR_PH;
- RESTORE(OSMR0);
- RESTORE(OSMR1);
- RESTORE(OSMR2);
- RESTORE(OSMR3);
- RESTORE(OIER);
-
- /* OSMR0 is the system timer: make sure OSCR is sufficiently behind */
- OSCR = OSMR0 - LATCH;
-
/* restore current time */
rtc.tv_sec = RCNR;
restore_time_delta(&delta, &rtc);
/*
* Called after processes are frozen, but before we shut down devices.
*/
-static int sa11x0_pm_prepare(u32 state)
+static int sa11x0_pm_prepare(suspend_state_t state)
{
return 0;
}
/*
* Called after devices are re-setup, but before processes are thawed.
*/
-static int sa11x0_pm_finish(u32 state)
+static int sa11x0_pm_finish(suspend_state_t state)
{
return 0;
}