diff options
author | Zhi-zhou Zhang <etou.zh@gmail.com> | 2012-10-16 15:02:08 +0200 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2012-10-16 15:02:08 +0200 |
commit | 090854c826276b4d6361b4bdf3091ddcc977544c (patch) | |
tree | 0a5eec58a100bb3f1266379e19ee4953e5069ac0 /arch/mips/include/asm/io.h | |
parent | cb0a6a1ecc8dfe4dbdad6f9376ef78879337b118 (diff) | |
download | talos-obmc-uboot-090854c826276b4d6361b4bdf3091ddcc977544c.tar.gz talos-obmc-uboot-090854c826276b4d6361b4bdf3091ddcc977544c.zip |
MIPS: add support for 64 bit addressing
Prepare for upcoming mips64 support. This patch add mips64 address
support.
Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
[daniel.schwierzeck@gmail.com: prefer _MIPS_SZLONG in posix_types.h to fix some warnings]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'arch/mips/include/asm/io.h')
-rw-r--r-- | arch/mips/include/asm/io.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index 025012ae60..80eab75e15 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -120,12 +120,20 @@ static inline void set_io_port_base(unsigned long base) */ extern inline phys_addr_t virt_to_phys(volatile void * address) { +#ifndef CONFIG_64BIT return CPHYSADDR(address); +#else + return XPHYSADDR(address); +#endif } extern inline void * phys_to_virt(unsigned long address) { +#ifndef CONFIG_64BIT return (void *)KSEG0ADDR(address); +#else + return (void *)CKSEG0ADDR(address); +#endif } /* @@ -133,12 +141,20 @@ extern inline void * phys_to_virt(unsigned long address) */ extern inline unsigned long virt_to_bus(volatile void * address) { +#ifndef CONFIG_64BIT return CPHYSADDR(address); +#else + return XPHYSADDR(address); +#endif } extern inline void * bus_to_virt(unsigned long address) { +#ifndef CONFIG_64BIT return (void *)KSEG0ADDR(address); +#else + return (void *)CKSEG0ADDR(address); +#endif } /* |