AM64x MCU+ SDK  11.02.00
udma.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018-2021 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
61 #ifndef UDMA_H_
62 #define UDMA_H_
63 
64 /* ========================================================================== */
65 /* Include Files */
66 /* ========================================================================== */
67 
68 #include <stdint.h>
69 
70 /* UDMA_SOC_CFG_* macros are defined udma_soc.h.
71  * So including this first
72  */
74 #include <drivers/udma/soc/udma_soc.h>
81 #include <drivers/udma/include/csl_udmap_cppi5.h>
82 #include <drivers/udma/include/csl_pktdma_cppi5.h>
84 
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
88 
89 /* ========================================================================== */
90 /* Macros & Typedefs */
91 /* ========================================================================== */
92 
93 
94 
95 /* ========================================================================== */
96 /* Function Declarations */
97 /* ========================================================================== */
98 
118 int32_t Udma_init(Udma_DrvHandle drvHandle, const Udma_InitPrms *initPrms);
119 
133 int32_t Udma_deinit(Udma_DrvHandle drvHandle);
134 
135 /*
136  * Structure Init functions
137  *
138  * Requirement: DOX_REQ_TAG(PDK-2600)
139  */
166 int32_t UdmaInitPrms_init(uint32_t instId, Udma_InitPrms *initPrms);
167 
183 uint64_t Udma_defaultVirtToPhyFxn(const void *virtAddr,
184  uint32_t chNum,
185  void *appData);
186 
202 void *Udma_defaultPhyToVirtFxn(uint64_t phyAddr,
203  uint32_t chNum,
204  void *appData);
205 
206 /* ========================================================================== */
207 /* Static Function Definitions */
208 /* ========================================================================== */
209 
210 /* None */
211 
212 /* ========================================================================== */
213 /* Internal/Private Structure Declarations */
214 /* ========================================================================== */
215 
216 /* None */
217 
218 #ifdef __cplusplus
219 }
220 #endif
221 
222 #endif /* #ifndef UDMA_H_ */
223 
Udma_deinit
int32_t Udma_deinit(Udma_DrvHandle drvHandle)
UDMA deinit function.
Udma_DrvHandle
struct Udma_DrvObjectInt * Udma_DrvHandle
UDMA driver handle.
Definition: udma_types.h:84
udma_ring.h
UDMA ring related parameters and API.
udma_utils.h
UDMA utility API to make TR, get TR descriptor memory requirement.
Udma_InitPrms
UDMA initialization parameters.
Definition: udma_types.h:729
udma_rm.h
UDMA RM related parameters and API.
udma_event.h
UDMA event related parameters and API.
udma_types.h
UDMA Low Level Driver API/interface data types file.
Udma_defaultVirtToPhyFxn
uint64_t Udma_defaultVirtToPhyFxn(const void *virtAddr, uint32_t chNum, void *appData)
Default virtual to physical translation function.
csl_udmap_tr.h
This file provides support for the UDMAP Transfer Request (TR) functionality.
Udma_init
int32_t Udma_init(Udma_DrvHandle drvHandle, const Udma_InitPrms *initPrms)
UDMA init function.
udma_ch.h
UDMA Channel related parameters and API.
UdmaInitPrms_init
int32_t UdmaInitPrms_init(uint32_t instId, Udma_InitPrms *initPrms)
Udma_InitPrms structure init function.
udma_flow.h
UDMA flow related parameters and API.
Udma_defaultPhyToVirtFxn
void * Udma_defaultPhyToVirtFxn(uint64_t phyAddr, uint32_t chNum, void *appData)
Default physical to virtual translation function.