Re: PCI DMA - Where to specify destination address (IO address)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-02-22 at 06:14 -0800, munees waran wrote:
> Hi,
>  
> I am writing PCI device driver in linux, where I need to do DMA
> operation.
>  
> While transferring data from memory to IO or IO to memory, only source
> address is specified in API call. How destination address will be
> specified ?
>  
> int dad_dma_prepare(int channel, int mode, unsigned int buf,
> unsigned int count)
> {
> unsigned long flags;
> flags = claim_dma_lock( );
> disable_dma(channel);
> clear_dma_ff(channel);
> set_dma_mode(channel, mode);
> set_dma_addr(channel, virt_to_bus(buf));
> set_dma_count(channel, count);
> enable_dma(channel);
> release_dma_lock(flags); 

you are aware that this is the old ISA bus dma api, not the PCI one?

Please see Documentation/dma-mapping.txt for the PCI bus DMA api!


> 


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux