]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-at91/pm.c
[ARM] 4419/1: AT91: SAM9 USB clocks check for suspending
[linux-2.6-omap-h63xx.git] / arch / arm / mach-at91 / pm.c
index ff8db29e989e2f39c420a9de219f63b435ace081..47ff676aca5f07e8155a4380a5f9da99f05546a5 100644 (file)
@@ -76,12 +76,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_at91sam9260()) {
-#warning "Check SAM9260 USB clocks"
-       } else if (cpu_is_at91sam9261()) {
-#warning "Check SAM9261 USB clocks"
-       } else if (cpu_is_at91sam9263()) {
-#warning "Check SAM9263 USB clocks"
+       } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263()) {
+               if ((scsr & (AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP)) != 0) {
+                       pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
+                       return 0;
+               }
        }
 
 #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS