summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2007-05-31 09:34:53 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-06-02 21:31:48 +0100
commitb6b27ae5e85fb193c08448157943b187958b8ca2 (patch)
tree829fc6f5896c2b1e3f199bff3eac2927146b2346 /arch
parent1f4b49a4293ea7b0adeaeae37207b9c9fd2dd7c2 (diff)
[ARM] 4419/1: AT91: SAM9 USB clocks check for suspending
When suspending to slow-clock mode, at91_pm_verify_clocks() is called to ensure that all the clocks are disabled or in the correct state. This patch replaces the "#warning TODO" messages for the SAM9 processors with the correct code. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/pm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index ff8db29e989..47ff676aca5 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -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