SDL API Guide for J7200
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 
62 /* Define SDL_TRUE/SDL_FALSE to go with uint32_t */
63 #ifndef SDL_TRUE
64 #define SDL_TRUE (1U)
65 #endif
66 
83 typedef uint32_t SDL_MCRC_IntrPriority_t;
84 
85 #define SDL_MCRC_INTR_PRIORITY_CH1_FAIL (0x1U)
86 
87 #define SDL_MCRC_INTR_PRIORITY_CH2_FAIL (0x2U)
88 
89 #define SDL_MCRC_INTR_PRIORITY_CH3_FAIL (0x3U)
90 
91 #define SDL_MCRC_INTR_PRIORITY_CH4_FAIL (0x4U)
92 
93 #define SDL_MCRC_INTR_PRIORITY_CH1_COMPRESSION_DONE (0x9U)
94 
95 #define SDL_MCRC_INTR_PRIORITY_CH2_COMPRESSION_DONE (0xaU)
96 
97 #define SDL_MCRC_INTR_PRIORITY_CH3_COMPRESSION_DONE (0xbU)
98 
99 #define SDL_MCRC_INTR_PRIORITY_CH4_COMPRESSION_DONE (0xcU)
100 
101 #define SDL_MCRC_INTR_PRIORITY_CH1_OVERRUN (0x11U)
102 
103 #define SDL_MCRC_INTR_PRIORITY_CH2_OVERRUN (0x12U)
104 
105 #define SDL_MCRC_INTR_PRIORITY_CH3_OVERRUN (0x13U)
106 
107 #define SDL_MCRC_INTR_PRIORITY_CH4_OVERRUN (0x14U)
108 
109 #define SDL_MCRC_INTR_PRIORITY_CH1_UNDERRUN (0x19U)
110 
111 #define SDL_MCRC_INTR_PRIORITY_CH2_UNDERRUN (0x1aU)
112 
113 #define SDL_MCRC_INTR_PRIORITY_CH3_UNDERRUN (0x1bU)
114 
115 #define SDL_MCRC_INTR_PRIORITY_CH4_UNDERRUN (0x1cU)
116 
117 #define SDL_MCRC_INTR_PRIORITY_CH1_TIMEOUT (0x21U)
118 
119 #define SDL_MCRC_INTR_PRIORITY_CH2_TIMEOUT (0x22U)
120 
121 #define SDL_MCRC_INTR_PRIORITY_CH3_TIMEOUT (0x23U)
122 
123 #define SDL_MCRC_INTR_PRIORITY_CH4_TIMEOUT (0x24U)
124 
125 /* @} */
126 
135 typedef uint32_t SDL_MCRC_DataBusMask_t;
136 
137 #define SDL_MCRC_DATA_BUS_ITCM_MASK (SDL_MCRC_MCRC_BUS_SEL_ITC_MEN_MASK)
138 
139 #define SDL_MCRC_DATA_BUS_DTCM_MASK (SDL_MCRC_MCRC_BUS_SEL_DTC_MEN_MASK)
140 
141 #define SDL_MCRC_DATA_BUS_VBUSM_MASK (SDL_MCRC_MCRC_BUS_SEL_MEN_MASK)
142 
143 #define SDL_MCRC_DATA_BUS_MASK_ALL (SDL_MCRC_MCRC_BUS_SEL_ITC_MEN_MASK | \
144  SDL_MCRC_MCRC_BUS_SEL_DTC_MEN_MASK | \
145  SDL_MCRC_MCRC_BUS_SEL_MEN_MASK)
146 
147 /* @} */
148 
149 /* @} */
150 
151 /* ========================================================================== */
152 /* Function Declarations */
153 /* ========================================================================== */
154 
174 int32_t SDL_MCRC_GetHighestPriorityIntrStatus(SDL_MCRC_InstType instance, uint32_t *pIntVecAddr);
196  uint32_t ctrlFlag,
197  SDL_MCRC_DataBusMask_t dataBusMask,
198  SDL_MCRC_DataBusMask_t busEnableMask);
199 
211 int32_t SDL_MCRC_getBaseaddr(SDL_MCRC_InstType instance,
212  uint32_t *baseAddr);
213 
233  uint32_t ctrlFlag,
234  SDL_MCRC_DataBusMask_t dataBusMask,
235  SDL_MCRC_DataBusMask_t busEnableMask);
236 /* @} */
237 
238 #ifdef __cplusplus
239 }
240 #endif
241 #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:83
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:207
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:135
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.