* dma_to_virt() on PPC?
@ 2008-09-16 21:37 bhanu jampala
2008-09-16 22:40 ` bhanu jampala
0 siblings, 1 reply; 2+ messages in thread
From: bhanu jampala @ 2008-09-16 21:37 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
Hi All,
How do I convert a DMA buffer to virtual address on Linux PPC?
I know there is some thing like dma_to_virt(), but I don't think if there is
one for PPC.
In this scenario where I have submitted some dma buffer form a chunk of
memory to Device.
Now at the end of successful receive, how do I convert it back to Virtual
address?
Any pointers?
Regards,
Mukund Jampala
[-- Attachment #2: Type: text/html, Size: 448 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: dma_to_virt() on PPC?
2008-09-16 21:37 dma_to_virt() on PPC? bhanu jampala
@ 2008-09-16 22:40 ` bhanu jampala
0 siblings, 0 replies; 2+ messages in thread
From: bhanu jampala @ 2008-09-16 22:40 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]
Hi guys,
I have tried these calls to covert part of my DMA address to Virtual and it
seems to work fine.
I am curious to know more about these calls.
dma_map_single(NULL, dev->buf_addr, tx_cnt, DMA_TO_DEVICE));
dma_map_single(NULL, dev->buf_addr, tx_cnt, DMA_FROM_DEVICE));
The reason I am suspect these calls is:
I allocated a single DMA memory of 4K bytes size.
No I want to split and distribute the so allocated buffer between each
device.
in that case of my starting address is ADDR. the address I submit to the
device would be something like
ADDR + 32* device_num.
But, I realize that it is not actually returning the Virtual address.
Regards,
Adams
On Tue, Sep 16, 2008 at 3:37 PM, bhanu jampala <adams.ppc@gmail.com> wrote:
> Hi All,
>
> How do I convert a DMA buffer to virtual address on Linux PPC?
>
> I know there is some thing like dma_to_virt(), but I don't think if there
> is one for PPC.
> In this scenario where I have submitted some dma buffer form a chunk of
> memory to Device.
> Now at the end of successful receive, how do I convert it back to Virtual
> address?
> Any pointers?
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1510 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-16 22:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16 21:37 dma_to_virt() on PPC? bhanu jampala
2008-09-16 22:40 ` bhanu jampala
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).