blob: 89776fb3c8bd04c8fec2e922b4ff29e5f137b068 [file] [log] [blame]
Martyn Welch75a163c2016-10-21 22:15:27 +01001VME Device Drivers
2==================
Martyn Welchbf39f9a2009-08-28 11:28:56 +01003
4Driver registration
Martyn Welch75a163c2016-10-21 22:15:27 +01005-------------------
Martyn Welchbf39f9a2009-08-28 11:28:56 +01006
7As with other subsystems within the Linux kernel, VME device drivers register
8with the VME subsystem, typically called from the devices init routine. This is
Lucas De Marchi25985ed2011-03-30 22:57:33 -03009achieved via a call to the following function:
Martyn Welchbf39f9a2009-08-28 11:28:56 +010010
Martyn Welch75a163c2016-10-21 22:15:27 +010011.. code-block:: c
12
Martyn Welch76deefa2016-06-05 21:35:45 +010013 int vme_register_driver (struct vme_driver *driver, unsigned int ndevs);
Martyn Welchbf39f9a2009-08-28 11:28:56 +010014
15If driver registration is successful this function returns zero, if an error
16occurred a negative error code will be returned.
17
18A pointer to a structure of type 'vme_driver' must be provided to the
Martyn Welch76deefa2016-06-05 21:35:45 +010019registration function. Along with ndevs, which is the number of devices your
20driver is able to support. The structure is as follows:
Martyn Welchbf39f9a2009-08-28 11:28:56 +010021
Martyn Welch75a163c2016-10-21 22:15:27 +010022.. code-block:: c
23
Martyn Welchbf39f9a2009-08-28 11:28:56 +010024 struct vme_driver {
25 struct list_head node;
Manohar Vanga5d6abf32011-09-26 11:27:16 +020026 const char *name;
27 int (*match)(struct vme_dev *);
28 int (*probe)(struct vme_dev *);
29 int (*remove)(struct vme_dev *);
30 void (*shutdown)(void);
31 struct device_driver driver;
32 struct list_head devices;
33 unsigned int ndev;
Martyn Welchbf39f9a2009-08-28 11:28:56 +010034 };
35
Manohar Vanga5d6abf32011-09-26 11:27:16 +020036At the minimum, the '.name', '.match' and '.probe' elements of this structure
37should be correctly set. The '.name' element is a pointer to a string holding
38the device driver's name.
Martyn Welchbf39f9a2009-08-28 11:28:56 +010039
Martyn Welch76deefa2016-06-05 21:35:45 +010040The '.match' function allows control over which VME devices should be registered
41with the driver. The match function should return 1 if a device should be
Manohar Vanga5d6abf32011-09-26 11:27:16 +020042probed and 0 otherwise. This example match function (from vme_user.c) limits
43the number of devices probed to one:
Martyn Welchbf39f9a2009-08-28 11:28:56 +010044
Martyn Welch75a163c2016-10-21 22:15:27 +010045.. code-block:: c
46
Manohar Vanga5d6abf32011-09-26 11:27:16 +020047 #define USER_BUS_MAX 1
48 ...
49 static int vme_user_match(struct vme_dev *vdev)
50 {
51 if (vdev->id.num >= USER_BUS_MAX)
52 return 0;
53 return 1;
54 }
Manohar Vanga8f966dc2011-09-26 11:27:15 +020055
Manohar Vanga5d6abf32011-09-26 11:27:16 +020056The '.probe' element should contain a pointer to the probe routine. The
57probe routine is passed a 'struct vme_dev' pointer as an argument. The
58'struct vme_dev' structure looks like the following:
Manohar Vanga8f966dc2011-09-26 11:27:15 +020059
Martyn Welch75a163c2016-10-21 22:15:27 +010060.. code-block:: c
61
Manohar Vanga8f966dc2011-09-26 11:27:15 +020062 struct vme_dev {
Manohar Vangaa916a392011-09-26 11:27:17 +020063 int num;
Manohar Vanga8f966dc2011-09-26 11:27:15 +020064 struct vme_bridge *bridge;
65 struct device dev;
Manohar Vangaa916a392011-09-26 11:27:17 +020066 struct list_head drv_list;
67 struct list_head bridge_list;
Manohar Vanga8f966dc2011-09-26 11:27:15 +020068 };
69
Manohar Vangaa916a392011-09-26 11:27:17 +020070Here, the 'num' field refers to the sequential device ID for this specific
71driver. The bridge number (or bus number) can be accessed using
72dev->bridge->num.
Martyn Welchbf39f9a2009-08-28 11:28:56 +010073
74A function is also provided to unregister the driver from the VME core and is
75usually called from the device driver's exit routine:
76
Martyn Welch75a163c2016-10-21 22:15:27 +010077.. code-block:: c
78
Martyn Welchbf39f9a2009-08-28 11:28:56 +010079 void vme_unregister_driver (struct vme_driver *driver);
80
81
82Resource management
Martyn Welch75a163c2016-10-21 22:15:27 +010083-------------------
Martyn Welchbf39f9a2009-08-28 11:28:56 +010084
Manohar Vangaa916a392011-09-26 11:27:17 +020085Once a driver has registered with the VME core the provided match routine will
86be called the number of times specified during the registration. If a match
87succeeds, a non-zero value should be returned. A zero return value indicates
88failure. For all successful matches, the probe routine of the corresponding
89driver is called. The probe routine is passed a pointer to the devices
Martyn Welchbf39f9a2009-08-28 11:28:56 +010090device structure. This pointer should be saved, it will be required for
91requesting VME resources.
92
93The driver can request ownership of one or more master windows, slave windows
94and/or dma channels. Rather than allowing the device driver to request a
95specific window or DMA channel (which may be used by a different driver) this
96driver allows a resource to be assigned based on the required attributes of the
97driver in question:
98
Martyn Welch75a163c2016-10-21 22:15:27 +010099.. code-block:: c
100
Manohar Vanga8f966dc2011-09-26 11:27:15 +0200101 struct vme_resource * vme_master_request(struct vme_dev *dev,
Martyn Welch6af04b02011-12-01 17:06:29 +0000102 u32 aspace, u32 cycle, u32 width);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100103
Martyn Welch6af04b02011-12-01 17:06:29 +0000104 struct vme_resource * vme_slave_request(struct vme_dev *dev, u32 aspace,
105 u32 cycle);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100106
Martyn Welch6af04b02011-12-01 17:06:29 +0000107 struct vme_resource *vme_dma_request(struct vme_dev *dev, u32 route);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100108
Martyn Welch6af04b02011-12-01 17:06:29 +0000109For slave windows these attributes are split into the VME address spaces that
110need to be accessed in 'aspace' and VME bus cycle types required in 'cycle'.
111Master windows add a further set of attributes in 'width' specifying the
112required data transfer widths. These attributes are defined as bitmasks and as
113such any combination of the attributes can be requested for a single window,
114the core will assign a window that meets the requirements, returning a pointer
115of type vme_resource that should be used to identify the allocated resource
116when it is used. For DMA controllers, the request function requires the
117potential direction of any transfers to be provided in the route attributes.
118This is typically VME-to-MEM and/or MEM-to-VME, though some hardware can
119support VME-to-VME and MEM-to-MEM transfers as well as test pattern generation.
120If an unallocated window fitting the requirements can not be found a NULL
121pointer will be returned.
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100122
123Functions are also provided to free window allocations once they are no longer
124required. These functions should be passed the pointer to the resource provided
125during resource allocation:
126
Martyn Welch75a163c2016-10-21 22:15:27 +0100127.. code-block:: c
128
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100129 void vme_master_free(struct vme_resource *res);
130
131 void vme_slave_free(struct vme_resource *res);
132
133 void vme_dma_free(struct vme_resource *res);
134
135
136Master windows
Martyn Welch75a163c2016-10-21 22:15:27 +0100137--------------
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100138
139Master windows provide access from the local processor[s] out onto the VME bus.
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300140The number of windows available and the available access modes is dependent on
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100141the underlying chipset. A window must be configured before it can be used.
142
143
144Master window configuration
Martyn Welch75a163c2016-10-21 22:15:27 +0100145~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100146
147Once a master window has been assigned the following functions can be used to
148configure it and retrieve the current settings:
149
Martyn Welch75a163c2016-10-21 22:15:27 +0100150.. code-block:: c
151
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100152 int vme_master_set (struct vme_resource *res, int enabled,
Martyn Welch6af04b02011-12-01 17:06:29 +0000153 unsigned long long base, unsigned long long size, u32 aspace,
154 u32 cycle, u32 width);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100155
156 int vme_master_get (struct vme_resource *res, int *enabled,
Martyn Welch6af04b02011-12-01 17:06:29 +0000157 unsigned long long *base, unsigned long long *size, u32 *aspace,
158 u32 *cycle, u32 *width);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100159
160The address spaces, transfer widths and cycle types are the same as described
161under resource management, however some of the options are mutually exclusive.
162For example, only one address space may be specified.
163
164These functions return 0 on success or an error code should the call fail.
165
166
167Master window access
Martyn Welch75a163c2016-10-21 22:15:27 +0100168~~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100169
170The following functions can be used to read from and write to configured master
171windows. These functions return the number of bytes copied:
172
Martyn Welch75a163c2016-10-21 22:15:27 +0100173.. code-block:: c
174
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100175 ssize_t vme_master_read(struct vme_resource *res, void *buf,
176 size_t count, loff_t offset);
177
178 ssize_t vme_master_write(struct vme_resource *res, void *buf,
179 size_t count, loff_t offset);
180
181In addition to simple reads and writes, a function is provided to do a
182read-modify-write transaction. This function returns the original value of the
183VME bus location :
184
Martyn Welch75a163c2016-10-21 22:15:27 +0100185.. code-block:: c
186
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100187 unsigned int vme_master_rmw (struct vme_resource *res,
188 unsigned int mask, unsigned int compare, unsigned int swap,
189 loff_t offset);
190
191This functions by reading the offset, applying the mask. If the bits selected in
192the mask match with the values of the corresponding bits in the compare field,
193the value of swap is written the specified offset.
194
Dmitry Kalinkinc5ab1f72015-05-28 15:06:58 +0300195Parts of a VME window can be mapped into user space memory using the following
196function:
197
Martyn Welch75a163c2016-10-21 22:15:27 +0100198.. code-block:: c
199
Dmitry Kalinkinc5ab1f72015-05-28 15:06:58 +0300200 int vme_master_mmap(struct vme_resource *resource,
201 struct vm_area_struct *vma)
202
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100203
204Slave windows
Martyn Welch75a163c2016-10-21 22:15:27 +0100205-------------
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100206
207Slave windows provide devices on the VME bus access into mapped portions of the
208local memory. The number of windows available and the access modes that can be
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300209used is dependent on the underlying chipset. A window must be configured before
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100210it can be used.
211
212
213Slave window configuration
Martyn Welch75a163c2016-10-21 22:15:27 +0100214~~~~~~~~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100215
216Once a slave window has been assigned the following functions can be used to
217configure it and retrieve the current settings:
218
Martyn Welch75a163c2016-10-21 22:15:27 +0100219.. code-block:: c
220
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100221 int vme_slave_set (struct vme_resource *res, int enabled,
222 unsigned long long base, unsigned long long size,
Martyn Welch6af04b02011-12-01 17:06:29 +0000223 dma_addr_t mem, u32 aspace, u32 cycle);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100224
225 int vme_slave_get (struct vme_resource *res, int *enabled,
226 unsigned long long *base, unsigned long long *size,
Martyn Welch6af04b02011-12-01 17:06:29 +0000227 dma_addr_t *mem, u32 *aspace, u32 *cycle);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100228
229The address spaces, transfer widths and cycle types are the same as described
230under resource management, however some of the options are mutually exclusive.
231For example, only one address space may be specified.
232
233These functions return 0 on success or an error code should the call fail.
234
235
236Slave window buffer allocation
Martyn Welch75a163c2016-10-21 22:15:27 +0100237~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100238
239Functions are provided to allow the user to allocate and free a contiguous
240buffers which will be accessible by the VME bridge. These functions do not have
241to be used, other methods can be used to allocate a buffer, though care must be
242taken to ensure that they are contiguous and accessible by the VME bridge:
243
Martyn Welch75a163c2016-10-21 22:15:27 +0100244.. code-block:: c
245
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100246 void * vme_alloc_consistent(struct vme_resource *res, size_t size,
247 dma_addr_t *mem);
248
249 void vme_free_consistent(struct vme_resource *res, size_t size,
250 void *virt, dma_addr_t mem);
251
252
253Slave window access
Martyn Welch75a163c2016-10-21 22:15:27 +0100254~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100255
256Slave windows map local memory onto the VME bus, the standard methods for
257accessing memory should be used.
258
259
260DMA channels
Martyn Welch75a163c2016-10-21 22:15:27 +0100261------------
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100262
263The VME DMA transfer provides the ability to run link-list DMA transfers. The
264API introduces the concept of DMA lists. Each DMA list is a link-list which can
265be passed to a DMA controller. Multiple lists can be created, extended,
266executed, reused and destroyed.
267
268
269List Management
Martyn Welch75a163c2016-10-21 22:15:27 +0100270~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100271
272The following functions are provided to create and destroy DMA lists. Execution
273of a list will not automatically destroy the list, thus enabling a list to be
274reused for repetitive tasks:
275
Martyn Welch75a163c2016-10-21 22:15:27 +0100276.. code-block:: c
277
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100278 struct vme_dma_list *vme_new_dma_list(struct vme_resource *res);
279
280 int vme_dma_list_free(struct vme_dma_list *list);
281
282
283List Population
Martyn Welch75a163c2016-10-21 22:15:27 +0100284~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100285
286An item can be added to a list using the following function ( the source and
287destination attributes need to be created before calling this function, this is
288covered under "Transfer Attributes"):
289
Martyn Welch75a163c2016-10-21 22:15:27 +0100290.. code-block:: c
291
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100292 int vme_dma_list_add(struct vme_dma_list *list,
293 struct vme_dma_attr *src, struct vme_dma_attr *dest,
294 size_t count);
295
Martyn Welch75a163c2016-10-21 22:15:27 +0100296.. note::
297
298 The detailed attributes of the transfers source and destination
Martyn Welch4f723df2010-02-18 15:12:58 +0000299 are not checked until an entry is added to a DMA list, the request
300 for a DMA channel purely checks the directions in which the
301 controller is expected to transfer data. As a result it is
302 possible for this call to return an error, for example if the
303 source or destination is in an unsupported VME address space.
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100304
305Transfer Attributes
Martyn Welch75a163c2016-10-21 22:15:27 +0100306~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100307
308The attributes for the source and destination are handled separately from adding
309an item to a list. This is due to the diverse attributes required for each type
310of source and destination. There are functions to create attributes for PCI, VME
311and pattern sources and destinations (where appropriate):
312
313Pattern source:
314
Martyn Welch75a163c2016-10-21 22:15:27 +0100315.. code-block:: c
316
Martyn Welch6af04b02011-12-01 17:06:29 +0000317 struct vme_dma_attr *vme_dma_pattern_attribute(u32 pattern, u32 type);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100318
319PCI source or destination:
320
Martyn Welch75a163c2016-10-21 22:15:27 +0100321.. code-block:: c
322
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100323 struct vme_dma_attr *vme_dma_pci_attribute(dma_addr_t mem);
324
325VME source or destination:
326
Martyn Welch75a163c2016-10-21 22:15:27 +0100327.. code-block:: c
328
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100329 struct vme_dma_attr *vme_dma_vme_attribute(unsigned long long base,
Martyn Welch6af04b02011-12-01 17:06:29 +0000330 u32 aspace, u32 cycle, u32 width);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100331
332The following function should be used to free an attribute:
333
Martyn Welch75a163c2016-10-21 22:15:27 +0100334.. code-block:: c
335
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100336 void vme_dma_free_attribute(struct vme_dma_attr *attr);
337
338
339List Execution
Martyn Welch75a163c2016-10-21 22:15:27 +0100340~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100341
342The following function queues a list for execution. The function will return
343once the list has been executed:
344
Martyn Welch75a163c2016-10-21 22:15:27 +0100345.. code-block:: c
346
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100347 int vme_dma_list_exec(struct vme_dma_list *list);
348
349
350Interrupts
Martyn Welch75a163c2016-10-21 22:15:27 +0100351----------
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100352
353The VME API provides functions to attach and detach callbacks to specific VME
354level and status ID combinations and for the generation of VME interrupts with
355specific VME level and status IDs.
356
357
358Attaching Interrupt Handlers
Martyn Welch75a163c2016-10-21 22:15:27 +0100359~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100360
361The following functions can be used to attach and free a specific VME level and
362status ID combination. Any given combination can only be assigned a single
363callback function. A void pointer parameter is provided, the value of which is
364passed to the callback function, the use of this pointer is user undefined:
365
Martyn Welch75a163c2016-10-21 22:15:27 +0100366.. code-block:: c
367
Manohar Vanga8f966dc2011-09-26 11:27:15 +0200368 int vme_irq_request(struct vme_dev *dev, int level, int statid,
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100369 void (*callback)(int, int, void *), void *priv);
370
Manohar Vanga8f966dc2011-09-26 11:27:15 +0200371 void vme_irq_free(struct vme_dev *dev, int level, int statid);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100372
373The callback parameters are as follows. Care must be taken in writing a callback
374function, callback functions run in interrupt context:
375
Martyn Welch75a163c2016-10-21 22:15:27 +0100376.. code-block:: c
377
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100378 void callback(int level, int statid, void *priv);
379
380
381Interrupt Generation
Martyn Welch75a163c2016-10-21 22:15:27 +0100382~~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100383
384The following function can be used to generate a VME interrupt at a given VME
385level and VME status ID:
386
Martyn Welch75a163c2016-10-21 22:15:27 +0100387.. code-block:: c
388
Manohar Vanga8f966dc2011-09-26 11:27:15 +0200389 int vme_irq_generate(struct vme_dev *dev, int level, int statid);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100390
391
392Location monitors
Martyn Welch75a163c2016-10-21 22:15:27 +0100393-----------------
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100394
395The VME API provides the following functionality to configure the location
396monitor.
397
398
399Location Monitor Management
Martyn Welch75a163c2016-10-21 22:15:27 +0100400~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100401
402The following functions are provided to request the use of a block of location
403monitors and to free them after they are no longer required:
404
Martyn Welch75a163c2016-10-21 22:15:27 +0100405.. code-block:: c
406
Manohar Vanga8f966dc2011-09-26 11:27:15 +0200407 struct vme_resource * vme_lm_request(struct vme_dev *dev);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100408
409 void vme_lm_free(struct vme_resource * res);
410
411Each block may provide a number of location monitors, monitoring adjacent
412locations. The following function can be used to determine how many locations
413are provided:
414
Martyn Welch75a163c2016-10-21 22:15:27 +0100415.. code-block:: c
416
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100417 int vme_lm_count(struct vme_resource * res);
418
419
420Location Monitor Configuration
Martyn Welch75a163c2016-10-21 22:15:27 +0100421~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100422
423Once a bank of location monitors has been allocated, the following functions
424are provided to configure the location and mode of the location monitor:
425
Martyn Welch75a163c2016-10-21 22:15:27 +0100426.. code-block:: c
427
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100428 int vme_lm_set(struct vme_resource *res, unsigned long long base,
Martyn Welch6af04b02011-12-01 17:06:29 +0000429 u32 aspace, u32 cycle);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100430
431 int vme_lm_get(struct vme_resource *res, unsigned long long *base,
Martyn Welch6af04b02011-12-01 17:06:29 +0000432 u32 *aspace, u32 *cycle);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100433
434
435Location Monitor Use
Martyn Welch75a163c2016-10-21 22:15:27 +0100436~~~~~~~~~~~~~~~~~~~~
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100437
438The following functions allow a callback to be attached and detached from each
439location monitor location. Each location monitor can monitor a number of
440adjacent locations:
441
Martyn Welch75a163c2016-10-21 22:15:27 +0100442.. code-block:: c
443
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100444 int vme_lm_attach(struct vme_resource *res, int num,
Aaron Sierrafa54b322016-04-29 16:41:02 -0500445 void (*callback)(void *));
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100446
447 int vme_lm_detach(struct vme_resource *res, int num);
448
449The callback function is declared as follows.
450
Martyn Welch75a163c2016-10-21 22:15:27 +0100451.. code-block:: c
452
Aaron Sierrafa54b322016-04-29 16:41:02 -0500453 void callback(void *data);
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100454
455
456Slot Detection
Martyn Welch75a163c2016-10-21 22:15:27 +0100457--------------
Martyn Welchbf39f9a2009-08-28 11:28:56 +0100458
459This function returns the slot ID of the provided bridge.
460
Martyn Welch75a163c2016-10-21 22:15:27 +0100461.. code-block:: c
462
Martyn Welchd7729f02013-11-08 11:58:35 +0000463 int vme_slot_num(struct vme_dev *dev);
Martyn Welch978f47d2013-11-08 11:58:34 +0000464
465
466Bus Detection
Martyn Welch75a163c2016-10-21 22:15:27 +0100467-------------
Martyn Welch978f47d2013-11-08 11:58:34 +0000468
469This function returns the bus ID of the provided bridge.
470
Martyn Welch75a163c2016-10-21 22:15:27 +0100471.. code-block:: c
Martyn Welch978f47d2013-11-08 11:58:34 +0000472
Martyn Welch75a163c2016-10-21 22:15:27 +0100473 int vme_bus_num(struct vme_dev *dev);
Martyn Welch978f47d2013-11-08 11:58:34 +0000474