diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 15:39:02 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 15:39:02 +0200 |
commit | aa77677e0a288e08073620db5d2a31df83ca4788 (patch) | |
tree | 0d14b995a21c43f365d66b9ad101a334109fc4e4 /drivers/staging/vme/vme.h | |
parent | efb8d21b2c6db3497655cc6a033ae8a9883e4063 (diff) | |
parent | 43a3beb6da994549ec28a9f31727b997a025f958 (diff) | |
download | linux-aa77677e0a288e08073620db5d2a31df83ca4788.tar.gz linux-aa77677e0a288e08073620db5d2a31df83ca4788.tar.bz2 linux-aa77677e0a288e08073620db5d2a31df83ca4788.zip |
Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1519 commits)
staging: et131x: Remove redundant check and return statement
staging: et131x: Mainly whitespace changes to appease checkpatch
staging: et131x: Remove last of the forward declarations
staging: et131x: Remove even more forward declarations
staging: et131x: Remove yet more forward declarations
staging: et131x: Remove more forward declarations
staging: et131x: Remove forward declaration of et131x_adapter_setup
staging: et131x: Remove some forward declarations
staging: et131x: Remove unused rx_ring.recv_packet_pool
staging: et131x: Remove call to find pci pm capability
staging: et131x: Remove redundant et131x_reset_recv() call
staging: et131x: Remove unused rx_ring.recv_buffer_pool
Staging: bcm: Fix three initialization errors in InterfaceDld.c
Staging: bcm: Fix coding style issues in InterfaceDld.c
staging:iio:dac: Add AD5360 driver
staging:iio:trigger:bfin-timer: Fix compile error
Staging: vt6655: add some range checks before memcpy()
Staging: vt6655: whitespace fixes to iotcl.c
Staging: vt6656: add some range checks before memcpy()
Staging: vt6656: whitespace cleanups in ioctl.c
...
Fix up conflicts in:
- drivers/{Kconfig,Makefile}, drivers/staging/{Kconfig,Makefile}:
vg driver movement
- drivers/staging/brcm80211/brcmfmac/{dhd_linux.c,mac80211_if.c}:
driver removal vs now stale changes
- drivers/staging/rtl8192e/r8192E_core.c:
driver removal vs now stale changes
- drivers/staging/et131x/et131*:
driver consolidation into one file, tried to do fixups
Diffstat (limited to 'drivers/staging/vme/vme.h')
-rw-r--r-- | drivers/staging/vme/vme.h | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/drivers/staging/vme/vme.h b/drivers/staging/vme/vme.h index 4155d8c2a531..e3828badca61 100644 --- a/drivers/staging/vme/vme.h +++ b/drivers/staging/vme/vme.h @@ -88,22 +88,38 @@ struct vme_resource { extern struct bus_type vme_bus_type; +/* VME_MAX_BRIDGES comes from the type of vme_bus_numbers */ +#define VME_MAX_BRIDGES (sizeof(unsigned int)*8) +#define VME_MAX_SLOTS 32 + #define VME_SLOT_CURRENT -1 #define VME_SLOT_ALL -2 -struct vme_device_id { - int bus; - int slot; +/** + * Structure representing a VME device + * @id: The ID of the device (currently the bus and slot number) + * @bridge: Pointer to the bridge device this device is on + * @dev: Internal device structure + * @drv_list: List of devices (per driver) + * @bridge_list: List of devices (per bridge) + */ +struct vme_dev { + int num; + struct vme_bridge *bridge; + struct device dev; + struct list_head drv_list; + struct list_head bridge_list; }; struct vme_driver { struct list_head node; const char *name; - const struct vme_device_id *bind_table; - int (*probe) (struct device *, int, int); - int (*remove) (struct device *, int, int); - void (*shutdown) (void); - struct device_driver driver; + int (*match)(struct vme_dev *); + int (*probe)(struct vme_dev *); + int (*remove)(struct vme_dev *); + void (*shutdown)(void); + struct device_driver driver; + struct list_head devices; }; void *vme_alloc_consistent(struct vme_resource *, size_t, dma_addr_t *); @@ -112,7 +128,7 @@ void vme_free_consistent(struct vme_resource *, size_t, void *, size_t vme_get_size(struct vme_resource *); -struct vme_resource *vme_slave_request(struct device *, vme_address_t, +struct vme_resource *vme_slave_request(struct vme_dev *, vme_address_t, vme_cycle_t); int vme_slave_set(struct vme_resource *, int, unsigned long long, unsigned long long, dma_addr_t, vme_address_t, vme_cycle_t); @@ -120,7 +136,7 @@ int vme_slave_get(struct vme_resource *, int *, unsigned long long *, unsigned long long *, dma_addr_t *, vme_address_t *, vme_cycle_t *); void vme_slave_free(struct vme_resource *); -struct vme_resource *vme_master_request(struct device *, vme_address_t, +struct vme_resource *vme_master_request(struct vme_dev *, vme_address_t, vme_cycle_t, vme_width_t); int vme_master_set(struct vme_resource *, int, unsigned long long, unsigned long long, vme_address_t, vme_cycle_t, vme_width_t); @@ -132,7 +148,7 @@ unsigned int vme_master_rmw(struct vme_resource *, unsigned int, unsigned int, unsigned int, loff_t); void vme_master_free(struct vme_resource *); -struct vme_resource *vme_dma_request(struct device *, vme_dma_route_t); +struct vme_resource *vme_dma_request(struct vme_dev *, vme_dma_route_t); struct vme_dma_list *vme_new_dma_list(struct vme_resource *); struct vme_dma_attr *vme_dma_pattern_attribute(u32, vme_pattern_t); struct vme_dma_attr *vme_dma_pci_attribute(dma_addr_t); @@ -145,12 +161,12 @@ int vme_dma_list_exec(struct vme_dma_list *); int vme_dma_list_free(struct vme_dma_list *); int vme_dma_free(struct vme_resource *); -int vme_irq_request(struct device *, int, int, +int vme_irq_request(struct vme_dev *, int, int, void (*callback)(int, int, void *), void *); -void vme_irq_free(struct device *, int, int); -int vme_irq_generate(struct device *, int, int); +void vme_irq_free(struct vme_dev *, int, int); +int vme_irq_generate(struct vme_dev *, int, int); -struct vme_resource * vme_lm_request(struct device *); +struct vme_resource * vme_lm_request(struct vme_dev *); int vme_lm_count(struct vme_resource *); int vme_lm_set(struct vme_resource *, unsigned long long, vme_address_t, vme_cycle_t); @@ -160,9 +176,9 @@ int vme_lm_attach(struct vme_resource *, int, void (*callback)(int)); int vme_lm_detach(struct vme_resource *, int); void vme_lm_free(struct vme_resource *); -int vme_slot_get(struct device *); +int vme_slot_get(struct vme_dev *); -int vme_register_driver(struct vme_driver *); +int vme_register_driver(struct vme_driver *, unsigned int); void vme_unregister_driver(struct vme_driver *); |