diff options
author | Heiko J Schick <schihei@de.ibm.com> | 2005-11-16 02:56:43 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 22:49:06 -0500 |
commit | d7a301033f1990188f65abf4fe8e5b90ef0e3888 (patch) | |
tree | 5df64f9e06049e6006e6a124dc6fa4953d6e42b9 /arch/powerpc/kernel/dma_64.c | |
parent | 401d1f029bebb7153ca704997772113dc36d9527 (diff) |
[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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/dma_64.c b/arch/powerpc/kernel/dma_64.c index 7c3419656ccc..36aaa7663f02 100644 --- a/arch/powerpc/kernel/dma_64.c +++ b/arch/powerpc/kernel/dma_64.c | |||
@@ -10,6 +10,7 @@ | |||
10 | /* Include the busses we support */ | 10 | /* Include the busses we support */ |
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <asm/vio.h> | 12 | #include <asm/vio.h> |
13 | #include <asm/ibmebus.h> | ||
13 | #include <asm/scatterlist.h> | 14 | #include <asm/scatterlist.h> |
14 | #include <asm/bug.h> | 15 | #include <asm/bug.h> |
15 | 16 | ||
@@ -23,6 +24,10 @@ static struct dma_mapping_ops *get_dma_ops(struct device *dev) | |||
23 | if (dev->bus == &vio_bus_type) | 24 | if (dev->bus == &vio_bus_type) |
24 | return &vio_dma_ops; | 25 | return &vio_dma_ops; |
25 | #endif | 26 | #endif |
27 | #ifdef CONFIG_IBMEBUS | ||
28 | if (dev->bus == &ibmebus_bus_type) | ||
29 | return &ibmebus_dma_ops; | ||
30 | #endif | ||
26 | return NULL; | 31 | return NULL; |
27 | } | 32 | } |
28 | 33 | ||
@@ -47,6 +52,10 @@ int dma_set_mask(struct device *dev, u64 dma_mask) | |||
47 | if (dev->bus == &vio_bus_type) | 52 | if (dev->bus == &vio_bus_type) |
48 | return -EIO; | 53 | return -EIO; |
49 | #endif /* CONFIG_IBMVIO */ | 54 | #endif /* CONFIG_IBMVIO */ |
55 | #ifdef CONFIG_IBMEBUS | ||
56 | if (dev->bus == &ibmebus_bus_type) | ||
57 | return -EIO; | ||
58 | #endif | ||
50 | BUG(); | 59 | BUG(); |
51 | return 0; | 60 | return 0; |
52 | } | 61 | } |