<div dir="ltr">Hi guys,<br><br>I have tried these calls to covert part of my DMA address to Virtual and it seems to work fine.<br>I am curious to know more about these calls.<br><br>dma_map_single(NULL, dev-&gt;buf_addr, tx_cnt, DMA_TO_DEVICE));<br>

dma_map_single(NULL, dev-&gt;buf_addr, tx_cnt, DMA_FROM_DEVICE));<br>
<br>The reason I am suspect these calls is:<br><br>
I allocated a single DMA memory of 4K bytes size.<br>No I want to split and distribute the so allocated buffer between each device.<br>in that case of my starting address is ADDR. the address I submit to the device would be something like <br>
<br>ADDR + 32* device_num.<br><br>But, I realize that it is not actually returning the Virtual address.<br><br>Regards,<br>Adams<br><br><br><br><div class="gmail_quote">On Tue, Sep 16, 2008 at 3:37 PM, bhanu jampala <span dir="ltr">&lt;<a href="mailto:adams.ppc@gmail.com">adams.ppc@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Hi All,<br><br>How do I convert a DMA buffer to virtual address on Linux PPC?<br>
<br>I know there is some thing like dma_to_virt(), but I don&#39;t think if there is one for PPC.<br>In this scenario where I have submitted some dma buffer form a chunk of memory to Device.<br>
Now at the end of successful receive, how do I convert it back to Virtual address?<br>Any pointers?<br>
<br><br><br></div>
</blockquote></div><br></div>