summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-30 22:18:42 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-30 22:18:42 +0000
commit7d1d85c02e4d250addff3d815147c45be525025a (patch)
treeb137ef6b03626f6b66b43381ab941d3282bd4a82 /firmware
parent9f45ae4e59bda5d7330f34f7c966cad51dffbd1a (diff)
add stub for later implementation of suspend/resume
git-svn-id: https://svn.openpcd.org:2342/trunk@236 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware')
-rw-r--r--firmware/src/os/pcd_enumerate.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/firmware/src/os/pcd_enumerate.c b/firmware/src/os/pcd_enumerate.c
index 2ca8c77..5589964 100644
--- a/firmware/src/os/pcd_enumerate.c
+++ b/firmware/src/os/pcd_enumerate.c
@@ -452,12 +452,22 @@ cont_ep2:
if (isr & AT91C_UDP_RXSUSP) {
pUDP->UDP_ICR = AT91C_UDP_RXSUSP;
DEBUGI("RXSUSP ");
- /* FIXME: implement suspend/resume */
+#ifdef CONFIG_USB_SUSPEND
+ upcd.state = USB_STATE_SUSPENDED;
+ /* FIXME: implement suspend/resume correctly. This
+ * involves saving the pre-suspend state, and calling back
+ * into the main application program to ask it to power down
+ * all peripherals, switching to slow clock, ... */
+#endif
}
if (isr & AT91C_UDP_RXRSM) {
pUDP->UDP_ICR = AT91C_UDP_RXRSM;
DEBUGI("RXRSM ");
+#ifdef CONFIG_USB_SUSPEND
+ if (upcd.state == USB_STATE_SUSPENDED)
+ upcd.state = USB_STATE_CONFIGURED;
/* FIXME: implement suspend/resume */
+#endif
}
if (isr & AT91C_UDP_EXTRSM) {
pUDP->UDP_ICR = AT91C_UDP_EXTRSM;
@@ -471,7 +481,6 @@ cont_ep2:
if (isr & AT91C_UDP_WAKEUP) {
pUDP->UDP_ICR = AT91C_UDP_WAKEUP;
DEBUGI("WAKEUP ");
- /* FIXME: implement suspend/resume */
}
out:
DEBUGI("END\r\n");
personal git repositories of Harald Welte. Your mileage may vary