Author: quozl Date: Fri Jun 21 03:00:33 2013 New Revision: 3677 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3677
Log: OLPC - when testing /usb/hub in diag mode, fail the test if the device is removed during the probe. Reported by Chia-Hsiu. Also fix stack comments in other selftest methods.
Modified: cpu/arm/olpc/1.75/leds.fth cpu/arm/olpc/3.0/leds.fth cpu/x86/pc/olpc/via/leds.fth dev/usb2/device/hub/hub.fth dev/usb2/hcd/device.fth dev/usb2/hcd/probehub.fth
Modified: cpu/arm/olpc/1.75/leds.fth ============================================================================== --- cpu/arm/olpc/1.75/leds.fth Fri Jun 21 02:58:51 2013 (r3676) +++ cpu/arm/olpc/1.75/leds.fth Fri Jun 21 03:00:33 2013 (r3677) @@ -26,7 +26,7 @@ : hdd-led-on ( -- ) led-storage-gpio# gpio-set ; : hdd-led-toggle ( -- ) led-storage-gpio# gpio-pin@ if hdd-led-off else hdd-led-on then ;
-: selftest ( -- ) +: selftest ( -- error? ) ." Flashing LEDs" cr
d# 10 0 do ols-led-on d# 200 ms ols-led-off d# 200 ms loop @@ -38,7 +38,7 @@ d# 20 0 do hdd-led-on d# 100 ms hdd-led-off d# 100 ms loop ols-assy-mode-off
- confirm-selftest? + confirm-selftest? ( error? ) ;
end-package
Modified: cpu/arm/olpc/3.0/leds.fth ============================================================================== --- cpu/arm/olpc/3.0/leds.fth Fri Jun 21 02:58:51 2013 (r3676) +++ cpu/arm/olpc/3.0/leds.fth Fri Jun 21 03:00:33 2013 (r3677) @@ -7,7 +7,7 @@ : open ( -- okay? ) true ; : close ( -- ) ;
-: selftest ( -- ) +: selftest ( -- error? ) ." Flashing LEDs" cr
" /wlan:quiet" test-dev " /wlan:quiet" test-dev \ Twice for longer flashing
Modified: cpu/x86/pc/olpc/via/leds.fth ============================================================================== --- cpu/x86/pc/olpc/via/leds.fth Fri Jun 21 02:58:51 2013 (r3676) +++ cpu/x86/pc/olpc/via/leds.fth Fri Jun 21 03:00:33 2013 (r3677) @@ -6,7 +6,7 @@ " leds" device-name : open ( -- okay? ) true ; : close ( -- ) ; -: selftest ( -- ) +: selftest ( -- error? ) ." Flashing LEDs" cr " /wlan" test-dev " /wlan" test-dev \ Twice for longer flashing d# 20 0 do hdd-led-on d# 100 ms hdd-led-off d# 100 ms loop
Modified: dev/usb2/device/hub/hub.fth ============================================================================== --- dev/usb2/device/hub/hub.fth Fri Jun 21 02:58:51 2013 (r3676) +++ dev/usb2/device/hub/hub.fth Fri Jun 21 03:00:33 2013 (r3677) @@ -53,9 +53,11 @@ reprobe-hub-xt execute then ; -: selftest ( -- ) +: selftest ( -- error? ) ['] hub-id catch 0= if - hub-selftest-xt execute + hub-selftest-xt catch if true then + else + true then ;
Modified: dev/usb2/hcd/device.fth ============================================================================== --- dev/usb2/hcd/device.fth Fri Jun 21 02:58:51 2013 (r3676) +++ dev/usb2/hcd/device.fth Fri Jun 21 03:00:33 2013 (r3677) @@ -386,7 +386,7 @@ ; : .usb-device ( port -- ) find-port-node if - ." Can't find device node for USB port!" cr + ." Can't find device node for USB port!" cr abort else ( phandle ) dup " device_type" .phandle-property ( phandle ) ." ,"
Modified: dev/usb2/hcd/probehub.fth ============================================================================== --- dev/usb2/hcd/probehub.fth Fri Jun 21 02:58:51 2013 (r3676) +++ dev/usb2/hcd/probehub.fth Fri Jun 21 03:00:33 2013 (r3677) @@ -243,7 +243,7 @@ then ( )
\ Maybe need to reset the entire hub here - false ( false ) + false ( false ) ; : hub-selftest-xt ( -- xt ) ['] hub-selftest ;
openfirmware@openfirmware.info