PDK API Guide for AM64x
udma_osal.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2018
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 
48 #ifndef UDMA_OSAL_H_
49 #define UDMA_OSAL_H_
50 
51 /* ========================================================================== */
52 /* Include Files */
53 /* ========================================================================== */
54 
55 /* None */
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 /* ========================================================================== */
62 /* Macros & Typedefs */
63 /* ========================================================================== */
64 
70 typedef uintptr_t (*Udma_OsalDisableAllIntrFxn)(void);
71 
77 typedef void (*Udma_OsalRestoreAllIntrFxn)(uintptr_t cookie);
78 
84 typedef void (*Udma_OsalDisableIntrFxn)(uint32_t coreIntrNum);
85 
91 typedef void * (*Udma_OsalMutexCreateFxn)(void);
92 
98 typedef void (*Udma_OsalMutexDeleteFxn)(void *mutexHandle);
99 
105 typedef void (*Udma_OsalMutexLockFxn)(void *mutexHandle);
106 
112 typedef void (*Udma_OsalMutexUnlockFxn)(void *mutexHandle);
113 
119 typedef void (*Udma_OsalIsrFxn)(uintptr_t arg);
120 
131 typedef void *(*Udma_OsalRegisterIntrFxn)(Udma_OsalIsrFxn isrFxn,
132  uint32_t coreIntrNum,
133  uint32_t intrPriority,
134  void *arg);
135 
141 typedef void (*Udma_OsalUnRegisterIntrFxn)(void *hwiHandle);
142 
149 typedef void (*Udma_OsalCacheInv)(const void *addr, int32_t size);
150 
157 typedef void (*Udma_OsalCacheWb)(const void *addr, int32_t size);
158 
159 /* ========================================================================== */
160 /* Structure Declarations */
161 /* ========================================================================== */
162 
166 typedef struct
167 {
188 } Udma_OsalPrms;
189 
197 typedef struct
198 {
204 
205 /* ========================================================================== */
206 /* Function Declarations */
207 /* ========================================================================== */
208 
225 int32_t Udma_osalSetCachePrms(const Udma_OsalCachePrms *cachePrms);
226 
227 /*
228  * Structure Init functions
229  */
236 void UdmaOsalPrms_init(Udma_OsalPrms *osalPrms);
237 
245 
246 /* ========================================================================== */
247 /* Static Function Definitions */
248 /* ========================================================================== */
249 
250 /* None */
251 
252 /* ========================================================================== */
253 /* Internal/Private Structure Declarations */
254 /* ========================================================================== */
255 
256 /* None */
257 
258 #ifdef __cplusplus
259 }
260 #endif
261 
262 #endif /* #ifndef UDMA_OSAL_H_ */
263 
264 /* @} */
Udma_OsalDisableIntrFxn disableIntr
Definition: udma_osal.h:172
Udma_OsalMutexDeleteFxn deleteMutex
Definition: udma_osal.h:177
Udma_OsalCacheInv cacheInv
Definition: udma_osal.h:199
void UdmaOsalCachePrms_init(Udma_OsalCachePrms *cachePrms)
Udma_OsalCachePrms structure init function.
void(* Udma_OsalCacheInv)(const void *addr, int32_t size)
UDMA OSAL cache invalidate function prototype.
Definition: udma_osal.h:149
UDMA driver OSAL cache function pointers.
Definition: udma_osal.h:197
void(* Udma_OsalCacheWb)(const void *addr, int32_t size)
UDMA OSAL cache writeback function prototype.
Definition: udma_osal.h:157
Udma_OsalCacheWb cacheWb
Definition: udma_osal.h:201
Udma_OsalDisableAllIntrFxn disableAllIntr
Definition: udma_osal.h:168
Udma_OsalRestoreAllIntrFxn restoreAllIntr
Definition: udma_osal.h:170
void(* Udma_OsalIsrFxn)(uintptr_t arg)
UDMA OSAL ISR callback function prototype.
Definition: udma_osal.h:119
void(* Udma_OsalDisableIntrFxn)(uint32_t coreIntrNum)
UDMA OSAL intr disable function prototype.
Definition: udma_osal.h:84
uintptr_t(* Udma_OsalDisableAllIntrFxn)(void)
UDMA OSAL intr disable function prototype.
Definition: udma_osal.h:70
void UdmaOsalPrms_init(Udma_OsalPrms *osalPrms)
Udma_OsalPrms structure init function.
void *(* Udma_OsalRegisterIntrFxn)(Udma_OsalIsrFxn isrFxn, uint32_t coreIntrNum, uint32_t intrPriority, void *arg)
UDMA OSAL ISR register function prototype.
Definition: udma_osal.h:131
void(* Udma_OsalMutexLockFxn)(void *mutexHandle)
UDMA OSAL mutex lock function prototype.
Definition: udma_osal.h:105
Udma_OsalUnRegisterIntrFxn unRegisterIntr
Definition: udma_osal.h:186
int32_t Udma_osalSetCachePrms(const Udma_OsalCachePrms *cachePrms)
This API sets the OSAL cache paramaters incase user needs to override the default cache API.
void(* Udma_OsalUnRegisterIntrFxn)(void *hwiHandle)
UDMA OSAL ISR unregister function prototype.
Definition: udma_osal.h:141
void(* Udma_OsalMutexUnlockFxn)(void *mutexHandle)
UDMA OSAL mutex lock function prototype.
Definition: udma_osal.h:112
Udma_OsalMutexCreateFxn createMutex
Definition: udma_osal.h:175
uint64_t addr
Definition: csl_bcdma.h:1291
Udma_OsalMutexLockFxn lockMutex
Definition: udma_osal.h:179
void *(* Udma_OsalMutexCreateFxn)(void)
UDMA OSAL mutex create function prototype to protect critical section.
Definition: udma_osal.h:91
void(* Udma_OsalRestoreAllIntrFxn)(uintptr_t cookie)
UDMA OSAL intr restore function prototype.
Definition: udma_osal.h:77
uint16_t size
Definition: tisci_boardcfg.h:112
void(* Udma_OsalMutexDeleteFxn)(void *mutexHandle)
UDMA OSAL mutex delete function prototype.
Definition: udma_osal.h:98
UDMA driver OSAL function pointers.
Definition: udma_osal.h:166
Udma_OsalRegisterIntrFxn registerIntr
Definition: udma_osal.h:184
Udma_OsalMutexUnlockFxn unlockMutex
Definition: udma_osal.h:181