diff options
author | Martyn Welch <martyn.welch@gefanuc.com> | 2009-08-11 17:44:56 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:11 -0700 |
commit | 42fb503122d8cd428b5b1078bd473847ca2b206c (patch) | |
tree | ad3ed37190f00556b30e489c863753eabedbba3a /drivers/staging/vme/vme_bridge.h | |
parent | 400822fec46ce69d2ba7692689a1689653f7b847 (diff) | |
download | op-kernel-dev-42fb503122d8cd428b5b1078bd473847ca2b206c.zip op-kernel-dev-42fb503122d8cd428b5b1078bd473847ca2b206c.tar.gz |
Staging: vme: add VME Location Monitor management mechanism
Extend the image and DMA channel resource management methods to control the
location monitor resource. The location monitor should be controlled as it can
only be used at a single location at a time.
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.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.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/staging/vme/vme_bridge.h b/drivers/staging/vme/vme_bridge.h index b6f694a..e43cc19 100644 --- a/drivers/staging/vme/vme_bridge.h +++ b/drivers/staging/vme/vme_bridge.h @@ -66,6 +66,15 @@ struct vme_dma_resource { struct list_head running; }; +struct vme_lm_resource { + struct list_head list; + struct vme_bridge *parent; + struct mutex mtx; + int locked; + int number; + int monitors; +}; + struct vme_bus_error { struct list_head list; unsigned long long address; @@ -97,6 +106,7 @@ struct vme_bridge { struct list_head master_resources; struct list_head slave_resources; struct list_head dma_resources; + struct list_head lm_resources; struct list_head vme_errors; /* List for errors generated on VME */ @@ -144,10 +154,12 @@ struct vme_bridge { int (*generate_irq) (int, int); /* Location monitor functions */ - int (*lm_set) (unsigned long long, vme_address_t, vme_cycle_t); - int (*lm_get) (unsigned long long *, vme_address_t *, vme_cycle_t *); - int (*lm_attach) (int, void (*callback)(int)); - int (*lm_detach) (int); + int (*lm_set) (struct vme_lm_resource *, unsigned long long, + vme_address_t, vme_cycle_t); + int (*lm_get) (struct vme_lm_resource *, unsigned long long *, + vme_address_t *, vme_cycle_t *); + int (*lm_attach) (struct vme_lm_resource *, int, void (*callback)(int)); + int (*lm_detach) (struct vme_lm_resource *, int); /* CR/CSR space functions */ int (*slot_get) (void); |