Difference between ioremap() and phy_to_virt() Kernel function
Hi all
Could you Please let me know what is the difference between ioremap() and phy_to_virt() function being provided by the Kernel.
--Misbah
Signature · 2 lines
View this message in context: http://www.nabble.com/Difference-between-ioremap%28%29-and-phy_to_virt%28%29-Kernel-function-tf4669833.html#a13339930 Sent from the linuxppc-embedded mailing list archive at Nabble.com.
Quoted 2 lines · Misbah khan
Could you Please let me know what is the difference between
ioremap()andphy_to_virt()function being provided by the Kernel.
ioremap gives you a new mapping for I/O addresses that you can access with functions like in_be32 and the like.
phy_to_virt() is rarely used at all, it only serves to convert a physical address for main memory (RAM) into the address used inside of the kernel.
Arnd <><
Thanks Arnd
But i wish to know that could i use phy_to_virt() function in place io ioremap() ????? And could you give me an example where we could use phy_to_virt(). ioremap() implementation i have already done.
---Misbah
Quoted 18 lines · Arnd Bergmann
Quoted 2 lines · Misbah khan
Could you Please let me know what is the difference between
ioremap()andphy_to_virt()function being provided by the Kernel.ioremap gives you a new mapping for I/O addresses that you can access with functions like
in_be32and the like.
phy_to_virt()is rarely used at all, it only serves to convert a physical address for main memory (RAM) into the address used inside of the kernel.Arnd <><_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Signature · 2 lines
View this message in context: http://www.nabble.com/Difference-between-ioremap%28%29-and-phy_to_virt%28%29-Kernel-function-tf4669833.html#a13357088 Sent from the linuxppc-embedded mailing list archive at Nabble.com.
Quoted 2 lines · Misbah khan
But i wish to know that could i use
phy_to_virt()function in place ioioremap()?????
Sorry to disappoint you there, but you can't.
Quoted 1 line
And could you give me an example where we could use
phy_to_virt().
Not really, I can't think of any correct use of phys_to_virt on powerpc.
Arnd <><