Electronic Components Datasheet Search
  English  ▼

X  

UM0851 Datasheet(PDF) 169 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) 169 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 165Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 169 / 245 page
background image
UM0851
Accelerator engine device drivers
Doc ID 16604 Rev 2
169/245
struct dma_async_tx_descriptor * device_prep_slave_sg( struct dma_chan *chan, struct
scatterlist *sgl, unsigned int sg_len, enum dma_data_direction direction, unsigned
long flags);
/* It can't be called directly, call it using chan pointer */
tx = chan->device->device_prep_slave_sg(chan, sgl, sg_len, direction, flags);
Check the Start transfer section below for for details on starting the actual transfer.
Start transfer
Up until this point, DMA transfer has been prepared, using the previously described
routines, but actual transfer has not yet started (except the framework function call for
memcpy). Assigning a callback and submitting the dma_async_tx_descriptor for actual
transfer can be done as follows:
/*
tx: is struct dma_async_tx_descriptor * returned from transfer prepration functions.
A non negative value of cookie indicates success in starting transfer. On error
cookie is negative. */
static void dma_callback(void *param)
{
/* callback function to be called and transfer completion */
}
tx->callback = dma_callback;
tx->callback_param = param;
cookie = tx->tx_submit(tx);
Transfer completion notification
If callback is not assigned before submitting transfer, then completion of DMA transfer can
be checked by using the following function.
/*
chan: DMA channel
cookie: transaction identifier to check status of
last: returns last completed cookie of channel, can be passed as NULL
used: returns last issued cookie of channel, can be passed as NULL
If transfer is completed then DMA_SUCCESS or DMA_ERROR is returned else
DMA_IN_PROGRESS is returned. */
static inline enum dma_status dma_async_is_tx_complete(struct dma_chan *chan,
dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used);
If callback is assigned then callback is called with the parameter given by the user.
On completion of transfer you must update the amount of bytes transferred to the framework
using the following code.
cpu = get_cpu();
per_cpu_ptr(chan->local, cpu)->bytes_transferred += size;
per_cpu_ptr(chan->local, cpu)->memcpy_count++;
put_cpu();
In addition, you should decrement the usage count of channel per CPU using the following
call:
static inline void dma_chan_put(struct dma_chan *chan);
This lets the framework know the amount of data copied by the DMA driver and how many
channels each CPU is using.



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