patch-2.1.96 linux/include/asm-arm/io.h
Next file: linux/include/asm-arm/irq-no.h
Previous file: linux/include/asm-arm/hardware.h
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Sun Apr 12 11:42:16 1998
- Orig file:
v2.1.95/linux/include/asm-arm/io.h
- Orig date:
Tue Jan 20 16:39:42 1998
diff -u --recursive --new-file v2.1.95/linux/include/asm-arm/io.h linux/include/asm-arm/io.h
@@ -17,10 +17,20 @@
#include <asm/arch/io.h>
/* unsigned long virt_to_phys(void *x) */
-#define virt_to_phys(x) __virt_to_phys((unsigned long)(x))
+#define virt_to_phys(x) (__virt_to_phys((unsigned long)(x)))
/* void *phys_to_virt(unsigned long x) */
#define phys_to_virt(x) ((void *)(__phys_to_virt((unsigned long)(x))))
+
+/*
+ * Virtual view <-> DMA view memory address translations
+ * virt_to_bus: Used to translate the virtual address to an
+ * address suitable to be passed to set_dma_addr
+ * bus_to_virt: Used to convert an address for DMA operations
+ * to an address that the kernel can use.
+ */
+#define virt_to_bus(x) (__virt_to_bus((unsigned long)(x)))
+#define bus_to_virt(x) ((void *)(__bus_to_virt(x)))
/*
* These macros actually build the multi-value IO function prototypes
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov