Re: Howto use PPC4xx memory to memory DMA

4 messages, 3 authors, 2007-01-22 · open the first message on its own page

Re: Howto use PPC4xx memory to memory DMA

From: - Reyneke <hidden>
Date: 2007-01-19 09:02:05

Niklaus,

Here are a few things to check:

1. Your memory destination and source addresses are contiguous. You can get 
this using something like:

mem = (void*)__get_free_pages(GFP_KERNEL | GFP_DMA, get_order(size));

2. Your source and dest addresses are _bus_ addresses. You can get these by:

source = virt_to_bus((u32 *)mem);


Also, we had some trouble with the ppc4xx_ functions using 440 - it seems 
these functions are specific to the PLB4. So if you are trying to do DMA on 
say the PLB peripheral bus on a memory mapped device, you definitely have 
some trouble.

I have some code for doing both - so of you need any further help, just ask.

Regards
   Jan Reyneke

_________________________________________________________________
Get Hotmail, News, Sport and Entertainment from MSN on your mobile.  
http://www.msn.txt4content.com/

Re: Howto use PPC4xx memory to memory DMA

From: T Ziomek <hidden>
Date: 2007-01-19 19:48:30

On Fri, 19 Jan 2007, - Reyneke wrote:
Here are a few things to check:

1. Your memory destination and source addresses are contiguous. You can get 
this using something like:

mem = (void*)__get_free_pages(GFP_KERNEL | GFP_DMA, get_order(size));

2. Your source and dest addresses are _bus_ addresses. You can get these by:

source = virt_to_bus((u32 *)mem);
The above contradicts an email by Ben H back on 22 Dec:
<http://ozlabs.org/pipermail/linuxppc-embedded/2006-December/025546.html>
But I don't know enough to resolve the conflict...

Tom
-- 
   /"\  ASCII Ribbon Campaign   |
   \ /                          |   Email to user 'CTZ001'
    X        Against HTML       |             at 'email.mot.com'
   / \     in e-mail & news     |

Re: Howto use PPC4xx memory to memory DMA

From: - Reyneke <hidden>
Date: 2007-01-21 21:30:00

Yes, I know - that email is in response to a question I posted.  :)

This seems to be one of those ongoing uncertainties. It seems commonly 
advocated that you shouldn't use it, but as yet I've found no suitable 
alternative.

Some more reading on why you *should* use it:

http://ozlabs.org/pipermail/linuxppc64-dev/2004-March/001276.html

It would be nice if we could get a definitive answer to this. Anyone out 
there who knows?

Cheers
   Jan Reyneke

From: T Ziomek <redacted>
quoted
source = virt_to_bus((u32 *)mem);
The above contradicts an email by Ben H back on 22 Dec:
<http://ozlabs.org/pipermail/linuxppc-embedded/2006-December/025546.html>
But I don't know enough to resolve the conflict...

Tom
_________________________________________________________________
Get Hotmail, News, Sport and Entertainment from MSN on your mobile.  
http://www.msn.txt4content.com/

Re: Howto use PPC4xx memory to memory DMA

From: Eugene Surovegin <hidden>
Date: 2007-01-22 17:18:29

On Sun, Jan 21, 2007 at 09:28:34PM +0000, - Reyneke wrote:
This seems to be one of those ongoing uncertainties. It seems commonly 
advocated that you shouldn't use it, but as yet I've found no suitable 
alternative.
Really?

Could you elaborate, why API described in Documentation/DMA-API.txt 
(e.g. "Streaming DMA mappings") is not suitable for you?.

-- 
Eugene
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help