1 /*
2  * Copyright 2020-2023 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef GMAC_IP_IRQ_H
8 #define GMAC_IP_IRQ_H
9 
10 /**
11 *   @file
12 *
13 *   @addtogroup GMAC_DRIVER GMAC Driver
14 *   @{
15 */
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /*==================================================================================================
22 *                                        INCLUDE FILES
23 * 1) system and project includes
24 * 2) needed interfaces from external units
25 * 3) internal and external interfaces from this unit
26 ==================================================================================================*/
27 #include "Gmac_Ip_Features.h"
28 #include "OsIf.h"
29 
30 /*==================================================================================================
31 *                              SOURCE FILE VERSION INFORMATION
32 ==================================================================================================*/
33 #define GMAC_IP_IRQ_VENDOR_ID                      43
34 #define GMAC_IP_IRQ_AR_RELEASE_MAJOR_VERSION       4
35 #define GMAC_IP_IRQ_AR_RELEASE_MINOR_VERSION       7
36 #define GMAC_IP_IRQ_AR_RELEASE_REVISION_VERSION    0
37 #define GMAC_IP_IRQ_SW_MAJOR_VERSION               3
38 #define GMAC_IP_IRQ_SW_MINOR_VERSION               0
39 #define GMAC_IP_IRQ_SW_PATCH_VERSION               0
40 
41 /*==================================================================================================
42 *                                     FILE VERSION CHECKS
43 ==================================================================================================*/
44 /* Checks against Gmac_Ip_Features.h */
45 #if (GMAC_IP_IRQ_VENDOR_ID != GMAC_IP_FEATURES_VENDOR_ID)
46     #error "Gmac_Ip_Irq.h and Gmac_Ip_Features.h have different vendor ids"
47 #endif
48 #if (( GMAC_IP_IRQ_AR_RELEASE_MAJOR_VERSION    != GMAC_IP_FEATURES_AR_RELEASE_MAJOR_VERSION) || \
49      ( GMAC_IP_IRQ_AR_RELEASE_MINOR_VERSION    != GMAC_IP_FEATURES_AR_RELEASE_MINOR_VERSION) || \
50      ( GMAC_IP_IRQ_AR_RELEASE_REVISION_VERSION != GMAC_IP_FEATURES_AR_RELEASE_REVISION_VERSION))
51      #error "AUTOSAR Version Numbers of Gmac_Ip_Irq.h and Gmac_Ip_Features.h are different"
52 #endif
53 #if (( GMAC_IP_IRQ_SW_MAJOR_VERSION != GMAC_IP_FEATURES_SW_MAJOR_VERSION) || \
54      ( GMAC_IP_IRQ_SW_MINOR_VERSION != GMAC_IP_FEATURES_SW_MINOR_VERSION) || \
55      ( GMAC_IP_IRQ_SW_PATCH_VERSION != GMAC_IP_FEATURES_SW_PATCH_VERSION))
56     #error "Software Version Numbers of Gmac_Ip_Irq.h and Gmac_Ip_Features.h are different"
57 #endif
58 
59 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
60     /* Checks against OsIf.h */
61     #if (( GMAC_IP_IRQ_AR_RELEASE_MAJOR_VERSION    != OSIF_AR_RELEASE_MAJOR_VERSION) || \
62         ( GMAC_IP_IRQ_AR_RELEASE_MINOR_VERSION    != OSIF_AR_RELEASE_MINOR_VERSION))
63         #error "AUTOSAR Version Numbers of Gmac_Ip_Irq.h and OsIf.h are different"
64     #endif
65 #endif
66 
67 
68 /*******************************************************************************
69  * API
70  ******************************************************************************/
71 #define ETH_43_GMAC_START_SEC_CODE
72 #include "Eth_43_GMAC_MemMap.h"
73 
74 #if (FEATURE_GMAC_NUM_INSTANCES > 0U)
75 ISR(GMAC0_Common_IRQHandler);
76 
77   #if (FEATURE_GMAC_ASP_ALL || FEATURE_GMAC_ASP_ECC)
78   ISR(GMAC0_Safety_IRQHandler);
79   #endif
80 
81   #if FEATURE_GMAC_INDIVIDUAL_CH_IRQS
82 
83     #if (FEATURE_GMAC_NUM_CHANNELS > 0U)
84     ISR(GMAC0_CH0_TX_IRQHandler);
85     ISR(GMAC0_CH0_RX_IRQHandler);
86     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 0U) */
87     #if (FEATURE_GMAC_NUM_CHANNELS > 1U)
88     ISR(GMAC0_CH1_TX_IRQHandler);
89     ISR(GMAC0_CH1_RX_IRQHandler);
90     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 1U) */
91     #if (FEATURE_GMAC_NUM_CHANNELS > 2U)
92     ISR(GMAC0_CH2_TX_IRQHandler);
93     ISR(GMAC0_CH2_RX_IRQHandler);
94     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 2U) */
95     #if (FEATURE_GMAC_NUM_CHANNELS > 3U)
96     ISR(GMAC0_CH3_TX_IRQHandler);
97     ISR(GMAC0_CH3_RX_IRQHandler);
98     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 3U) */
99     #if (FEATURE_GMAC_NUM_CHANNELS > 4U)
100     ISR(GMAC0_CH4_TX_IRQHandler);
101     ISR(GMAC0_CH4_RX_IRQHandler);
102     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 4U) */
103 
104   #elif FEATURE_GMAC_UNIFIED_CH_IRQS
105 
106     ISR(GMAC0_CH_TX_IRQHandler);
107     ISR(GMAC0_CH_RX_IRQHandler);
108 
109   #endif /* FEATURE_GMAC_INDIVIDUAL_CH_IRQS */
110 #endif /* FEATURE_GMAC_NUM_INSTANCES > 0U*/
111 
112 #if (FEATURE_GMAC_NUM_INSTANCES > 1U)
113 ISR(GMAC1_Common_IRQHandler);
114 
115   #if (FEATURE_GMAC_ASP_ALL || FEATURE_GMAC_ASP_ECC)
116   ISR(GMAC1_Safety_IRQHandler);
117   #endif
118 
119   #if FEATURE_GMAC_INDIVIDUAL_CH_IRQS
120 
121     #if (FEATURE_GMAC_NUM_CHANNELS > 0U)
122     ISR(GMAC1_CH0_TX_IRQHandler);
123     ISR(GMAC1_CH0_RX_IRQHandler);
124     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 0U) */
125     #if (FEATURE_GMAC_NUM_CHANNELS > 1U)
126     ISR(GMAC1_CH1_TX_IRQHandler);
127     ISR(GMAC1_CH1_RX_IRQHandler);
128     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 1U) */
129     #if (FEATURE_GMAC_NUM_CHANNELS > 2U)
130     ISR(GMAC1_CH2_TX_IRQHandler);
131     ISR(GMAC1_CH2_RX_IRQHandler);
132     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 2U) */
133     #if (FEATURE_GMAC_NUM_CHANNELS > 3U)
134     ISR(GMAC1_CH3_TX_IRQHandler);
135     ISR(GMAC1_CH3_RX_IRQHandler);
136     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 3U) */
137     #if (FEATURE_GMAC_NUM_CHANNELS > 4U)
138     ISR(GMAC1_CH4_TX_IRQHandler);
139     ISR(GMAC1_CH4_RX_IRQHandler);
140     #endif /* (FEATURE_GMAC_NUM_CHANNELS > 4U) */
141 
142   #elif FEATURE_GMAC_UNIFIED_CH_IRQS
143 
144     ISR(GMAC1_CH_TX_IRQHandler);
145     ISR(GMAC1_CH_RX_IRQHandler);
146 
147   #endif /* FEATURE_GMAC_INDIVIDUAL_CH_IRQS */
148 #endif /* (FEATURE_GMAC_NUM_INSTANCES > 1U) */
149 
150 #define ETH_43_GMAC_STOP_SEC_CODE
151 #include "Eth_43_GMAC_MemMap.h"
152 
153 
154 #ifdef __cplusplus
155 }
156 #endif
157 
158 /** @} */
159 
160 #endif /* GMAC_IP_IRQ_H */
161