Author: quozl Date: Mon May 21 10:59:18 2012 New Revision: 2983 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2983
Log: OLPC XO-1.75 - avoid Data Abort during preparation for Linux kernel load when a PL2303 USB serial adapter is present, by removing the device from the console multiplexor and closing it. #11871.
Modified: cpu/arm/olpc/1.75/usb.fth
Modified: cpu/arm/olpc/1.75/usb.fth ============================================================================== --- cpu/arm/olpc/1.75/usb.fth Fri May 18 08:06:49 2012 (r2982) +++ cpu/arm/olpc/1.75/usb.fth Mon May 21 10:59:18 2012 (r2983) @@ -96,6 +96,7 @@ alias p2 probe-usb
0 value usb-keyboard-ih +0 value usb-serial-ih
: attach-usb-keyboard ( -- ) " usb-keyboard" expand-alias if ( devspec$ ) @@ -117,19 +118,34 @@ then ;
-: ?usb-keyboard ( -- ) - attach-usb-keyboard +: attach-usb-serial ( -- ) " /usb/serial" open-dev ?dup if - add-input + to usb-serial-ih + usb-serial-ih add-input + then +; + +: detach-usb-serial ( -- ) + usb-serial-ih if + usb-serial-ih remove-input + usb-serial-ih close-dev + 0 to usb-serial-ih then ;
+: ?usb-keyboard ( -- ) + attach-usb-keyboard + attach-usb-serial +; + : usb-quiet ( -- ) detach-usb-keyboard + detach-usb-serial " /usb" " reset-usb" execute-device-method drop ;
: suspend-usb ( -- ) + detach-usb-serial detach-usb-keyboard " /usb" " sleep" execute-device-method drop ; @@ -145,6 +161,7 @@ then silent-probe-usb attach-usb-keyboard + attach-usb-serial ;
\ Unlink every node whose phys.hi component matches port
openfirmware@openfirmware.info