Skip to content

Commit

Permalink
[PATCH] powerpc: IBMEBUS bus support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko J Schick authored and Paul Mackerras committed Jan 9, 2006
1 parent 401d1f0 commit d7a3010
Show file tree
Hide file tree
Showing 5 changed files with 496 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,13 @@ config IBMVIO
bool
default y

config IBMEBUS
depends on PPC_PSERIES
bool "Support for GX bus based adapters"
default y
help
Bus device driver for GX bus based adapters.

config PPC_MPC106
bool
default n
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o
obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
obj-$(CONFIG_LPARCFG) += lparcfg.o
obj-$(CONFIG_IBMVIO) += vio.o
obj-$(CONFIG_IBMEBUS) += ibmebus.o
obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o
obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o
Expand Down
9 changes: 9 additions & 0 deletions arch/powerpc/kernel/dma_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -22,6 +23,10 @@ static struct dma_mapping_ops *get_dma_ops(struct device *dev)
#ifdef CONFIG_IBMVIO
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;
}
Expand All @@ -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;
}
Expand Down
Loading

0 comments on commit d7a3010

Please sign in to comment.