summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/io.h
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2012-10-17 08:57:13 -0700
committerTom Rini <trini@ti.com>2012-10-17 08:57:13 -0700
commitd1ff690612415470a681787c029803952142043d (patch)
tree09a7a42be56797aa57abefc8f464bffa1ecb16da /arch/mips/include/asm/io.h
parentff04f6d1224d8952b566b8671222151495883073 (diff)
parent6b2eba1b7cd661fc6b2b0e0d4d039d1c299e2e07 (diff)
downloadblackbird-obmc-uboot-d1ff690612415470a681787c029803952142043d.tar.gz
blackbird-obmc-uboot-d1ff690612415470a681787c029803952142043d.zip
Merge branch 'master' of git://git.denx.de/u-boot-mips
Diffstat (limited to 'arch/mips/include/asm/io.h')
-rw-r--r--arch/mips/include/asm/io.h16
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
}
/*
OpenPOWER on IntegriCloud