aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/dma_64.c
diff options
context:
space:
mode:
authorHeiko J Schick <schihei@de.ibm.com>2005-11-16 08:56:43 +0100
committerPaul Mackerras <paulus@samba.org>2006-01-09 14:49:06 +1100
commitd7a301033f1990188f65abf4fe8e5b90ef0e3888 (patch)
tree5df64f9e06049e6006e6a124dc6fa4953d6e42b9 /arch/powerpc/kernel/dma_64.c
parent401d1f029bebb7153ca704997772113dc36d9527 (diff)
downloadlinux-d7a301033f1990188f65abf4fe8e5b90ef0e3888.tar.gz
[PATCH] powerpc: IBMEBUS bus support
This patch adds the necessary core bus support used by device drivers that sit on the IBM GX bus on modern pSeries machines like the Galaxy infiniband for example. It provide transparent DMA ops (the low level driver works with virtual addresses directly) along with a simple bus layer using the Open Firmware matching routines. Signed-off-by: Heiko J Schick <schickhj@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/dma_64.c')
-rw-r--r--arch/powerpc/kernel/dma_64.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/dma_64.c b/arch/powerpc/kernel/dma_64.c
index 7c3419656ccce..36aaa7663f028 100644
--- a/arch/powerpc/kernel/dma_64.c
+++ b/arch/powerpc/kernel/dma_64.c
@@ -10,6 +10,7 @@
/* Include the busses we support */
#include <linux/pci.h>
#include <asm/vio.h>
+#include <asm/ibmebus.h>
#include <asm/scatterlist.h>
#include <asm/bug.h>
@@ -23,6 +24,10 @@ static struct dma_mapping_ops *get_dma_ops(struct device *dev)
if (dev->bus == &vio_bus_type)
return &vio_dma_ops;
#endif
+#ifdef CONFIG_IBMEBUS
+ if (dev->bus == &ibmebus_bus_type)
+ return &ibmebus_dma_ops;
+#endif
return NULL;
}
@@ -47,6 +52,10 @@ int dma_set_mask(struct device *dev, u64 dma_mask)
if (dev->bus == &vio_bus_type)
return -EIO;
#endif /* CONFIG_IBMVIO */
+#ifdef CONFIG_IBMEBUS
+ if (dev->bus == &ibmebus_bus_type)
+ return -EIO;
+#endif
BUG();
return 0;
}