Author: wmb Date: Thu Feb 3 07:57:03 2011 New Revision: 2164 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2164
Log: USB - fixed OHCI breakage from recent probing rewrite.
Modified: dev/usb2/hcd/ohci/ohci.fth dev/usb2/hcd/ohci/probe.fth
Modified: dev/usb2/hcd/ohci/ohci.fth ============================================================================== --- dev/usb2/hcd/ohci/ohci.fth Thu Feb 3 02:00:58 2011 (r2163) +++ dev/usb2/hcd/ohci/ohci.fth Thu Feb 3 07:57:03 2011 (r2164) @@ -58,6 +58,19 @@ : hc-cntl-clr ( bit-mask -- ) hc-cntl@ swap invert and hc-cntl! ; : hc-cntl-set ( bit-mask -- ) hc-cntl@ swap or hc-cntl! ;
+: reset-port ( port -- ) + >r + h# 1.0002 r@ hc-rh-psta! \ enable port + h# 10 r@ hc-rh-psta! \ reset port + r@ d# 10 0 do + d# 10 ms + dup hc-rh-psta@ 10.0000 and ?leave + loop drop + r@ hc-rh-psta@ 10.0000 and 0= if abort then + h# 1f.0000 r> hc-rh-psta! \ clear status change bits + d# 256 ms +; + : reset-usb ( -- ) ohci-reg dup 0= if map-regs then 1 hc-rh-stat! \ power-off root hub @@ -65,6 +78,7 @@ d# 10 ms 0= if unmap-regs then ; + : init-ohci-regs ( -- ) hcca-phys hc-hcca! \ physical address of hcca
Modified: dev/usb2/hcd/ohci/probe.fth ============================================================================== --- dev/usb2/hcd/ohci/probe.fth Thu Feb 3 02:00:58 2011 (r2163) +++ dev/usb2/hcd/ohci/probe.fth Thu Feb 3 07:57:03 2011 (r2164) @@ -4,19 +4,6 @@ hex headers
-: reset-port ( port -- ) - >r - h# 1.0002 r@ hc-rh-psta! \ enable port - 10 r@ hc-rh-psta! \ reset port - r@ d# 10 0 do - d# 10 ms - dup hc-rh-psta@ 10.0000 and ?leave - loop drop - r@ hc-rh-psta@ 10.0000 and 0= if abort then - h# 1f.0000 r> hc-rh-psta! \ clear status change bits - 100 ms -; - : probe-root-hub-port ( port -- ) dup hc-rh-psta@ 1 and 0= if drop exit then ( port ) \ No device connected
openfirmware@openfirmware.info