<FONT face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2><DIV>&nbsp;<DIV><FONT face="Default Monospace,Courier New,Courier,monospace">Hi Showair , </FONT></DIV><DIV><FONT face="Default Monospace,Courier New,Courier,monospace"></FONT> </DIV><DIV> </DIV><DIV><FONT face="Default Monospace,Courier New,Courier,monospace">&gt;&gt; <FONT face="Default Monospace,Courier New,Courier,monospace">Note that my target is to transfer data from memory location to another <BR>&gt;&gt;memory location &amp; it will be an overhead if i copy the data from the &gt;&gt;src to <BR>&gt;&gt;the DMA buffer then from the DMA buffer to the Destination. <BR>&gt;&gt;isn't there any other way to avoid using that DMA buffer &amp; to copy data &gt;&gt;from <BR>&gt;&gt;src to dest directly? </FONT><BR></FONT></DIV><DIV><FONT face="Default Monospace,Courier New,Courier,monospace">I doubt that your concept of dma transfer and dma memory operation is not very clear .Please excuse me thats what i got reading your concern . </FONT></DIV><DIV><FONT face="Default Monospace,Courier New,Courier,monospace"></FONT> </DIV><DIV><FONT face="Default Monospace,Courier New,Courier,monospace">you dont need to copy the data from&nbsp;src to destination&nbsp;that the dma engine would take care . i dont think there could be a better way of implementing the same in other way .The engine would copy the data block to the destination and&nbsp;generate an end of transfer interrupt .I dont think you have to allocate memory for that you just have to give the virtual address corresponding to the physical address using ioremap() and size to the dma engine and it will transfer the data from source to destination offcource other channel and EOT&nbsp;configuration needs to be done in driver init or else where .&nbsp;</FONT></DIV><DIV><FONT face="Default Monospace,Courier New,Courier,monospace"></FONT><BR>&nbsp;</DIV><DIV>&nbsp;Thanks&nbsp;&amp;&nbsp;Regards,<BR>&nbsp;Misbah<BR>_____________________________________<BR>&nbsp;&nbsp;EmSyS&nbsp;Division,<BR>&nbsp;&nbsp;Larsen&nbsp;&amp;&nbsp;Toubro&nbsp;Limited,<BR>&nbsp;&nbsp;KIADB&nbsp;indusrial&nbsp;area,&nbsp;Hebbal,Hootagalli.<BR>&nbsp;&nbsp;Mysore,&nbsp;<BR>&nbsp;&nbsp;India&nbsp;570018<BR>&nbsp;&nbsp;Phone:&nbsp;08212405398&nbsp;&nbsp;Extn:&nbsp;5172<BR>_____________________________________<BR><BR>This&nbsp;mail&nbsp;is&nbsp;classified&nbsp;as&nbsp;:<BR>(X)&nbsp;L&amp;T&nbsp;EmSyS&nbsp;Proprietary&nbsp;<BR>(&nbsp;&nbsp;)&nbsp;L&amp;T&nbsp;EmSyS&nbsp;Confidential<BR>(&nbsp;&nbsp;)&nbsp;L&amp;T&nbsp;EmSyS&nbsp;Internal&nbsp;Use&nbsp;<BR>(&nbsp;&nbsp;)&nbsp;L&amp;T&nbsp;EmSyS&nbsp;General&nbsp;Business<BR><DIV><BR></DIV><FONT color=#990099>-----linuxppc-dev-bounces+misbahullah.khan=lntemsys.com@ozlabs.org wrote: -----<BR><BR></FONT><blockquote style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">To: linuxppc-dev@ozlabs.org<BR>From: wael showair &lt;showair2003@yahoo.com&gt;<BR>Sent by: linuxppc-dev-bounces+misbahullah.khan=lntemsys.com@ozlabs.org<BR>Date: 01/12/2009 05:33PM<BR>Subject: When do i need to allocate DMA buffer<BR><BR><FONT face="Default Monospace,Courier New,Courier,monospace" size=2  ><BR>Hi All,<BR>i have MPC8555 processor, also i have linux-kernel 2.6.19-rc5 on my board.i<BR>want to use the DMA on my board, just a simple example is enough for me but<BR>during my reading on how to use the DMA i have some questions:<BR>1. The DMA buffer is always needed for all kind of buses or not? (I think<BR>this is valid in the ISA bus but not in the PCI bus, plz correct me if i m<BR>wrong?)<BR>Note that my target is to transfer data from memory location to another<BR>memory location &amp; it will be an overhead if i copy the data from the src to<BR>the DMA buffer then from the DMA buffer to the Destination.<BR>isn't there any other way to avoid using that DMA buffer &amp; to copy data from<BR>src to dest directly?<BR>i read the documentation of my board &amp; it tells me that it contain DMA<BR>engine which "is capable of transferring blocks of data from any legal<BR>address range to any<BR>other legal address range."<BR><BR>2. i have read DMA-API.txt in the linux Documentation folder but i m little<BR>confused about the APIs that exist in this file. Actually, it is stated in<BR>this file the following:<BR>"This document describes the DMA API.This API is split into two pieces. <BR>Part I describes the API and the corresponding pci_ API".<BR><BR>so if the DMA controller is connected to the PCI bus, am i obligated to use<BR>the pci_API &amp; for any other case (like ISA bus or any other bus types) shall<BR>i use this generic API?<BR>also what r the benefits of these APIs over the normal kmalloc? specially<BR>that i have read the following section in the DMA-mapping.txt:<BR>"If you acquired your memory via the page allocator<BR>(i.e. __get_free_page*()) or the generic memory allocators<BR>(i.e. kmalloc() or kmem_cache_alloc()) then you may DMA to/from<BR>that memory using the addresses returned from those routines."<BR><BR>thanks in advance for ur help<BR>-- <BR>View this message in context: <A href="http://www.nabble.com/When-do-i-need-to-allocate-DMA-buffer-tp21413193p21413193.html"   target=blank  >http://www.nabble.com/When-do-i-need-to-allocate-DMA-buffer-tp21413193p21413193.html</A><BR>Sent from the linuxppc-dev mailing list archive at Nabble.com.<BR><BR>_______________________________________________<BR>Linuxppc-dev mailing list<BR>Linuxppc-dev@ozlabs.org<BR><A href="https://ozlabs.org/mailman/listinfo/linuxppc-dev" target=blank >https://ozlabs.org/mailman/listinfo/linuxppc-dev</A><BR></FONT></blockquote><br></DIV></DIV></FONT>