02.08.2013 Views

P4080 PCIe Adapter SDK User Guide Production Release

P4080 PCIe Adapter SDK User Guide Production Release

P4080 PCIe Adapter SDK User Guide Production Release

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

Freescale Semiconductor<br />

u32 nlnda;<br />

u32 bcount;<br />

u32 rsvd;<br />

s_attr – Source transaction attributes<br />

s_addr – Source address of the DMA transfer<br />

d_attr – Destination transaction attributes<br />

d_addr – Destination attributes of the DMA transfer<br />

nlndea – Points to the next link descriptor in memory. After the DMA controller reads the<br />

link descriptor from memory, this field is loaded into the extended next link descriptor<br />

address register.<br />

nlnda – Points to the next link descriptor in memory. After the DMA controller reads the<br />

link descriptor from memory, this field is loaded into the next link descriptor address<br />

register.<br />

bcount – Contains the number of bytes to transfer<br />

rsvd – Reserved field<br />

/**<br />

* API: dma_ring_free – <strong>Release</strong> memory allocated for DMA ring.<br />

*<br />

* @dring – Pointer to the DMA ring of type “struct dma_ring”<br />

*<br />

* @return – SUCCESS (0) on successful cleanup, otherwise ERROR (1)<br />

*/<br />

The prototype of this API is as follows.<br />

int dma_ring_free(struct dma_ring *dring);<br />

dring – Pointer to DMA ring that needs to be freed. This memory is taken from the DMA<br />

memory (64MB) on <strong>P4080</strong>.<br />

/**<br />

* API: dma_ring_enq – Enqueues a DMA job to the DMA ring. It picks<br />

© Freescale Semiconductor, Inc., 2011. All rights reserved.<br />

Freescale Confidential Proprietary Page 64

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!