Pull cpuidle into release branch
[pandora-kernel.git] / arch / arm / plat-s3c24xx / pm.c
index ecf68d6..4fdb311 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/hardware.h>
 #include <asm/io.h>
 
-#include <asm/arch/regs-serial.h>
+#include <asm/plat-s3c/regs-serial.h>
 #include <asm/arch/regs-clock.h>
 #include <asm/arch/regs-gpio.h>
 #include <asm/arch/regs-mem.h>
@@ -511,11 +511,6 @@ static int s3c2410_pm_enter(suspend_state_t state)
                return -EINVAL;
        }
 
-       if (state != PM_SUSPEND_MEM) {
-               printk(KERN_ERR PFX "error: only PM_SUSPEND_MEM supported\n");
-               return -EINVAL;
-       }
-
        /* check if we have anything to wake-up with... bad things seem
         * to happen if you suspend with no wakeup (system will often
         * require a full power-cycle)
@@ -560,7 +555,7 @@ static int s3c2410_pm_enter(suspend_state_t state)
        __raw_writel(__raw_readl(S3C2410_INTPND), S3C2410_INTPND);
        __raw_writel(__raw_readl(S3C2410_SRCPND), S3C2410_SRCPND);
 
-       /* call cpu specific preperation */
+       /* call cpu specific preparation */
 
        pm_cpu_prep();
 
@@ -617,30 +612,9 @@ static int s3c2410_pm_enter(suspend_state_t state)
        return 0;
 }
 
-/*
- * Called after processes are frozen, but before we shut down devices.
- */
-static int s3c2410_pm_prepare(suspend_state_t state)
-{
-       return 0;
-}
-
-/*
- * Called after devices are re-setup, but before processes are thawed.
- */
-static int s3c2410_pm_finish(suspend_state_t state)
-{
-       return 0;
-}
-
-/*
- * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
- */
-static struct pm_ops s3c2410_pm_ops = {
-       .pm_disk_mode   = PM_DISK_FIRMWARE,
-       .prepare        = s3c2410_pm_prepare,
+static struct platform_suspend_ops s3c2410_pm_ops = {
        .enter          = s3c2410_pm_enter,
-       .finish         = s3c2410_pm_finish,
+       .valid          = suspend_valid_only_mem,
 };
 
 /* s3c2410_pm_init
@@ -654,6 +628,6 @@ int __init s3c2410_pm_init(void)
 {
        printk("S3C2410 Power Management, (c) 2004 Simtec Electronics\n");
 
-       pm_set_ops(&s3c2410_pm_ops);
+       suspend_set_ops(&s3c2410_pm_ops);
        return 0;
 }