PDK API Guide for J721E
MuxIntcP.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2017, Texas Instruments Incorporated
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 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 "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
48 #ifndef ti_osal_MuxIntcP__include
49 #define ti_osal_MuxIntcP__include
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 #include <stdint.h>
56 #include <stdbool.h>
57 #include <stddef.h>
58 
62 typedef enum MuxIntcP_Status_e {
64  MuxIntcP_FAILURE = (-(int32_t)1)
74 #define MUXINTCP_CROSSBAR_MUXNUM_DSP1 (0)
75 #define MUXINTCP_CROSSBAR_MUXNUM_DSP2 (1)
76 #define MUXINTCP_CROSSBAR_MUXNUM_IPU1 (2)
77 #define MUXINTCP_CROSSBAR_MUXNUM_IPU2 (3)
78 #define MUXINTCP_CROSSBAR_MUXNUM_MPU (4)
79 
80 #define MUXINTCP_CROSSBAR_MUXNUM_INVALID (-(int32_t)1)
81 /* @} */
82 
86 typedef void (*MuxIntcP_Fxn)(uintptr_t arg);
87 
91 typedef void (*MuxIntcFxn)(uintptr_t arg);
92 
99 typedef struct MuxIntcP_inParams_s {
100  /* Input parameters */
101  uintptr_t arg;
102  int32_t muxNum;
103  int32_t muxInEvent;
104  int32_t muxOutEvent;
107 
114 typedef struct MuxIntcP_outParams_s {
115  /* Output parameters */
116  uintptr_t arg;
117  uint32_t eventId;
120 
131 
138 extern void MuxIntcP_enableInEvent(int32_t muxNum, int32_t muxInEvent);
139 
146 extern void MuxIntcP_disableInEvent(int32_t muxNum, int32_t muxInEvent);
147 
154 extern void MuxIntcP_clearInEvent(int32_t muxNum, int32_t muxInEvent);
155 
162 extern void MuxIntcP_enableOutEvent(int32_t muxNum, int32_t muxOutEvent);
163 
170 extern void MuxIntcP_disableOutEvent(int32_t muxNum, int32_t muxOutEvent);
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #endif /* ti_osal_MuxIntcP__include */
177 /* @} */
void MuxIntcP_enableOutEvent(int32_t muxNum, int32_t muxOutEvent)
Function to enable interrupt controller mux for an output event.
void(* MuxIntcP_Fxn)(uintptr_t arg)
Prototype for the entry function for a cpIntc interrupt.
Definition: MuxIntcP.h:86
void MuxIntcP_disableOutEvent(int32_t muxNum, int32_t muxOutEvent)
Function to disable interrupt controller mux for an output event.
void MuxIntcP_clearInEvent(int32_t muxNum, int32_t muxInEvent)
Function to clear interrupt controller mux for an input event.
void(* MuxIntcFxn)(uintptr_t arg)
Prototype for the MuxIntc dispatch function.
Definition: MuxIntcP.h:91
int32_t muxInEvent
Definition: MuxIntcP.h:103
Basic MuxIntcP Input Parameters.
Definition: MuxIntcP.h:99
MuxIntcP_Status
Status codes for MuxIntcP APIs.
Definition: MuxIntcP.h:62
MuxIntcP_Status MuxIntcP_create(MuxIntcP_inParams *inParams, MuxIntcP_outParams *outParams)
Function to create an interrupt controller mux.
Definition: MuxIntcP.h:63
void MuxIntcP_disableInEvent(int32_t muxNum, int32_t muxInEvent)
Function to disable interrupt controller mux for an input event.
Basic MuxIntcP Output Parameters.
Definition: MuxIntcP.h:114
int32_t muxOutEvent
Definition: MuxIntcP.h:104
MuxIntcFxn muxIntcFxn
Definition: MuxIntcP.h:105
uintptr_t arg
Definition: MuxIntcP.h:101
MuxIntcFxn muxIntcFxn
Definition: MuxIntcP.h:118
uint32_t eventId
Definition: MuxIntcP.h:117
Definition: MuxIntcP.h:64
void MuxIntcP_enableInEvent(int32_t muxNum, int32_t muxInEvent)
Function to enable interrupt controller mux for an input event.
int32_t muxNum
Definition: MuxIntcP.h:102
uintptr_t arg
Definition: MuxIntcP.h:116