PDK API Guide for J721E
csirx_drvUdma.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2018
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 CSIRX_UDMA_H_
48 #define CSIRX_UDMA_H_
49 
50 /* ========================================================================== */
51 /* Include Files */
52 /* ========================================================================== */
53 #include <csirx_drvPriv.h>
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 /* ========================================================================== */
60 /* Macros & Typedefs */
61 /* ========================================================================== */
62 /* PSIL Source Tag */
63 #define CSIRX_DRV_PSI_SRC_TAG ((uint32_t)0x0)
64 /* PSIL Destination Tag */
65 #define CSIRX_DRV_PSI_DEST_TAG ((uint32_t)0x1)
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 /* ========================================================================== */
86 int32_t CsirxDrv_getDMACfgParams(CsirxDrv_ChObj *chObj);
87 
88 int32_t CsirxDrv_setChUdmaParams(CsirxDrv_ChObj *chObj);
89 
90 int32_t CsirxDrv_clearUdmaParams(CsirxDrv_ChObj *chObj);
91 
92 int32_t CsirxDrv_udmaRxTrpdInit(Udma_ChHandle rxChHandle,
93  uint8_t *pTrpdMem,
94  const uint32_t *destBuf,
95  const Csirx_ChCfg *chCfg,
96  uint32_t chIdx);
97 
98 void CsirxDrv_udmaCQEventCb(Udma_EventHandle eventHandle,
99  uint32_t eventType,
100  void *appData);
101 
102 #if defined (SOC_J721E)
103 void CsirxDrv_udmaTDCEventCb(Udma_EventHandle eventHandle,
104  uint32_t eventType,
105  void *appData);
106 #endif
107 
108 void CsirxDrv_cacheWb(const void *addr, uint32_t size);
109 
110 void CsirxDrv_cacheInv(const void * addr, uint32_t size);
111 
112 uint8_t* CsirxDrv_getTrpdMemAddr(CsirxDrv_ChObj *chObj, uint32_t qCnt);
113 
121 int32_t CsirxDrv_udmaToFvid2ErrorMap(int32_t udmaErr);
122 
123 /* ========================================================================== */
124 /* Static Function Definitions */
125 /* ========================================================================== */
126 
127 /* None */
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif /* #ifndef CSIRX_UDMA_H_ */
134 
135 /* @} */
int32_t CsirxDrv_udmaToFvid2ErrorMap(int32_t udmaErr)
This function maps UDMA error status to corresponding FVID2 error status.
uint8_t * CsirxDrv_getTrpdMemAddr(CsirxDrv_ChObj *chObj, uint32_t qCnt)
int32_t CsirxDrv_getDMACfgParams(CsirxDrv_ChObj *chObj)
void CsirxDrv_cacheInv(const void *addr, uint32_t size)
CSIRX Driver capture APIs.
void CsirxDrv_udmaCQEventCb(Udma_EventHandle eventHandle, uint32_t eventType, void *appData)
uint64_t addr
Definition: csl_udmap_tr.h:216
void CsirxDrv_cacheWb(const void *addr, uint32_t size)
Structure containing Channels configurations.
Definition: csirx.h:263
int32_t CsirxDrv_udmaRxTrpdInit(Udma_ChHandle rxChHandle, uint8_t *pTrpdMem, const uint32_t *destBuf, const Csirx_ChCfg *chCfg, uint32_t chIdx)
int32_t CsirxDrv_clearUdmaParams(CsirxDrv_ChObj *chObj)
uint16_t size
Definition: tisci_boardcfg.h:112
int32_t CsirxDrv_setChUdmaParams(CsirxDrv_ChObj *chObj)