PCI DMA question

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

 



Hello,

I have an application where I would like to do DMA writes from within the kernel memory space out to a device on the PCI bus.

The 'device' is an FPGA.

After reading all I could find on DMA/Linux/PCI I don't see any reference to how I can DMA directly to a single address on the FPGA. All the examples imply what basically are block to block transfers (i.e. something like what memcpy_fromio() does)

I do this all the time (read and write) over VME busses with non- linux OSs so I'm fairly sure the PCI should support this as well.

My needs are simple enough:
transfer a buffer in my driver to a single bus address.
The way I currently do this is (pseudo code):

char *pBuf = dataBuffer;  /* pointer to my data buffer */
unsigned int count = BUFSIZE;  /* number of bytes to transfer */

do
{
writeb (*pBuf++, dataRegister); /* write to a well known and properly mapped bus address */
}
while (count--);

This works but my device should work fine with 33MHz writes and I could gain about 10x.

Any ideas or references to look at?
Thanks,
-Bruce


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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