Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / arm / mach-sa1100 / pm.c
index 7120ec5..786c853 100644 (file)
@@ -45,9 +45,6 @@ extern void sa1100_cpu_resume(void);
  */
 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,
 
@@ -57,7 +54,7 @@ enum {        SLEEP_SAVE_SP = 0,
 };
 
 
-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;
@@ -72,12 +69,6 @@ static int sa11x0_pm_enter(u32 state)
        gpio = GPLR;
 
        /* save vital registers */
-       SAVE(OSMR0);
-       SAVE(OSMR1);
-       SAVE(OSMR2);
-       SAVE(OSMR3);
-       SAVE(OIER);
-
        SAVE(GPDR);
        SAVE(GAFR);
 
@@ -97,6 +88,8 @@ static int sa11x0_pm_enter(u32 state)
        /* go zzz */
        sa1100_cpu_suspend();
 
+       cpu_init();
+
        /*
         * Ensure not to come back here if it wasn't intended
         */
@@ -129,15 +122,6 @@ static int sa11x0_pm_enter(u32 state)
         */
        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);
@@ -150,30 +134,12 @@ unsigned long sleep_phys_sp(void *sp)
        return virt_to_phys(sp);
 }
 
-/*
- * Called after processes are frozen, but before we shut down devices.
- */
-static int sa11x0_pm_prepare(u32 state)
-{
-       return 0;
-}
-
-/*
- * Called after devices are re-setup, but before processes are thawed.
- */
-static int sa11x0_pm_finish(u32 state)
-{
-       return 0;
-}
-
 /*
  * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
  */
 static struct pm_ops sa11x0_pm_ops = {
        .pm_disk_mode   = PM_DISK_FIRMWARE,
-       .prepare        = sa11x0_pm_prepare,
        .enter          = sa11x0_pm_enter,
-       .finish         = sa11x0_pm_finish,
 };
 
 static int __init sa11x0_pm_init(void)