Xilinx KCU105 User Manual page 99

Pci express streaming data plane trd
Hide thumbs Also See for KCU105:
Table of Contents

Advertisement

Table D-1: APIs Provided by the XDMA Driver (Cont'd)
API Prototype
int
xlnx_data_frag_io (
ps_pcie_dma_chann_desc
_t *ptr_chan_desc,
unsigned char *
addr_buf,
addr_type_t at,
size_t sz,
func_ptr_dma_chann_cb
k_noblock cbk,
unsigned short uid,
bool last_frag,
void *ptr_user_data);
PCIe Streaming Data Plane TRD
UG920 (v2017.1) June 01, 2017
Appendix D:
Details
This API is invoked to
transfer a data fragment
across a PCIe link. A
channel lock has to be
held while invoking this
API. For a multi-fragment
buffer, the channel lock
has to be held till all
fragments of buffer are
submitted to DMA.
The lock should not be
taken if the API is to be
invoked in a callback
context.
www.xilinx.com
APIs Provided by the XDMA Driver in Linux
Parameters
ptr_chann_desc –
Channel descriptor
pointer
addr_buf – Pointer to
start memory location for
DMA
at – Type of address
passed in parameter
addr_buf. Valid types can
be virtual memory
(VIRT_ADDR), physical
memory (PHYS_ADDR), or
physical memory inside
Endpoint
(EP_PHYS_ADDR)
sz – Length of data to be
transmitted/received
cbk – Callback registered
to notify completion of
DMA. An application can
unmap, or free buffers in
this callback. An
application can also
invoke the API to submit
new
buffer/buffer-fragments.
Callback is invoked by the
XDMA driver with channel
lock held. Can be NULL.
uid – UserId passed to
identify transactions
spanning multiple
(typically 2) DMA
channels. In a transaction
type of application, this
field is used to match
request/response. This
parameter can never be 0
and must be set to a
non-zero value even if the
field is unused.
last_frag – Set to true to
indicate the last fragment
of a buffer.
ptr_user_data – Pointer to
application-specific data
that is passed as a
parameter when callback
is invoked. Can be NULL.
Return
Returns XLNX_SUCCESS
on success. On failure, a
negative value is returned.
Check "/* Xilinx DMA
driver status messages */"
in
ps_pcie_dma_driver.
h for more information on
error codes.
99
Send Feedback

Advertisement

Table of Contents
loading

Table of Contents