Hi Showair ,
>> Note that my target is to transfer data from memory location to another
>>memory location & it will be an overhead if i copy the data from the >>src to
>>the DMA buffer then from the DMA buffer to the Destination.
>>isn't there any other way to avoid using that DMA buffer & to copy data >>from
>>src to dest directly?

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 .
you dont need to copy the data from src to destination 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 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 configuration needs to be done in driver init or else where . 

 
 Thanks & Regards,
 Misbah
_____________________________________
  EmSyS Division,
  Larsen & Toubro Limited,
  KIADB indusrial area, Hebbal,Hootagalli.
  Mysore, 
  India 570018
  Phone: 08212405398  Extn: 5172
_____________________________________

This mail is classified as :
(X) L&T EmSyS Proprietary 
(  ) L&T EmSyS Confidential
(  ) L&T EmSyS Internal Use 
(  ) L&T EmSyS General Business

-----linuxppc-dev-bounces+misbahullah.khan=lntemsys....@ozlabs.org wrote: -----

To: linuxppc-dev@ozlabs.org
From: wael showair <showair2...@yahoo.com>
Sent by: linuxppc-dev-bounces+misbahullah.khan=lntemsys....@ozlabs.org
Date: 01/12/2009 05:33PM
Subject: When do i need to allocate DMA buffer


Hi All,
i have MPC8555 processor, also i have linux-kernel 2.6.19-rc5 on my board.i
want to use the DMA on my board, just a simple example is enough for me but
during my reading on how to use the DMA i have some questions:
1. The DMA buffer is always needed for all kind of buses or not? (I think
this is valid in the ISA bus but not in the PCI bus, plz correct me if i m
wrong?)
Note that my target is to transfer data from memory location to another
memory location & it will be an overhead if i copy the data from the src to
the DMA buffer then from the DMA buffer to the Destination.
isn't there any other way to avoid using that DMA buffer & to copy data from
src to dest directly?
i read the documentation of my board & it tells me that it contain DMA
engine which "is capable of transferring blocks of data from any legal
address range to any
other legal address range."

2. i have read DMA-API.txt in the linux Documentation folder but i m little
confused about the APIs that exist in this file. Actually, it is stated in
this file the following:
"This document describes the DMA API.This API is split into two pieces.
Part I describes the API and the corresponding pci_ API".

so if the DMA controller is connected to the PCI bus, am i obligated to use
the pci_API & for any other case (like ISA bus or any other bus types) shall
i use this generic API?
also what r the benefits of these APIs over the normal kmalloc? specially
that i have read the following section in the DMA-mapping.txt:
"If you acquired your memory via the page allocator
(i.e. __get_free_page*()) or the generic memory allocators
(i.e. kmalloc() or kmem_cache_alloc()) then you may DMA to/from
that memory using the addresses returned from those routines."

thanks in advance for ur help
--
View this message in context: http://www.nabble.com/When-do-i-need-to-allocate-DMA-buffer-tp21413193p21413193.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to