Hi

Iam trying to implement DMA mode of transfer in a kit with PXA27x
processor interfaced with HOST FPGA.
In the standard Wince5.0 driver code provided I used the virtual alloc
function to
map the DMA controller registers - DCMDX.

Following is the part of the code tried for mapping
PTR_DCMD0 =(volatile DWORD *)MapRegister(0x4000020C))

void* MapRegister(DWORD pa)
{
DWORD* pRegs;
if(pRegs =(DWORD*) VirtualAlloc(0, PAGE_SIZE, MEM_RESERVE,
PAGE_NOACCESS))
{

if(!VirtualCopy(pRegs, (LPVOID)(pa>>8), PAGE_SIZE, PAGE_READWRITE |
PAGE_PHYSICAL | PAGE_NOCACHE))
{
VirtualFree(pRegs, 0, MEM_RELEASE);
pRegs=NULL;
}
}

return pRegs;

}
Can DMA controller registers can be mapped virtually or some other API
should be used?
please reply.

Thanks,
Meribha