Author: quozl Date: Sat Nov 17 00:23:04 2012 New Revision: 3439 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3439
Log: OLPC XO-4 - fix second open of touchscreen device, was caused by timing change that broke test-response, review and reword all aborts, guard the calls in selftest to prevent "No selftest method for /touchscreen", and avoid a second version check during boot
Modified: cpu/arm/olpc/nn-touchscreen.fth cpu/arm/olpc/nnflash.fth
Modified: cpu/arm/olpc/nn-touchscreen.fth ============================================================================== --- cpu/arm/olpc/nn-touchscreen.fth Fri Nov 16 09:27:02 2012 (r3438) +++ cpu/arm/olpc/nn-touchscreen.fth Sat Nov 17 00:23:04 2012 (r3439) @@ -116,13 +116,13 @@ : read-boot-complete ( -- ) 0 pbuf 2+ c! h# 07 d# 0 anticipate - pbuf 2+ c@ h# 07 <> abort" bad response" + pbuf 2+ c@ h# 07 <> abort" response other than boot complete" pbuf 3 + c@ h# e0 = abort" missing IR PCB" ;
: read-version h# 1e h# 01 h# ee 3 bytes-out h# 1e d# 100 anticipate - pbuf 2+ c@ h# 1e <> abort" bad response" + pbuf 2+ c@ h# 1e <> abort" response other than status" pbuf 9 + le-w@ pbuf 7 + le-w@ wljoin pbuf 5 + le-w@ pbuf 3 + le-w@ wljoin to version# ; @@ -223,9 +223,9 @@ 6 0 do h# 40 h# 0 h# 0f 3 h# ee 5 bytes-out \ fss full level 0 pbuf 2+ c! - h# 0f d# 30 anticipate - pbuf 2+ c@ dup 0= abort" no response to fss" - h# 0f <> abort" bad response to fss" + h# 0f d# 130 anticipate + pbuf 2+ c@ dup 0= abort" missing response after fixed signal strength" + h# 0f <> abort" response other than fixed signal strength" loop ;
@@ -383,7 +383,7 @@ : test-os-axis ( axis -- ) h# 21 h# 02 h# ee 4 bytes-out h# 21 d# 30 anticipate - pbuf 2+ c@ h# 21 <> abort" bad response" + pbuf 2+ c@ h# 21 <> abort" response other than open short"
pbuf d# 5 + ( addr )
@@ -443,7 +443,7 @@ : test-fss-axis ( axis -- ) d# 64 swap h# 0f h# 03 h# ee 5 bytes-out h# 0f d# 20 anticipate - pbuf 2+ c@ h# 0f <> abort" bad response" + pbuf 2+ c@ h# 0f <> abort" response other than fixed signal strength" 8sp push-decimal pbuf 4 + c@ 0 do ( ) @@ -578,7 +578,7 @@ : test-ls-axis ( axis -- ) h# 0d h# 02 h# ee 4 bytes-out h# 0d d# 200 anticipate - pbuf 2+ c@ h# 0d <> abort" bad response" + pbuf 2+ c@ h# 0d <> abort" response other than low signals"
8sp pbuf 5 + ( addr ) @@ -1038,7 +1038,8 @@
\ MB FINAL \ MB SHIP - open 0= if + ['] open catch ?dup if + .error ." No touchscreen present" cr false exit then
@@ -1051,9 +1052,9 @@ faults if close true exit then then
- test-response + ['] test-response guarded test-station 6 = if d# 86400.000 to test-timeout then - scribble + ['] scribble guarded
close false ;
Modified: cpu/arm/olpc/nnflash.fth ============================================================================== --- cpu/arm/olpc/nnflash.fth Fri Nov 16 09:27:02 2012 (r3438) +++ cpu/arm/olpc/nnflash.fth Sat Nov 17 00:23:04 2012 (r3439) @@ -44,11 +44,7 @@ : flash-nn! ( "filename" -- ) safe-parse-word reflash-nn ;
: update-nn-flash ( -- ) - nn-image$ 2dup nn-up-to-date? if - 2drop - else - reflash-nn - then + nn-image$ reflash-nn ;
: update-nn-flash? ( -- flag )
openfirmware@openfirmware.info