Issue with allocating dma memory pool on ppc 476
I am fairly new to Linux device driver development and I am working on porting a device driver written for red hat Linux to work on Linux kernel (2.6.39) running on powerpc 476.
The driver uses dma_pool_create to create a memory pool and then dma_pool_alloc to allocate memory from that pool for the purpose of dma data to end device over pci.
By what I read in comment section of dma_pool_create the dma_pool_alloc should return a memory that is consistent and can be simultaneously be used by device and processor with needing any cache flush methods.
However what I am observing is completely opposite of that, that is the end point receives all 0s in the dma if flush is not done before starting dma while if I add a flush_dcache_range() for the range of the frame before starting dma the device receives the data properly.
Any idea what could be wrong here that is causing this behavior?
Appreciate any kind of help.