SDL API Guide for J721E
sdl_ip_mcrc.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 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  */
33 
34 #ifndef SDL_IP_MCRC_H_
35 #define SDL_IP_MCRC_H_
36 
37 #include <stddef.h>
38 #include <stdbool.h>
39 #include <sdl_mcrc.h>
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
61 /* Define SDL_TRUE/SDL_FALSE to go with uint32_t */
62 #ifndef SDL_TRUE
63 #define SDL_TRUE (1U)
64 #endif
65 
82 typedef uint32_t SDL_MCRC_IntrPriority_t;
83 
84 #define SDL_MCRC_INTR_PRIORITY_CH1_FAIL (0x1U)
85 
86 #define SDL_MCRC_INTR_PRIORITY_CH2_FAIL (0x2U)
87 
88 #define SDL_MCRC_INTR_PRIORITY_CH3_FAIL (0x3U)
89 
90 #define SDL_MCRC_INTR_PRIORITY_CH4_FAIL (0x4U)
91 
92 #define SDL_MCRC_INTR_PRIORITY_CH1_COMPRESSION_DONE (0x9U)
93 
94 #define SDL_MCRC_INTR_PRIORITY_CH2_COMPRESSION_DONE (0xaU)
95 
96 #define SDL_MCRC_INTR_PRIORITY_CH3_COMPRESSION_DONE (0xbU)
97 
98 #define SDL_MCRC_INTR_PRIORITY_CH4_COMPRESSION_DONE (0xcU)
99 
100 #define SDL_MCRC_INTR_PRIORITY_CH1_OVERRUN (0x11U)
101 
102 #define SDL_MCRC_INTR_PRIORITY_CH2_OVERRUN (0x12U)
103 
104 #define SDL_MCRC_INTR_PRIORITY_CH3_OVERRUN (0x13U)
105 
106 #define SDL_MCRC_INTR_PRIORITY_CH4_OVERRUN (0x14U)
107 
108 #define SDL_MCRC_INTR_PRIORITY_CH1_UNDERRUN (0x19U)
109 
110 #define SDL_MCRC_INTR_PRIORITY_CH2_UNDERRUN (0x1aU)
111 
112 #define SDL_MCRC_INTR_PRIORITY_CH3_UNDERRUN (0x1bU)
113 
114 #define SDL_MCRC_INTR_PRIORITY_CH4_UNDERRUN (0x1cU)
115 
116 #define SDL_MCRC_INTR_PRIORITY_CH1_TIMEOUT (0x21U)
117 
118 #define SDL_MCRC_INTR_PRIORITY_CH2_TIMEOUT (0x22U)
119 
120 #define SDL_MCRC_INTR_PRIORITY_CH3_TIMEOUT (0x23U)
121 
122 #define SDL_MCRC_INTR_PRIORITY_CH4_TIMEOUT (0x24U)
123 
124 /* @} */
125 
134 typedef uint32_t SDL_MCRC_DataBusMask_t;
135 
136 #define SDL_MCRC_DATA_BUS_ITCM_MASK (SDL_MCRC_MCRC_BUS_SEL_ITC_MEN_MASK)
137 
138 #define SDL_MCRC_DATA_BUS_DTCM_MASK (SDL_MCRC_MCRC_BUS_SEL_DTC_MEN_MASK)
139 
140 #define SDL_MCRC_DATA_BUS_VBUSM_MASK (SDL_MCRC_MCRC_BUS_SEL_MEN_MASK)
141 
142 #define SDL_MCRC_DATA_BUS_MASK_ALL (SDL_MCRC_MCRC_BUS_SEL_ITC_MEN_MASK | \
143  SDL_MCRC_MCRC_BUS_SEL_DTC_MEN_MASK | \
144  SDL_MCRC_MCRC_BUS_SEL_MEN_MASK)
145 
146 /* @} */
147 
148 /* @} */
149 
150 /* ========================================================================== */
151 /* Function Declarations */
152 /* ========================================================================== */
153 
173 int32_t SDL_MCRC_GetHighestPriorityIntrStatus(SDL_MCRC_InstType instance, uint32_t *pIntVecAddr);
195  uint32_t ctrlFlag,
196  SDL_MCRC_DataBusMask_t dataBusMask,
197  SDL_MCRC_DataBusMask_t busEnableMask);
198 
210 int32_t SDL_MCRC_getBaseaddr(SDL_MCRC_InstType instance,
211  uint32_t *baseAddr);
212 
232  uint32_t ctrlFlag,
233  SDL_MCRC_DataBusMask_t dataBusMask,
234  SDL_MCRC_DataBusMask_t busEnableMask);
235 /* @} */
236 
237 #ifdef __cplusplus
238 }
239 #endif
240 #endif /* SDL_IP_MCRC_H_ */
uint32_t SDL_MCRC_IntrPriority_t
The offset for the highest pending priority interrupt. These interrupt offset returned in SDL_MCRC_Ge...
Definition: sdl_ip_mcrc.h:82
int32_t SDL_MCRC_getBaseaddr(SDL_MCRC_InstType instance, uint32_t *baseAddr)
This API is used to get the base address of the instance.
This file contains the prototypes of the APIs present in the device abstraction layer file of MCRC....
SDL_MCRC_InstType
MCRC Instance supported.
Definition: sdl_mcrc.h:204
int32_t SDL_MCRC_VerifyBusTracingCtrl(SDL_MCRC_InstType instance, uint32_t ctrlFlag, SDL_MCRC_DataBusMask_t dataBusMask, SDL_MCRC_DataBusMask_t busEnableMask)
This API is used to verify the control the MCRC data bus tracing.
int32_t SDL_MCRC_GetHighestPriorityIntrStatus(SDL_MCRC_InstType instance, uint32_t *pIntVecAddr)
This API is used to get the pending interrupt with highest priority.
uint32_t SDL_MCRC_DataBusMask_t
MCRC data bus type mask selected for tracing control.
Definition: sdl_ip_mcrc.h:134
int32_t SDL_MCRC_DataBusTracingCtrl(SDL_MCRC_InstType instance, uint32_t ctrlFlag, SDL_MCRC_DataBusMask_t dataBusMask, SDL_MCRC_DataBusMask_t busEnableMask)
This API is used to control the MCRC data bus tracing.