diff options
author | Wolfgang Denk <wd@denx.de> | 2008-12-30 23:30:47 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-12-30 23:30:47 +0100 |
commit | f85cd46918241842546e5021d0b88db2be50a048 (patch) | |
tree | 09bd0d7b2bcd71dd2c905c28c5bf8b10aff91944 /include/asm-ppc/io.h | |
parent | 22bab87db1b065aa66b15c2b47c89247289d4839 (diff) | |
parent | d9011f9b75561a0bd9254934c2bb2bc799d4f645 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Diffstat (limited to 'include/asm-ppc/io.h')
-rw-r--r-- | include/asm-ppc/io.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index 64cb746b1..4ddad26e8 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h @@ -10,6 +10,10 @@ #include <linux/config.h> #include <asm/byteorder.h> +#ifdef CONFIG_ADDR_MAP +#include <addr_map.h> +#endif + #define SIO_CONFIG_RA 0x398 #define SIO_CONFIG_RD 0x399 @@ -287,7 +291,11 @@ extern inline void out_be32(volatile unsigned __iomem *addr, int val) static inline void * map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) { +#ifdef CONFIG_ADDR_MAP + return (void *)(addrmap_phys_to_virt(paddr)); +#else return (void *)((unsigned long)paddr); +#endif } /* @@ -300,7 +308,11 @@ static inline void unmap_physmem(void *vaddr, unsigned long flags) static inline phys_addr_t virt_to_phys(void * vaddr) { +#ifdef CONFIG_ADDR_MAP + return addrmap_virt_to_phys(vaddr); +#else return (phys_addr_t)((unsigned long)vaddr); +#endif } #endif |