Hi, I have been developing a driver for plx9656 device.Now I want to use DMA to tranfser data from Local Address to PCI Address.But I always got wrong result.
here is some code of my driver, please give me some help. thanks.
//clear DMA Channel 0 interrupt HAL_PLX9656_REG_WRITE_BYTE(plxRegAddr, PLX9656_DMACSR0, 0x8);
//open DMA Channel x Done Interrupt,DMA Channel 0 Clear Count Mode bit(0xe2100080) HAL_PLX9656_REG_WRITE_WORD(plxRegAddr, PLX9656_DMAMODE0,0x20443);
//write address to DMA Channel 0 PCI Address,(0xE2100084) HAL_PLX9656_REG_WRITE_WORD(plxRegAddr, PLX9656_DMAPADR0, ubpHAL_PLX9656_BufferBase);
//write address to DMA Channel 0 Local Address,(0xE2100088) HAL_PLX9656_REG_WRITE_WORD(plxRegAddr, PLX9656_DMALADR0, fifoBase);
//write the size of data will be transfered(0xE210008C) HAL_PLX9656_REG_WRITE_WORD(plxRegAddr, PLX9656_DMASIZ0, IBUFFER_SIZE);
//set from local to pci address,0xE2100090) HAL_PLX9656_REG_WRITE_WORD(plxRegAddr, PLX9656_DMADPR0, 0x8);
//start dma HAL_PLX9656_REG_WRITE_BYTE(plxRegAddr, PLX9656_DMACSR0, 0x3);