diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/io.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 47f8c3ec1b..e41b4df403 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -421,6 +421,26 @@ static inline void iowrite64be(u64 value, volatile void __iomem *addr) #endif #endif /* CONFIG_64BIT */ +/* + * Change virtual addresses to physical addresses and vv. + * These are pretty trivial + */ +#ifndef virt_to_phys +#define virt_to_phys virt_to_phys +static inline unsigned long virt_to_phys(volatile void *mem) +{ + return (unsigned long)mem; +} +#endif + +#ifndef phys_to_virt +#define phys_to_virt phys_to_virt +static inline void *phys_to_virt(unsigned long phys) +{ + return (void *)phys; +} +#endif + #ifndef IOMEM #define IOMEM(addr) ((void __force __iomem *)(addr)) #endif |