PCI DMA Address

From: ina (celina.miranda_at_eazix.com)
Date: 04/29/04


Date: 28 Apr 2004 23:39:25 -0700

Hi,

I need to create a driver for a PCI camera device that uses DMA to
transfer the captured images. The system that i use is an x86 board
that has 128M of RAM, I reserved the top of the physical RAM during
bootup by passing "mem=100".

In my driver i claimed the reserved memory by using ioremap call:
void* pAdd = ioremap(0x6400000,(1280x1024))

This is the memory where the PCI device should DMA the captured data.
My question is how do I tell the PCI device the DMA address? I know
that inorder for the PCI device to access the DMA address correctly, i
have to convert the return value of ioremap into a bus address. How do
i do this? I already used:
virt_to_phys(pAdd)
but this doesn't seem to work.

I read somewhere that the output of ioremap cannot be directly used
for virt_to_phys function call, but I'm not really sure...

Thanks,
Ina



Relevant Pages

  • dma timeout
    ... my *old hdd* got up with dma mode. ... PIIX4: IDE controller at PCI slot 00:04.1 ... ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 ... hda: attached ide-disk driver. ...
    (Debian-User)
  • [PATCH 19-rc2] Fix misc Kconfig typos
    ... limits the system to just 64MB of PCI memory. ... config MACH_LPD7A400 ... If you do not enable DMA, an interrupt for each character will be ... This driver toggles the front-panel LED on sun4m systems ...
    (Linux-Kernel)
  • PAGE_FAULT_... and PCI64
    ... I'm writing a WDM driver for PCI 64 bit. ... When I receive interrupt I copy memory transferred with DMA to an Array ... This way I free DMA memory and I'm ready to receive new data from PCI. ... I loose data from PCI ...
    (microsoft.public.development.device.drivers)
  • PowerPC PCI queries
    ... I have recently started work on a PowerPC 405 based driver. ... The PCI ... if the user reads/writes to that memory egion, how are the DMA ... Specifically if the kernel accesses these reserved ...
    (comp.os.linux.development.system)
  • Re: PCI DMA Address
    ... > I need to create a driver for a PCI camera device that uses DMA to ... > transfer the captured images. ... > This is the memory where the PCI device should DMA the captured data. ...
    (comp.os.linux.development.system)