* Dereferencing phys addr IMMAP works even if it is not a virtual address. Strange?
@ 2007-03-06 14:00 DI BACCO ANTONIO - technolabs
2007-03-06 14:54 ` Sylvain Munaut
0 siblings, 1 reply; 2+ messages in thread
From: DI BACCO ANTONIO - technolabs @ 2007-03-06 14:00 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 204 bytes --]
Now I'm doing a ioremap_nocache of IMMAP and using the virtual pointer
returned to access my 880 registers but also using the physical address
it works, I can access the registers.
Bye,
Antonio.
[-- Attachment #2: Type: text/html, Size: 771 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Dereferencing phys addr IMMAP works even if it is not a virtual address. Strange?
2007-03-06 14:00 Dereferencing phys addr IMMAP works even if it is not a virtual address. Strange? DI BACCO ANTONIO - technolabs
@ 2007-03-06 14:54 ` Sylvain Munaut
0 siblings, 0 replies; 2+ messages in thread
From: Sylvain Munaut @ 2007-03-06 14:54 UTC (permalink / raw)
To: DI BACCO ANTONIO - technolabs; +Cc: linuxppc-embedded
DI BACCO ANTONIO - technolabs wrote:
> Now I'm doing a ioremap_nocache of IMMAP and using the virtual pointer
> returned to access my 880 registers but also using the physical
> address it works, I can access the registers.
If the IMMAP base is high (like 0xf0000000 ) and therefore doesn't
collide with anything, it's quite common practice to map it statically
using a BAT somewhere in the setup code and often it's mapped such that
phys = virt ...
So a physical address in this zone is equal to a virtual addres ...
When that's the case, ioremap detects the BAT mapping and just does
nothing. But you should always use ioremap nonetheless ... because if at
some point some one decide to move the BAT mapping, if you didn't do
things properly your code will break.
Sylvain
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-06 14:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 14:00 Dereferencing phys addr IMMAP works even if it is not a virtual address. Strange? DI BACCO ANTONIO - technolabs
2007-03-06 14:54 ` Sylvain Munaut
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.