It really depends on the way the firmware responds. We use an interrupt
to indicate the end of DMA.
/* Flag end-of-chain */
if (status & LSDMA_CH_CSR_INTSRCDONE) {
set_bit (0, &iface->dma_done);
}
In the above part of the code (this code belongs to ISR), we set
LSDMA_CH_CSR_INTSRCDONE to indicate the end of chain in a scatter/gather
DMA operation. We also use another bit called LSDMA_CH_CSR_INTSRCSTOP to
abort the dma. So, these two are from the DMA implementation on the
firmware. But, the checking must be done in ISR.
Dinesh
Devvrat Tripathi wrote:
---------- Forwarded message ----------
From: *Devvrat Tripathi* <tripathidevvrat@xxxxxxxxx
<mailto:tripathidevvrat@xxxxxxxxx>>
Date: Jun 21, 2007 3:13 PM
Subject: Re: dma operations
To: kanishk rastogi <kanishk_rastogi85@xxxxxxxxx
<mailto:kanishk_rastogi85@xxxxxxxxx>>
On 6/20/07, *kanishk rastogi* <kanishk_rastogi85@xxxxxxxxx
<mailto:kanishk_rastogi85@xxxxxxxxx>> wrote:
----- Original Message ----
From: Devvrat Tripathi <tripathidevvrat@xxxxxxxxx
<mailto:tripathidevvrat@xxxxxxxxx>>
To: kernelnewbies@xxxxxxxxxxxx <mailto:kernelnewbies@xxxxxxxxxxxx>
Sent: Wednesday, June 20, 2007 7:12:33 PM
Subject: dma operations
How does the kernel get to know whenever a dma transfer is
completed. Does a call to dma_unmap_* always mean that a dma
transfer to the said device has been completed. If not then what
method is called to indicate a finished dma transfer.
regards
devvrat
its some intrrupt......
code i dont know......
CMIIW
regards
kanishk
when you say interrupt then though it maybe the sureshot way to tell
that the transfer is done, it becomes device specific too. I was
interested in the generic dma support provided by the kernel. Again does
a call to dma_unmap_* always mean a dma transfer is complete. This was
for the streaming mappings. Could someone also explain the coherent
mapping. How exactly does the device know in which direction the dma
transfer is supposed to take place in that since there is no argument
specifying the direction. Also how do you actually start and stop the
data transfer in such mapping. I am sorry but i couldnt get the thing
given in LDD3 properly
regards
devvrat
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ