PDK API Guide for J721E
icssg_tas_priv.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2021
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 
40 #ifndef ICSSG_TAS_PRIV_H_
41 #define ICSSG_TAS_PRIV_H_
42 
43 /* ========================================================================== */
44 /* Include Files */
45 /* ========================================================================== */
46 
47 #include <stdint.h>
48 #include <stdbool.h>
49 
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 /* ========================================================================== */
57 /* Macros */
58 /* ========================================================================== */
59 
60 /* None */
61 
62 /* ========================================================================== */
63 /* Structures and Enums */
64 /* ========================================================================== */
65 
69 typedef struct IcssgTas_FwList_s
70 {
72  uint8_t gateMaskList[ENET_TAS_MAX_CMD_LISTS];
73 
75  uint32_t windowEndTimeList[ENET_TAS_MAX_CMD_LISTS];
76 
78  uint32_t gateCloseTimeList[ENET_TAS_MAX_CMD_LISTS][ENET_TAS_MAX_NUM_QUEUES];
80 
84 typedef struct IcssgTas_Obj_s
85 {
88 
90  void* hIcssg;
91 
94 
97 
100 
103 
106 
109 } IcssgTas_Obj;
110 
114 typedef struct IcssgTas_Obj_s *IcssgTas_Handle;
115 
116 /* ========================================================================== */
117 /* Global Variables Declarations */
118 /* ========================================================================== */
119 
120 /* None */
121 
122 /* ========================================================================== */
123 /* Function Declarations */
124 /* ========================================================================== */
125 
140 int32_t IcssgTas_open(EnetMod_Handle hMod,
141  Enet_Type enetType,
142  uint32_t instId,
143  const void *cfg,
144  uint32_t cfgSize);
145 
157 int32_t IcssgTas_rejoin(EnetMod_Handle hMod,
158  Enet_Type enetType,
159  uint32_t instId);
160 
172 int32_t IcssgTas_ioctl(EnetMod_Handle hMod,
173  uint32_t cmd,
174  Enet_IoctlPrms *prms);
175 
181 void IcssgTas_close(EnetMod_Handle hMod);
182 
183 /* ========================================================================== */
184 /* Deprecated Function Declarations */
185 /* ========================================================================== */
186 
187 /* None */
188 
189 /* ========================================================================== */
190 /* Static Function Definitions */
191 /* ========================================================================== */
192 
193 /* None */
194 
195 #ifdef __cplusplus
196 }
197 #endif
198 
199 #endif /* ICSSG_TAS_PRIV_H_ */
int32_t IcssgTas_ioctl(EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
Run an IOCTL operation on the Tas module.
Enet_Type
Ethernet peripheral type.
Definition: enet_types.h:195
volatile IcssgTas_FwList * fwActiveList
Definition: icssg_tas_priv.h:105
EnetTas_TasState
TAS state types.
Definition: enet_mod_tas.h:219
EnetTas_ControlList operList
Definition: icssg_tas_priv.h:99
struct IcssgTas_Obj_s * IcssgTas_Handle
ICSSG Tas handle.
Definition: icssg_tas_priv.h:114
#define ENET_TAS_MAX_CMD_LISTS
Maximum number of gate command entries in each list.
Definition: enet_mod_tas.h:82
#define ENET_TAS_MAX_NUM_QUEUES
Maximum number of transmit queues supported by implementation.
Definition: enet_mod_tas.h:85
EnetMod_Obj enetMod
Definition: icssg_tas_priv.h:87
EnetTas_TasState state
Definition: icssg_tas_priv.h:93
EnetTas_ControlList adminList
Definition: icssg_tas_priv.h:102
Ethernet Module object.
Definition: enet_mod.h:136
int32_t IcssgTas_open(EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize)
Open and initialize Tas module.
Gate control list. See IEEE Std 802.1Q-2018 8.6.9.4 D3-1.
Definition: enet_mod_tas.h:254
Config state machine variables. See IEEE Std 802.1Q-2018 8.6.8.4.
Definition: enet_mod_tas.h:277
TAS List Structure based on firmware memory map.
Definition: icssg_tas_priv.h:69
void * hIcssg
Definition: icssg_tas_priv.h:90
volatile EnetTas_ConfigStatus * configStatus
Definition: icssg_tas_priv.h:96
volatile IcssgTas_FwList * fwShadowList
Definition: icssg_tas_priv.h:108
Enet IOCTL param.
Definition: enet_ioctl.h:232
gptp_ipc_command_t cmd
Definition: gptpipc.h:140
This file contains the type definitions and helper macros for the Enet Time Aware Shaper (TAS) module...
struct EnetMod_Obj_s * EnetMod_Handle
Ethernet Module handle.
Definition: enet_mod.h:71
ICSSG Tas object.
Definition: icssg_tas_priv.h:84
int32_t IcssgTas_rejoin(EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId)
Rejoin a running Tas module.
void IcssgTas_close(EnetMod_Handle hMod)
Close ICSSG Tas module.