]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-at91/pm.c
[ARM] 4764/1: [AT91] AT91CAP9 core support
[linux-2.6-omap-h63xx.git] / arch / arm / mach-at91 / pm.c
index ddf9184d561d2c82d4efe9e5a23ea07c6e62af35..4b120cc361359760a542eaea0825365bba5e6b33 100644 (file)
  * (at your option) any later version.
  */
 
-#include <linux/pm.h>
+#include <linux/suspend.h>
 #include <linux/sched.h>
 #include <linux/proc_fs.h>
-#include <linux/pm.h>
 #include <linux/interrupt.h>
 #include <linux/sysfs.h>
 #include <linux/module.h>
@@ -81,6 +80,11 @@ static int at91_pm_verify_clocks(void)
                        pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
                        return 0;
                }
+       } else if (cpu_is_at91cap9()) {
+               if ((scsr & AT91CAP9_PMC_UHP) != 0) {
+                       pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
+                       return 0;
+               }
        }
 
 #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
@@ -199,7 +203,7 @@ error:
 }
 
 
-static struct pm_ops at91_pm_ops ={
+static struct platform_suspend_ops at91_pm_ops ={
        .valid          = at91_pm_valid_state,
        .set_target     = at91_pm_set_target,
        .enter          = at91_pm_enter,
@@ -220,7 +224,7 @@ static int __init at91_pm_init(void)
        /* Disable SDRAM low-power mode.  Cannot be used with self-refresh. */
        at91_sys_write(AT91_SDRAMC_LPR, 0);
 
-       pm_set_ops(&at91_pm_ops);
+       suspend_set_ops(&at91_pm_ops);
 
        return 0;
 }