summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-01-31 21:34:07 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-01-31 21:34:07 +0000
commit077c6a5e5f7362107703d65bf600183f0a221226 (patch)
tree3d8a979d64fe33efffe6606724cbc3f4504b8e85 /include/asm-mips64
parent0905f0b7655975c9dcb586e276b858e5b82c5749 (diff)
Check in the bus_to_virt/virt_to_bus changes to get the Qlogic driver
working. Ralf to let me know if this will work for now, or he wants me to implement one of the other two alternatives we discussed.
Diffstat (limited to 'include/asm-mips64')
-rw-r--r--include/asm-mips64/io.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-mips64/io.h b/include/asm-mips64/io.h
index 382627d5b..6fc3355e4 100644
--- a/include/asm-mips64/io.h
+++ b/include/asm-mips64/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.6 2000/01/27 23:45:30 ralf Exp $
+/* $Id: io.h,v 1.7 2000/01/29 01:42:28 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -84,18 +84,20 @@ extern inline void * phys_to_virt(unsigned long address)
extern void * ioremap(unsigned long phys_addr, unsigned long size);
extern void iounmap(void *addr);
+#define BRIDGE_DIRECT_MAPPED_BASE 0xa200000000000000ull
+
/*
* IO bus memory addresses are also 1:1 with the physical address
* This simplistic model doesn't hold for the Origin.
*/
extern inline unsigned long virt_to_bus(volatile void * address)
{
- return (unsigned long)address - PAGE_OFFSET;
+ return (((unsigned long)address - PAGE_OFFSET)|BRIDGE_DIRECT_MAPPED_BASE);
}
extern inline void * bus_to_virt(unsigned long address)
{
- return (void *)(address + PAGE_OFFSET);
+ return (void *)((address & ~BRIDGE_DIRECT_MAPPED_BASE) + PAGE_OFFSET);
}
/*