To
read/write to IO memory (PCI registers) use the readl()/writel()
family.
To get
a bus address for a virtual memory buffer use
pci_map_single()/pci_unmap_single().
Please
take a look at chapter 13
HTH
dom
-----Original Message-----
From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of jhoney jhoney
Sent: Monday, November 22, 2004 9:08 AM
To: kernelnewbies@xxxxxxxxxxxx
Subject: Memory Mapped AccessHello All,
Presently I am working with DMA on MPC8540 board which has got DMA controller , two gigbit ethernet ports and PCI-X interface. Now My main aim is to transfer the data between two boards (mpc 8540)one wit linux and other with vxworks. The board that contains linux is going to perform the Dma transfer in both the directions.The dma controller is memory mapped to some offset , and I know the IMMR(Register Base is 0xfdf0 ). Now I want to program the controller. In what way I have to write in to the registers. I am using ppc linux. And Also how to conver the kernel virtual address to the physical address as the DMA hardware sees only the physical addresses.
Thanks in advance.
Regards
Jhoney