[openfirmware] r1700 - cpu/x86/pc/olpc/via
svn at openfirmware.info
svn at openfirmware.info
Tue Jan 26 04:15:33 CET 2010
Author: wmb
Date: 2010-01-26 04:15:32 +0100 (Tue, 26 Jan 2010)
New Revision: 1700
Modified:
cpu/x86/pc/olpc/via/usb.fth
Log:
OLPC trac 10003 - added extra delay on S3 resume when USB devices are attached.
Modified: cpu/x86/pc/olpc/via/usb.fth
===================================================================
--- cpu/x86/pc/olpc/via/usb.fth 2010-01-25 09:40:13 UTC (rev 1699)
+++ cpu/x86/pc/olpc/via/usb.fth 2010-01-26 03:15:32 UTC (rev 1700)
@@ -92,8 +92,20 @@
: suspend-usb ( -- )
detach-usb-keyboard
;
+: has-children? ( devspec$ -- flag )
+ locate-device if false else child 0<> then
+;
+: any-usb-devices? ( -- flag )
+ " /usb" has-children? if true exit then
+ " /usb at 10,2" has-children? if true exit then
+ " /usb at 10,1" has-children? if true exit then
+ " /usb at 10,0" has-children? if true exit then
+ false
+;
: resume-usb ( -- )
- d# 300 ms \ USB misses devices if you probe too soon
+ any-usb-devices? if
+ d# 2000 ms \ USB misses devices if you probe too soon
+ then
silent-probe-usb
attach-usb-keyboard
;
More information about the openfirmware
mailing list