Howto use PPC4xx memory to memory DMA

Niklaus Giger niklaus.giger at member.fsf.org
Sat Jan 20 07:47:27 EST 2007


Am Freitag, 19. Januar 2007 10:35 schrieb - Reyneke:
> Ooh - and the 3d thing - cache coherence. I.e.:
>
> 	dma_cache_inv((u32)mem, (u32)nBytes);
>
> >>Here are a few things to check:
Thanks a lot for your tips. First I called
a) __get_free_pages(GFP_KERNEL | GFP_DMA, get_order(size));
for the source and destination address.
Then before calling ppc4xx_enable_dma I added
b) ppc4xx_set_src_addr(DMA_NR, virt_to_bus(src));
c) ppc4xx_set_src_addr(DMA_NR, virt_to_bus(dst));
d) flush_dcache_all(); 
With these changes I got at least one byte copied. After fixing the 
ppc4xx_enable_dma everything worked fine. (Patch posted a few minutes ago.)

Did you manage to use DMA on PLB peripheral bus on a memory mapped dev? I 
think there one should also increment the source or destination address. But 
I have no example HW/code at hand to test these two cases too.

Best regards
-- 
Niklaus Giger



More information about the Linuxppc-embedded mailing list