[OpenBIOS] r420 - cpu/x86/pc/olpc dev/usb2/hcd dev/usb2/hcd/ehci
svn at openbios.org
svn at openbios.org
Thu May 24 04:26:08 CEST 2007
Author: wmb
Date: 2007-05-24 04:26:08 +0200 (Thu, 24 May 2007)
New Revision: 420
Modified:
cpu/x86/pc/olpc/usb.fth
dev/usb2/hcd/control.fth
dev/usb2/hcd/ehci/probe.fth
Log:
USB - added a configurable delay to the probe process as a workaround for OLPC trac 1473:
ok setenv usb-delay 3000 \ 3000 milliseconds, i.e. 3 seconds
ok probe-usb
Modified: cpu/x86/pc/olpc/usb.fth
===================================================================
--- cpu/x86/pc/olpc/usb.fth 2007-05-24 02:19:40 UTC (rev 419)
+++ cpu/x86/pc/olpc/usb.fth 2007-05-24 02:26:08 UTC (rev 420)
@@ -1,6 +1,8 @@
purpose: USB elaborations for the OLPC platform
\ See license at end of file
+0 config-int usb-delay \ Milliseconds to wait before set-address
+
devalias usb1 /usb at f,4
devalias usb2 /usb at f,5
devalias u /usb/disk
Modified: dev/usb2/hcd/control.fth
===================================================================
--- dev/usb2/hcd/control.fth 2007-05-24 02:19:40 UTC (rev 419)
+++ dev/usb2/hcd/control.fth 2007-05-24 02:26:08 UTC (rev 420)
@@ -46,6 +46,8 @@
headers
: set-address ( dev -- usberr )
+ " usb-delay" ['] eval catch if 2drop else ms then
+
\ To get the right characteristics for dev in control-set, then normal
\ set-my-dev is nooped. We set my-dev and my-real-dev here instead.
['] set-my-dev behavior swap ( xt dev ) \ Save set-my-dev
Modified: dev/usb2/hcd/ehci/probe.fth
===================================================================
--- dev/usb2/hcd/ehci/probe.fth 2007-05-24 02:19:40 UTC (rev 419)
+++ dev/usb2/hcd/ehci/probe.fth 2007-05-24 02:26:08 UTC (rev 420)
@@ -4,15 +4,6 @@
hex
headers
-: retry-set-address ( dev -- error? )
- d# 200 ms
- d# 5 0 do
- dup set-address 0= if drop false unloop exit then
- d# 1000
- loop
- drop true
-;
-
: make-root-hub-node ( port -- )
ok-to-add-device? 0= if drop exit then \ Can't add another device
@@ -21,9 +12,7 @@
0 set-target ( port dev ) \ Address it as device 0
- dup retry-set-address if 2drop exit then ( port dev ) \ Assign it usb addr dev
-\ d# 4000 ms
-\ dup set-address if 2drop exit then ( port dev ) \ Assign it usb addr dev
+ dup set-address if 2drop exit then ( port dev ) \ Assign it usb addr dev
dup set-target ( port dev ) \ Address it as device dev
make-device-node ( )
More information about the OpenBIOS
mailing list