41 #ifndef CPSW_MACPORT_PRIV_H_ 42 #define CPSW_MACPORT_PRIV_H_ 60 #define CPSW_MACPORT_PRIVATE_IOCTL(x) (ENET_IOCTL_TYPE_PRIVATE | \ 61 ENET_IOCTL_MACPORT_BASE | \ 62 ENET_IOCTL_PER_CPSW | \ 66 #define CPSW_MACPORT_FEATURE_SGMII (ENET_BIT(0U)) 69 #define CPSW_MACPORT_FEATURE_INTERVLAN (ENET_BIT(1U)) 72 #define CPSW_MACPORT_INTERVLAN_ROUTEID_BASE (1U) 75 #define CPSW_MACPORT_INTERVLAN_ROUTE_MAX (CPSW_MACPORT_INTERVLAN_ROUTEID_LAST - \ 76 CPSW_MACPORT_INTERVLAN_ROUTEID_FIRST + 1U) 79 #define CPSW_MACPORT_INTERVLAN_ROUTE2PTR(routeId) (CPSW_MACPORT_INTERVLAN_ROUTEID_BASE + \ 80 (routeId) - CPSW_MACPORT_INTERVLAN_ROUTEID_FIRST) 89 typedef enum CpswMacPort_PrivIoctls_e
213 typedef struct CpswMacPort_SetSpecificInterVlanRouteInArgs_s
225 typedef struct CpswMacPort_InterVlanFreeRouteInfo_s
242 typedef struct CpswMacPort_ModCfg_s
257 typedef struct CpswMacPort_Obj_s
Get SGMII auto-negotiate link status from the SGMII status register.
Definition: cpsw_macport_priv.h:198
Enet_Type
Ethernet peripheral type.
Definition: enet_types.h:195
Find interVLAN route id matching the given route params.
Definition: cpsw_macport_priv.h:162
MAC port interface.
Definition: enet_mod_macport.h:273
CpswMacPort_Cfg macCfg
Definition: cpsw_macport_priv.h:245
EnetMacPort_LinkCfg linkCfg
Definition: cpsw_macport_priv.h:251
Link speed and duplexity configuration.
Definition: enet_mod_macport.h:288
Check if given interVLAN route is free.
Definition: cpsw_macport_priv.h:171
Get interVLAN free routes available for the given egress port.
Definition: cpsw_macport_priv.h:152
#define CPSW_MACPORT_INTERVLAN_ROUTE_MAX
Maximum number of interVLAN routes available per egress port.
Definition: cpsw_macport_priv.h:75
This file contains the type definitions and helper macros for the Enet MAC port module interface.
Set interVLAN config for egress MAC port at given route index.
Definition: cpsw_macport_priv.h:125
Ethernet Module object.
Definition: enet_mod.h:136
Disable MAC port.
Definition: cpsw_macport_priv.h:107
CpswMacPort_Obj * CpswMacPort_Handle
MAC port module handle.
Definition: cpsw_macport_priv.h:275
Delete the specified interVlan route.
Definition: cpsw_macport_priv.h:143
MAC port module configuration parameters.
Definition: cpsw_macport_priv.h:242
Get SGMII link status from the SGMII status register.
Definition: cpsw_macport_priv.h:207
Port interVLAN configuration parameters.
Definition: cpsw_macport.h:184
EnetMod_Obj enetMod
Definition: cpsw_macport_priv.h:260
Information on free interVLAN routes available for an egress port.
Definition: cpsw_macport_priv.h:225
EnetMacPort_Interface mii
Definition: cpsw_macport_priv.h:248
Enable MAC port.
Definition: cpsw_macport_priv.h:98
int32_t CpswMacPort_ioctl(EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
Run an IOCTL operation on CPSW MAC port.
CPSW MAC port object.
Definition: cpsw_macport_priv.h:257
Set transmit short gap configuration for MAC port.
Definition: cpsw_macport_priv.h:180
Get interVLAN config for egress MAC port.
Definition: cpsw_macport_priv.h:134
Enet IOCTL param.
Definition: enet_ioctl.h:232
uint32_t numFreeRoutes
Definition: cpsw_macport_priv.h:228
This file contains the type definitions and helper macros for the CPSW MAC port module interface.
CpswMacPort_InterVlanRoutingCfg routeCfg
Definition: cpsw_macport_priv.h:219
void CpswMacPort_close(EnetMod_Handle hMod)
Close CPSW MAC port.
#define CPSW_MACPORT_PRIVATE_IOCTL(x)
Helper macro to create private IOCTL commands for CPSW MAC port module.
Definition: cpsw_macport_priv.h:60
CpswMacPort_PrivIoctls
MAC port private IOCTL commands.
Definition: cpsw_macport_priv.h:89
Alloc free route and set interVLAN config for egress MAC port.
Definition: cpsw_macport_priv.h:116
Enet_MacPort
MAC port.
Definition: enet_types.h:402
Enet_MacPort macPort
Definition: cpsw_macport_priv.h:263
struct EnetMod_Obj_s * EnetMod_Handle
Ethernet Module handle.
Definition: enet_mod.h:71
CpswMacPort_InterVlanRouteId
MAC port interVLAN route identifier.
Definition: cpsw_macport.h:160
Get transmit short gap configuration for MAC port.
Definition: cpsw_macport_priv.h:189
int32_t CpswMacPort_open(EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize)
Open and initialize CPSW MAC port.
CpswMacPort_InterVlanRouteId routeId
Definition: cpsw_macport_priv.h:216
Input args for CPSW_MACPORT_IOCTL_SET_SPECIFIC_INTERVLAN_ROUTE command.
Definition: cpsw_macport_priv.h:213
uint32_t instId
Definition: cpsw_macport_priv.h:269
MAC port module configuration parameters.
Definition: cpsw_macport.h:359
int32_t CpswMacPort_rejoin(EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId)
Rejoin a running CPSW MAC port.
Enet_Type enetType
Definition: cpsw_macport_priv.h:266