PDK API Guide for J721E
csitx_drvUdma.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2020
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the
15  * distribution.
16  *
17  * Neither the name of Texas Instruments Incorporated nor the names of
18  * its contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
47 #ifndef CSITX_UDMA_H_
48 #define CSITX_UDMA_H_
49 
50 /* ========================================================================== */
51 /* Include Files */
52 /* ========================================================================== */
53 #include <csitx_drvPriv.h>
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 /* ========================================================================== */
60 /* Macros & Typedefs */
61 /* ========================================================================== */
62 /* PSIL Source Tag */
63 #define CSITX_DRV_PSI_SRC_TAG ((uint32_t)0x4)
64 /* PSIL Destination Tag */
65 #define CSITX_DRV_PSI_DEST_TAG ((uint32_t)0x8)
66 
67 /* ========================================================================== */
68 /* Structure Declarations */
69 /* ========================================================================== */
70 
71 /* ========================================================================== */
72 /* Global Variables */
73 /* ========================================================================== */
74 
75 /* None */
76 
77 /* ========================================================================== */
78 /* Internal/Private Function Declarations */
79 /* ========================================================================== */
80 
81 /* None */
82 
83 /* ========================================================================== */
84 /* Function Declarations */
85 /* ========================================================================== */
87 
89  CsitxDrv_InstObj *instObj);
90 
92 
93 int32_t CsitxDrv_udmaTxTrpdInit(Udma_ChHandle txChHandle,
94  uint8_t *pTrpdMem,
95  const uint32_t *destBuf,
96  const Csitx_ChCfg *chCfg,
97  uint32_t chIdx);
98 
99 void CsitxDrv_udmaCQEventCb(Udma_EventHandle eventHandle,
100  uint32_t eventType,
101  void *appData);
102 
103 #if defined (SOC_J721E)
104 void CsitxDrv_udmaTDCEventCb(Udma_EventHandle eventHandle,
105  uint32_t eventType,
106  void *appData);
107 #endif
108 
109 void CsitxDrv_cacheWb(const void *addr, int32_t size);
110 
111 void CsitxDrv_cacheInv(const void * addr, int32_t size);
112 
113 uint8_t* CsitxDrv_getTrpdMemAddr(uint32_t chIdx, uint32_t qCnt);
114 /* ========================================================================== */
115 /* Static Function Definitions */
116 /* ========================================================================== */
117 
118 /* None */
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif /* #ifndef CSITX_UDMA_H_ */
125 
126 /* @} */
int32_t CsitxDrv_clearUdmaParams(CsitxDrv_InstObj *instObj)
CSITX Driver Instance Object.
Definition: csitx_drvPriv.h:414
int32_t CsitxDrv_udmaTxTrpdInit(Udma_ChHandle txChHandle, uint8_t *pTrpdMem, const uint32_t *destBuf, const Csitx_ChCfg *chCfg, uint32_t chIdx)
int32_t CsitxDrv_setUdmaParams(CsitxDrv_CommonObj *txObj, CsitxDrv_InstObj *instObj)
void CsitxDrv_cacheWb(const void *addr, int32_t size)
void CsitxDrv_udmaCQEventCb(Udma_EventHandle eventHandle, uint32_t eventType, void *appData)
CSITX Driver Channel Object.
Definition: csitx_drvPriv.h:349
uint64_t addr
Definition: csl_udmap_tr.h:216
CSITX Driver capture APIs.
void CsitxDrv_cacheInv(const void *addr, int32_t size)
Definition: csitx_drvPriv.h:467
uint8_t * CsitxDrv_getTrpdMemAddr(uint32_t chIdx, uint32_t qCnt)
Structure containing Channels configurations.
Definition: csitx.h:176
uint16_t size
Definition: tisci_boardcfg.h:112
int32_t CsitxDrv_setDMACfgParams(CsitxDrv_ChObj *chObj)