Electronic Components Datasheet Search
  English  ▼

X  

UM0851 Datasheet(PDF) 170 Page - STMicroelectronics

Part # UM0851
Description  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 Datasheet(HTML) 170 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 166Page - STMicroelectronics UM0851 Datasheet HTML 167Page - STMicroelectronics UM0851 Datasheet HTML 168Page - STMicroelectronics UM0851 Datasheet HTML 169Page - STMicroelectronics UM0851 Datasheet HTML 170Page - STMicroelectronics UM0851 Datasheet HTML 171Page - STMicroelectronics UM0851 Datasheet HTML 172Page - STMicroelectronics UM0851 Datasheet HTML 173Page - STMicroelectronics UM0851 Datasheet HTML 174Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 170 / 245 page
background image
Accelerator engine device drivers
UM0851
170/245
Doc ID 16604 Rev 2
Terminate DMA transfer
In some cases, DMA transfer has to be stopped due to some error condition occurring in the
client driver. This can be done using the following function.
/* It can't be called directly, call it using chan pointer:
chan->device->device_terminate_all(chan); */
void device_terminate_all(struct dma_chan *chan);
Client un-registration
After all the transfers are over, the client must free the channels so that they can be used by
some other user. For this client must un-registered itself. This can be done by the following
call:
dma_async_client_unregister(&dma_client1);
This will call dma_event() with status parameter set as DMA_RESOURCE_REMOVED.
DMA usage example
The following example transfers 100 bytes from memory to the tx_register of the skull driver.
#include <linux/spr_dmac_pl080.h>
struct dma_chan *chan;
static int src_buf[100];
struct scatterlist *sg;
u32 sg_len;
dma_cookie_t cookie;
struct dw_dma_slave dma_slave = {
.src_master = DMA_MASTER_MEMORY;
.dest_master = DMA_MASTER_SKULL;
.slave.tx_reg = (dma_addr_t)skull_tx_reg;
.slave.rx_reg = (dma_addr_t)skull_rx_reg;
.slave.reg_width = DMA_SLAVE_WIDTH_32BIT;
.cfg = DWC_CFG_FLOW_CTRL(DMA_MEMORY_TO_PERIPHERAL) |
DWC_CFG_DEST_RQID(DMA_REQ_SKULL_TX);
.ctl = DWC_CTL_USER_MODE | DWC_CTL_NON_BUFFERABLE |
DWC_CTL_NON_CACHEABLE | DWC_CTL_SRC_ADDR_INC |
DWC_CTL_DEST_BURST(BURST_8) | DWC_CTL_SRC_BURST(BURST_8) |
DWC_CTL_SRC_WIDTH(WIDTH_WORD);
}
struct dma_client dma_client = {
.event_callback = dma_event;
.slave = &dma_slave.slave;
}
static enum dma_state_client dma_event(struct dma_client *client, struct dma_chan
*chan, enum dma_state state);
void dma_xfer(void)
{
struct dma_async_tx_descriptor *tx;
u32 dma_addr;
dma_cap_set(DMA_SLAVE, dma_client.cap_mask);
/* Details of this function are not provided here.
* It will create a scatter list of 2 nodes */
sg_len = create_sg(sg, src_buf, 100);
dma_chan_get(chan);



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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