[openfirmware] [commit] r2334 - cpu/arm/olpc
repository service
svn at openfirmware.info
Wed Jul 6 08:32:32 CEST 2011
Author: wmb
Date: Wed Jul 6 08:32:32 2011
New Revision: 2334
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2334
Log:
OLPC XO-1.75 - SP PS2 interface code - time out if command is not accepted by put-data, instead of hanging.
Modified:
cpu/arm/olpc/spcmd.fth
Modified: cpu/arm/olpc/spcmd.fth
==============================================================================
--- cpu/arm/olpc/spcmd.fth Wed Jul 6 08:31:27 2011 (r2333)
+++ cpu/arm/olpc/spcmd.fth Wed Jul 6 08:32:32 2011 (r2334)
@@ -139,8 +139,15 @@
;
: put-data ( byte -- )
- begin h# c4 reg@ 7 and 0= until
- port# bwjoin h# 40 reg!
+ get-msecs d# 100 + ( byte time-limit )
+ begin ( byte time-limit )
+ dup get-msecs - 0< if ( byte time-limit )
+ 2drop exit ( -- )
+ then ( byte time-limit )
+ h# c4 reg@ 7 and 0= ( byte time-limit flag )
+ until ( byte time-limit )
+ drop ( byte )
+ port# bwjoin h# 40 reg! ( )
;
: put-get-data ( cmd -- data | -1 ) put-data get-data ;
More information about the openfirmware
mailing list