Author: wmb
Date: 2009-10-30 08:59:49 +0100 (Fri, 30 Oct 2009)
New Revision: 1450
Modified:
cpu/x86/pc/olpc/via/usb.fth
Log:
OLPC trac 9567 - Moved "usb-quiet" from "go-hook" to "linux-hook" to
leave the USB devices active when booting other programs such as EMACS
or (eventually) NANDblaster.
Modified: cpu/x86/pc/olpc/via/usb.fth
===================================================================
--- cpu/x86/pc/olpc/via/usb.fth 2009-10-30 07:52:42 UTC (rev 1449)
+++ cpu/x86/pc/olpc/via/usb.fth 2009-10-30 07:59:49 UTC (rev 1450)
@@ -92,13 +92,13 @@
;
: usb-quiet ( -- )
- [ ' go-hook behavior compile, ] \ Chain to old behavior
+ [ ' linux-hook behavior compile, ] \ Chain to old behavior
" /usb@10,0" " reset-usb" execute-device-method drop
" /usb@10,1" " reset-usb" execute-device-method drop
" /usb@10,2" " reset-usb" execute-device-method drop
" /usb@10,4" " reset-usb" execute-device-method drop
;
-' usb-quiet to go-hook
+' usb-quiet to linux-hook
\ Turn on USB power after a delay, to ensure that USB devices are reset correctly on boot
: usb-power-off ( -- ) h# 4c acpi-l@ h# 400 invert and h# 4c acpi-l! ;
Author: wmb
Date: 2009-10-30 08:52:42 +0100 (Fri, 30 Oct 2009)
New Revision: 1449
Modified:
dev/usb2/device/storage/scsi.fth
dev/usb2/device/storage/scsidisk.fth
Log:
OLPC trac 9423 - USB mass storage driver - Made csw timeouts retryable
to work around a problem with a Kingston USB key. The problem could
be in the hardware but I was unable to solve it and the retry seems to
make the system work stably.
Modified: dev/usb2/device/storage/scsi.fth
===================================================================
--- dev/usb2/device/storage/scsi.fth 2009-10-30 07:46:16 UTC (rev 1448)
+++ dev/usb2/device/storage/scsi.fth 2009-10-30 07:52:42 UTC (rev 1449)
@@ -104,12 +104,14 @@
r> /cbw ( cbw-adr,len )
;
-: (get-csw) ( -- len usberr ) csw /csw bulk-in-pipe bulk-in ;
+: (get-csw) ( -- len usberr ) csw /csw erase csw /csw bulk-in-pipe bulk-in ;
: get-csw ( -- len usberr )
(get-csw) dup if 2drop (get-csw) then
;
-d# 15,000 constant bulk-timeout
+\ This used to be 15 seconds but I shortened it so timeouts can be
+\ retried without having to wait too long.
+d# 2,000 constant bulk-timeout
: (execute-command) ( data-adr,len dir cbw-adr,len -- actual-len cswStatus )
debug? if
@@ -136,7 +138,13 @@
rot drop ( actual csw-len csw-usberror )
- ?dup if nip exit then ( actual csw-len csw-usberror )
+ ?dup if ( actual csw-len csw-usberror )
+ nip ( actual csw-usberror )
+ dup h# 10000000 = if ( actual csw-usberror )
+ 2drop 0 2 ( 0 2 ) \ Convert timeout error to a retry
+ then ( actual usberror )
+ exit
+ then ( actual csw-len csw-usberror )
drop ( actual )
debug? if
Modified: dev/usb2/device/storage/scsidisk.fth
===================================================================
--- dev/usb2/device/storage/scsidisk.fth 2009-10-30 07:46:16 UTC (rev 1448)
+++ dev/usb2/device/storage/scsidisk.fth 2009-10-30 07:52:42 UTC (rev 1449)
@@ -213,6 +213,8 @@
read-block-extent if false exit then ( block-size #blocks )
to #blocks to block-size
+ d# 2000 set-timeout
+
init-deblocker 0= if false exit then
init-label-package 0= if
Author: wmb
Date: 2009-10-30 08:36:39 +0100 (Fri, 30 Oct 2009)
New Revision: 1446
Modified:
dev/olpc/kb3700/ecio.fth
Log:
Added new "no-kbc-reboot" command for EC in support of OLPC trac 9564.
It takes advantage of a new EC feature that lets you turn the EC back on
without a CPU reboot after shutting it off for the purpose of reprogramming
the SPI FLASH. This should only be used for the manufacturing data area,
because you want to reboot after reprogramming the CPU firmware.
Modified: dev/olpc/kb3700/ecio.fth
===================================================================
--- dev/olpc/kb3700/ecio.fth 2009-10-29 02:18:53 UTC (rev 1445)
+++ dev/olpc/kb3700/ecio.fth 2009-10-30 07:36:39 UTC (rev 1446)
@@ -288,6 +288,8 @@
true to kbc-off?
;
+: no-kbc-reboot ( -- ) 7 h# ff01 ec! ;
+
: io-spi@ ( reg# -- b ) h# fea8 + ec@ ;
: io-spi! ( b reg# -- ) h# fea8 + ec! ;
Author: rsmith
Date: 2009-10-29 03:18:53 +0100 (Thu, 29 Oct 2009)
New Revision: 1445
Modified:
cpu/x86/pc/olpc/gamekeys.fth
Log:
OLPC: Gamekey/pad display command 'check-keys'
- Same display as what happens when you hold a key on boot but can be run from
the ok prompt.
Modified: cpu/x86/pc/olpc/gamekeys.fth
===================================================================
--- cpu/x86/pc/olpc/gamekeys.fth 2009-10-28 23:56:45 UTC (rev 1444)
+++ cpu/x86/pc/olpc/gamekeys.fth 2009-10-29 02:18:53 UTC (rev 1445)
@@ -62,3 +62,15 @@
' (hold-message) to hold-message
: bypass-bios-boot? ( -- flag ) button-square game-key? ;
+
+: check-keys
+ clear-screen
+ ." Press a key to exit"
+ cursor-off
+ begin
+ 0 to game-key-mask
+ d# 100 ms key? game-key@ update-game-keys ( key? )
+ until
+ 0 7 at-xy
+ cursor-on
+;