[openfirmware] r842 - dev/olpc/cafenand
svn at openfirmware.info
svn at openfirmware.info
Tue Jul 1 10:18:35 CEST 2008
Author: wmb
Date: 2008-07-01 10:18:34 +0200 (Tue, 01 Jul 2008)
New Revision: 842
Modified:
dev/olpc/cafenand/badblock.fth
dev/olpc/cafenand/selftest.fth
Log:
OLPC CaFe NAND driver - changed several alloc/free-mem's to
dma-alloc/free's since dictionary memory is not DMA-accessible
if it is mapped to high addresses with MSRs.
Modified: dev/olpc/cafenand/badblock.fth
===================================================================
--- dev/olpc/cafenand/badblock.fth 2008-07-01 00:55:01 UTC (rev 841)
+++ dev/olpc/cafenand/badblock.fth 2008-07-01 08:18:34 UTC (rev 842)
@@ -145,10 +145,10 @@
;
\ Allocate and free memory for a bad block table
-: alloc-bbt ( -- ) bbt 0= if /bbt alloc-mem to bbt then ;
+: alloc-bbt ( -- ) bbt 0= if /bbt " dma-alloc" $call-parent to bbt then ;
: release-bbt ( -- )
bbt if
- bbt /bbt free-mem 0 to bbt
+ bbt /bbt " dma-free" $call-parent 0 to bbt
then
;
Modified: dev/olpc/cafenand/selftest.fth
===================================================================
--- dev/olpc/cafenand/selftest.fth 2008-07-01 00:55:01 UTC (rev 841)
+++ dev/olpc/cafenand/selftest.fth 2008-07-01 08:18:34 UTC (rev 842)
@@ -41,18 +41,18 @@
0 value ibuf \ Block data read
: alloc-test-bufs ( -- )
sbuf 0= if
- /oobbuf alloc-mem to oobbuf
- erase-size alloc-mem to sbuf
- erase-size alloc-mem to obuf
- erase-size alloc-mem to ibuf
+ /oobbuf " dma-alloc" $call-parent to oobbuf
+ erase-size " dma-alloc" $call-parent to sbuf
+ erase-size " dma-alloc" $call-parent to obuf
+ erase-size " dma-alloc" $call-parent to ibuf
then
;
: free-test-bufs ( -- )
sbuf if
- oobbuf /oobbuf free-mem 0 to oobbuf
- sbuf erase-size free-mem 0 to sbuf
- obuf erase-size free-mem 0 to obuf
- ibuf erase-size free-mem 0 to ibuf
+ oobbuf /oobbuf " dma-free" $call-parent 0 to oobbuf
+ sbuf erase-size " dma-free" $call-parent 0 to sbuf
+ obuf erase-size " dma-free" $call-parent 0 to obuf
+ ibuf erase-size " dma-free" $call-parent 0 to ibuf
then
;
: read-eblock ( adr page# -- error? )
More information about the openfirmware
mailing list