Author: wmb Date: 2009-08-06 02:13:06 +0200 (Thu, 06 Aug 2009) New Revision: 1280
Modified: cpu/x86/pc/olpc/via/fsupdate.fth dev/ide/idedisk.fth dev/mmc/sdhci/sdhci.fth Log: Enabled asynchronous writes for fs-update.
Modified: cpu/x86/pc/olpc/via/fsupdate.fth =================================================================== --- cpu/x86/pc/olpc/via/fsupdate.fth 2009-08-05 20:43:52 UTC (rev 1279) +++ cpu/x86/pc/olpc/via/fsupdate.fth 2009-08-06 00:13:06 UTC (rev 1280) @@ -105,7 +105,7 @@
: zblocks-end: ( -- ) \ Asynchronous writes -\ " write-blocks-finish" $call-nand drop + " write-blocks-finish" $call-nand drop #image-eblocks erase-gap ;
@@ -176,20 +176,20 @@
r> get-zdata ( eblock# hashname$ hash$ )
- check-hash? if + check-hash? if ( eblock# hashname$ hash$ ) check-hash ( eblock# ) - else + else ( eblock# hashname$ hash$ ) 2drop 2drop ( eblock# ) then
( eblock# ) \ Asynchronous writes -\ data-buffer over nand-pages/block * nand-pages/block " write-blocks-start" $call-nand - data-buffer over nand-pages/block * nand-pages/block " write-blocks" $call-nand - swap-buffers + data-buffer over nand-pages/block * nand-pages/block " write-blocks-start" $call-nand ( eblock# ) +\ data-buffer over nand-pages/block * nand-pages/block " write-blocks" $call-nand drop ( eblock# ) + swap-buffers ( eblock# )
- dup to last-eblock# ( eblock# ) - show-written ( ) + dup to last-eblock# ( eblock# ) + show-written ( ) ;
previous definitions @@ -205,7 +205,7 @@ over file ! linefeed line-delimiter c! ( fd fd' ) file ! ( fd )
- + t( also nand-commands ['] include-file catch dup if nip .error @@ -213,6 +213,7 @@ previous show-done close-nand-ihs + )t-hms ;
: do-fs-update ( img$ -- )
Modified: dev/ide/idedisk.fth =================================================================== --- dev/ide/idedisk.fth 2009-08-05 20:43:52 UTC (rev 1279) +++ dev/ide/idedisk.fth 2009-08-06 00:13:06 UTC (rev 1280) @@ -63,6 +63,14 @@ : read-blocks ( addr block# #blocks -- #read ) " read-blocks" $call-parent ; : write-blocks ( addr block# #blocks -- #written ) " write-blocks" $call-parent ;
+\ Stub implementation of asynchronous write interface +0 instance value #written +: write-blocks-start ( addr block# #blocks -- ) + " write-blocks" $call-parent to #written +; +: write-blocks-finish ( -- #written ) #written ; + + \ Methods used by external clients
: open ( -- flag )
Modified: dev/mmc/sdhci/sdhci.fth =================================================================== --- dev/mmc/sdhci/sdhci.fth 2009-08-05 20:43:52 UTC (rev 1279) +++ dev/mmc/sdhci/sdhci.fth 2009-08-06 00:13:06 UTC (rev 1280) @@ -824,8 +824,9 @@ address-shift lshift r> if read-multiple else - write-multiple true to writing? true to dma? + write-multiple true to writing? then + true to dma? ;
: r/w-blocks ( addr block# #blocks in? -- actual )
openfirmware@openfirmware.info