| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 168 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 168 Page - STMicroelectronics |
|
168 / 245 page ![]() Accelerator engine device drivers UM0851 168/245 Doc ID 16604 Rev 2 Memory set Memory set is a important feature that is required a number of times. The routine is exported from the DMA driver. In this routine, synchronization issues are expected to be handled by the client driver. Firstly you need to prepare transfers, then assign any callback if required and then start the actual transfer. The routine can work with either the default configuration of the DMA driver or a configuration provided by the client (if the slave pointer in the client structure is non NULL). A transfer is prepared by the following call. /* chan: is a pointer to DMA channel allocated to client. dest: is destination memory address. value: is value to be set at dest. len: number of bytes to be copied. flags: if you don't want the DMA driver to call dma_unmap_single, for dest address, after completion of memset then you can pass DMA_COMPL_SKIP_DEST_UNMAP in flags parameter (for both bitwise OR is used). dma_async_tx_descriptor: It is the descriptor which contains the prepared transfer information. If must be non NULL for successful prepration of DMA transfer. */ struct dma_async_tx_descriptor * spear_prep_dma_memset(struct dma_chan *chan, dma_addr_t dest, int value, size_t len, unsigned long flags); /* It can't be called directly, call it using chan pointer: */ tx = chan->device->spear_prep_dma_memset(chan, dest, val, len, flags); Check the Start transfer section below for for details on starting the actual transfer. Peripheral to peripheral or memory to/from peripheral transfer Transfers involving peripherals are peripheral to peripheral and memory to/from peripheral transfers. The routine is exported from the DMA driver. Here, synchronization issues are to be handled by client driver. In this routine, synchronization issues are expected to be handled by the client driver. Firstly you need to prepare transfers, then assign any callback if required and then start the actual transfer. Transfers with peripherals always require you to pass the configuration, so the slave pointer in the client structure must be non NULL. A transfer is prepared by the following call. /* chan: is a pointer to DMA channel allocated to client. sgl: is a scatter list prepared by the client driver. Nodes of this scatter list are configured with the address of memory or address of another peripherals register, with which current peripheral wants to do transfer. This enables the user to perform scatter-gather feature of DMA (i.e. a single DMA transfer can transfer data to/from different memory buffers which are not present continuously in memory). sg_len: number of scatterlist nodes in sgl. direction: if direction is DMA_TO_DEVICE then data is transferred to address present in slave.tx_reg and if DMA_FROM_DEVICE then data is transferred to address in sgl. flags: if you don't want the DMA driver to call dma_unmap_single, for src and dest addresses, after completion of transfer then you can pass DMA_COMPL_SKIP_SRC_UNMAP or DMA_COMPL_SKIP_DEST_UNMAP in flags parameter (for both bitwise OR is used). dma_async_tx_descriptor: It is the descriptor which contains the prepared transfer information. It must not be NULL for successful preparation of DMA xfer. */ |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |