DMA take 3
Charles Krinke
ckrinke at istor.com
Sat Mar 3 08:29:42 EST 2007
Thanks again Ed. This is a really good idea. It is entirely possible that some other complication in Linux is getting to me.
So, with that in mind, I'm off to uboot for a while to see if I can convince myself the rest of the chips are setup correctly on the board.
Charles
________________________________
From: Swarthout Edward L-SWARTHOU [mailto:ed.swarthout at freescale.com]
Sent: Fri 3/2/2007 1:27 PM
To: Charles Krinke; linuxppc-embedded at ozlabs.org
Subject: RE: DMA take 3
Maybe even a more basic question - are you setting the controller up
correctly for this mode (SRW=1 and CTM=1)?
One suggestion is to try it once by hand in u-boot to ensure the
hardware is working as expected before trying it in Linux.
-EdS
#simple u-boot Direct Mode dma example - Ed.Swarthout
setenv sad fff80000 #source
setenv dad 10000 #dest
setenv bc 10 #byte count
setenv b e0021 #ccsr
mw ${b}104 ffffffff #sr clear
mw ${b}110 50000 #satr SREADTTYPE=5 read snoop
mw ${b}114 $sad #sar
mw ${b}118 50000 #datr write snoop
mw ${b}120 $bc #bcr
mw ${b}100 0f03c404 #mr BWC=f, DAHTS=3, SAHTS=3, SRW=1 CTM
md $dad 5 #before
mw ${b}11c $dad #set dar and go
md ${b}100 9 #show status
md $dad 5 #after
Or make a dma command and run it:
setenv dma 'mw ${b}104 ffffffff;mw ${b}110 50000;mw ${b}114 $sad;mw
${b}118 50000;mw ${b}120 $bc;mw ${b}100 0f03c404; mw ${b}11c $dad; md
${b}100 9'
setenv b e0021; setenv sad fff80000; setenv dad 10000; setenv bc 10
run dma
--- results ---
=> md $dad 5
md $dad
00010000: deadbeef deadbeef deadbeef deadbeef ................
00010010: deadbeef ....
=> run dma
run dma
e0021100: 0f03c405 00000000 00000000 00000000 ................
e0021110: 00050000 fff80010 00050000 00010010 ................
e0021120: 00000000 ....
=> md $dad 5
md $dad 5
00010000: 27051956 552d426f 6f742031 2e322e30 '..VU-Boot 1.2.0
00010010: deadbeef ....
More information about the Linuxppc-embedded
mailing list