kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Regadring Linux Scatter Gather List
       [not found] <131529692.618013.1446805342330.JavaMail.yahoo.ref@mail.yahoo.com>
@ 2015-11-06 10:22 ` babu subash
  0 siblings, 0 replies; only message in thread
From: babu subash @ 2015-11-06 10:22 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

I have a basic query regarding the DMA. After the SG list is prepared and mapped using dma_map_sg().
we need to do DMA transfer.
Here the list will give the bus addresses of source SG list.

In my one of the earlier project in vxworks, I had a DMA registers which provided the  src and dst address register and mode.
where we use to fill both addresses, size and direction.

But here how to specify the destination addresses. Please let me know.

In one of the driver I saw this method:

                dmaflags = claim_dma_lock();
                set_dma_mode();   /* Read / Write */
                set_dma_addr(dma, dma_addr);
                set_dma_count(dma, size);
                enable_dma(dma);
                release_dma_lock(dmaflags);

Here the dma_addr will be the address will be given that we get from the SG list mapped address list which becomes the src address for write on that channel.
But to give the dest address where to write on to particular offset on data buffer?? Is the issue...

Is there any other methods should we use?


Regards,
Subash

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-06 10:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <131529692.618013.1446805342330.JavaMail.yahoo.ref@mail.yahoo.com>
2015-11-06 10:22 ` Regadring Linux Scatter Gather List babu subash

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).