[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>
This commit is contained in:

committed by
Paul Mackerras

parent
401d1f029b
commit
d7a301033f
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user