[openfirmware] [commit] r3495 - cpu/arm/olpc

repository service svn at openfirmware.info
Fri Dec 14 08:25:27 CET 2012


Author: quozl
Date: Fri Dec 14 08:25:26 2012
New Revision: 3495
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3495

Log:
OLPC XO-4 - avoid automatic reflash on every boot if IR PCB is missing #12396, properly close the device in tests to allow tests to be repeated #12395

Modified:
   cpu/arm/olpc/nn-touchscreen.fth

Modified: cpu/arm/olpc/nn-touchscreen.fth
==============================================================================
--- cpu/arm/olpc/nn-touchscreen.fth	Thu Dec 13 18:25:07 2012	(r3494)
+++ cpu/arm/olpc/nn-touchscreen.fth	Fri Dec 14 08:25:26 2012	(r3495)
@@ -109,16 +109,23 @@
    2drop                                ( )
 ;
 
-: flush-input  ( -- )
-   0 0 anticipate
+: ?missing
+   pbuf 3 + c@  h# e0 = abort" missing IR PCB"
 ;
 
+: flush-input  ( -- )
+   begin
+      0 0 anticipate
+      pbuf 2+ c@  h# 07 =  if  ?missing  then
+      no-data?
+   until
+;
 
 : read-boot-complete  ( -- )
    0 pbuf 2+ c!
    h# 07 d# 0 anticipate
    pbuf 2+ c@ h# 07 <> abort" response other than boot complete"
-   pbuf 3 + c@  h# e0 = abort" missing IR PCB"
+   ?missing
 ;
 
 : read-version
@@ -1001,11 +1008,13 @@
 : lg-tooling  ( -- error? )
    open  if  test-os  test-fll  else  fault  then
    faults
+   close
 ;
 
 : ir-pcb-smt  ( -- error? )
    hold-reset  connect
    open  if  test-os  else  fault  then
+   close
    hold-reset  disconnect
    faults
 ;
@@ -1018,6 +1027,7 @@
    else
       fault
    then
+   close
    hold-reset  disconnect
    faults
 ;
@@ -1032,6 +1042,7 @@
 : mb-assy  ( -- error? )
    open  0=  if true exit  then
    test-adjacent-axes
+   close
    faults
 ;
 



More information about the openfirmware mailing list