Lines Matching +full:map +full:- +full:to +full:- +full:dma +full:- +full:channel
5 -------------------
9 achieved via a call to :c:func:`vme_register_driver`.
11 A pointer to a structure of type :c:type:`struct vme_driver <vme_driver>` must
12 be provided to the registration function. Along with the maximum number of
13 devices your driver is able to support.
17 element is a pointer to a string holding the device driver's name.
22 the number of devices probed to one:
24 .. code-block:: c
30 if (vdev->id.num >= USER_BUS_MAX)
35 The '.probe' element should contain a pointer to the probe routine. The
39 Here, the 'num' field refers to the sequential device ID for this specific
41 dev->bridge->num.
43 A function is also provided to unregister the driver from the VME core called
49 -------------------
53 succeeds, a non-zero value should be returned. A zero return value indicates
55 driver is called. The probe routine is passed a pointer to the devices
61 and/or dma channels (:c:func:`vme_dma_request`). Rather than allowing the device
62 driver to request a specific window or DMA channel (which may be used by a
63 different driver) the API allows a resource to be assigned based on the required
65 split into the VME address spaces that need to be accessed in 'aspace' and VME
71 should be used to identify the allocated resource when it is used. For DMA
73 transfers to be provided in the route attributes. This is typically VME-to-MEM
74 and/or MEM-to-VME, though some hardware can support VME-to-VME and MEM-to-MEM
78 Functions are also provided to free window allocations once they are no longer
80 and :c:func:`vme_dma_free`) should be passed the pointer to the resource
85 --------------
95 Once a master window has been assigned :c:func:`vme_master_set` can be used to
96 configure it and :c:func:`vme_master_get` to retrieve the current settings. The
105 The function :c:func:`vme_master_read` can be used to read from and
106 :c:func:`vme_master_write` used to write to configured master windows.
108 In addition to simple reads and writes, :c:func:`vme_master_rmw` is provided to
109 do a read-modify-write transaction. Parts of a VME window can also be mapped
114 -------------
125 Once a slave window has been assigned :c:func:`vme_slave_set` can be used to
126 configure it and :c:func:`vme_slave_get` to retrieve the current settings.
136 Functions are provided to allow the user to allocate
139 do not have to be used, other methods can be used to allocate a buffer, though
140 care must be taken to ensure that they are contiguous and accessible by the VME
147 Slave windows map local memory onto the VME bus, the standard methods for
151 DMA channels
152 ------------
154 The VME DMA transfer provides the ability to run link-list DMA transfers. The
155 API introduces the concept of DMA lists. Each DMA list is a link-list which can
156 be passed to a DMA controller. Multiple lists can be created, extended,
163 The function :c:func:`vme_new_dma_list` is provided to create and
164 :c:func:`vme_dma_list_free` to destroy DMA lists. Execution of a list will not
165 automatically destroy the list, thus enabling a list to be reused for repetitive
172 An item can be added to a list using :c:func:`vme_dma_list_add` (the source and
173 destination attributes need to be created before calling this function, this is
179 are not checked until an entry is added to a DMA list, the request
180 for a DMA channel purely checks the directions in which the
181 controller is expected to transfer data. As a result it is
182 possible for this call to return an error, for example if the
189 an item to a list. This is due to the diverse attributes required for each type
190 of source and destination. There are functions to create attributes for PCI, VME
193 - PCI source or destination: :c:func:`vme_dma_pci_attribute`
194 - VME source or destination: :c:func:`vme_dma_vme_attribute`
195 - Pattern source: :c:func:`vme_dma_pattern_attribute`
197 The function :c:func:`vme_dma_free_attribute` should be used to free an
209 ----------
211 The VME API provides functions to attach and detach callbacks to specific VME
219 The function :c:func:`vme_irq_request` can be used to attach and
220 :c:func:`vme_irq_free` to free a specific VME level and status ID combination.
222 pointer parameter is provided, the value of which is passed to the callback
227 .. code-block:: c
235 The function :c:func:`vme_irq_generate` can be used to generate a VME interrupt
240 -----------------
242 The VME API provides the following functionality to configure the location
249 The function :c:func:`vme_lm_request` is provided to request the use of a block
250 of location monitors and :c:func:`vme_lm_free` to free them after they are no
253 to determine how many locations are provided.
260 :c:func:`vme_lm_set` is provided to configure the location and mode of the
261 location monitor. The function :c:func:`vme_lm_get` can be used to retrieve
268 The function :c:func:`vme_lm_attach` enables a callback to be attached and
269 :c:func:`vme_lm_detach` allows on to be detached from each location monitor
273 .. code-block:: c
279 --------------
285 -------------
291 -------
293 .. kernel-doc:: drivers/staging/vme_user/vme.h
296 .. kernel-doc:: drivers/staging/vme_user/vme.c