summaryrefslogtreecommitdiff
path: root/drivers/staging/vme/vme_bridge.h
diff options
context:
space:
mode:
authorManohar Vanga <manohar.vanga@cern.ch>2011-08-10 11:33:46 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-23 15:08:09 -0700
commit7f58f0255aec0b933e0b26ef64d3d533c362a3d3 (patch)
tree992b4c303e3f15cea1976b6c700ec71335b406f9 /drivers/staging/vme/vme_bridge.h
parent34a678110ac5d2f1b694c8b9df5cccb1a2607721 (diff)
staging: vme: make [alloc|free]_consistent bridge specific
Make PCI dependent functions ([alloc|free]_consistent() in 'vme.c') bridge specific. By removing the dependency of the VME bridge framework on PCI, this patch allows for addition of non-PCI based VME bridges. Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch> Acked-by: Martyn Welch <martyn.welch@ge.com> Acked-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vme/vme_bridge.h')
-rw-r--r--drivers/staging/vme/vme_bridge.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/staging/vme/vme_bridge.h b/drivers/staging/vme/vme_bridge.h
index 4c6ec31b01db..a9084f0f34e7 100644
--- a/drivers/staging/vme/vme_bridge.h
+++ b/drivers/staging/vme/vme_bridge.h
@@ -98,8 +98,6 @@ struct vme_irq {
/* This structure stores all the information about one bridge
* The structure should be dynamically allocated by the driver and one instance
* of the structure should be present for each VME chip present in the system.
- *
- * Currently we assume that all chips are PCI-based
*/
struct vme_bridge {
char name[VMENAMSIZ];
@@ -112,7 +110,7 @@ struct vme_bridge {
struct list_head vme_errors; /* List for errors generated on VME */
/* Bridge Info - XXX Move to private structure? */
- struct device *parent; /* Generic device struct (pdev->dev for PCI) */
+ struct device *parent; /* Parent device (eg. pdev->dev for PCI) */
void *driver_priv; /* Private pointer for the bridge driver */
struct device dev[VME_SLOTS_MAX]; /* Device registered with
@@ -165,6 +163,12 @@ struct vme_bridge {
/* CR/CSR space functions */
int (*slot_get) (struct vme_bridge *);
+
+ /* Bridge parent interface */
+ void *(*alloc_consistent)(struct device *dev, size_t size,
+ dma_addr_t *dma);
+ void (*free_consistent)(struct device *dev, size_t size,
+ void *vaddr, dma_addr_t dma);
};
void vme_irq_handler(struct vme_bridge *, int, int);