Thread (9 messages) flat view 9 messages, 6 authors, 2007-01-31

Re: mem=XXXM ioremap DMA

From: Eric Nuckols <hidden>
Date: 2007-01-29 15:45:32

Eric Nuckols wrote:
quoted
in my driver, I'm calling
my_virt_address =   ioremap( 0x1F800000, 0x800000  );
my_bus_address = virt_to_bus( my_virt_address );
You can't use virt_to_bus on address returned by ioremap AFAIK.

I think you could do
my_bus_address = virt_to_bus(phys_to_virt(0x1f800000));

Altough it slightly misuse the functions ... but that should work.


        Sylvain
If I use this approach in a driver, won't I still need to use the ioremap 
function to make sure the kernel does not reassign the virtual addresses to 
some other physical memory locations?

I want to hand off bus address descriptors to a hardware device that will 
perform bus master DMA back into the memory starting at 0x1f800000, but I 
want to make sure the virt addresses don't coincide with anything other than 
this range of memory (no matter what context I'm in 
--ISR/application...etc.etc..).

Thank,
Eric

_________________________________________________________________
Turn searches into helpful donations. Make your search count. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_donation&FORM=WLMTAG
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help