patch-2.1.89 linux/include/asm-alpha/pyxis.h

Next file: linux/include/asm-alpha/unistd.h
Previous file: linux/include/asm-alpha/irq.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.88/linux/include/asm-alpha/pyxis.h linux/include/asm-alpha/pyxis.h
@@ -1,6 +1,7 @@
 #ifndef __ALPHA_PYXIS__H__
 #define __ALPHA_PYXIS__H__
 
+#include <linux/config.h> /* CONFIG_ALPHA_RUFFIAN. */
 #include <linux/types.h>
 
 /*
@@ -178,6 +179,20 @@
  * Translate physical memory address as seen on (PCI) bus into
  * a kernel virtual address and vv.
  */
+
+#if defined(CONFIG_ALPHA_RUFFIAN)
+/* Ruffian doesn't do 1G PCI window.  */
+
+extern inline unsigned long virt_to_bus(void * address)
+{
+	return virt_to_phys(address);
+}
+
+extern inline void * bus_to_virt(unsigned long address)
+{
+	return phys_to_virt(address);
+}
+#else
 extern inline unsigned long virt_to_bus(void * address)
 {
 	return virt_to_phys(address) + PYXIS_DMA_WIN_BASE;
@@ -187,6 +202,7 @@
 {
 	return phys_to_virt(address - PYXIS_DMA_WIN_BASE);
 }
+#endif /* RUFFIAN */
 
 /*
  * I/O functions:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov