PDK API Guide for J721E
|
This file contains private type definitions and helper macros for the CPSW MAC port module which are meant for internal use in Enet Per drivers.
Go to the source code of this file.
Data Structures | |
struct | CpswMacPort_SetSpecificInterVlanRouteInArgs |
Input args for CPSW_MACPORT_IOCTL_SET_SPECIFIC_INTERVLAN_ROUTE command. More... | |
struct | CpswMacPort_InterVlanFreeRouteInfo |
Information on free interVLAN routes available for an egress port. More... | |
struct | CpswMacPort_ModCfg |
MAC port module configuration parameters. More... | |
struct | CpswMacPort_Obj |
CPSW MAC port object. More... | |
Macros | |
#define | CPSW_MACPORT_PRIVATE_IOCTL(x) |
Helper macro to create private IOCTL commands for CPSW MAC port module. More... | |
#define | CPSW_MACPORT_FEATURE_SGMII (ENET_BIT(0U)) |
SGMII feature mask. More... | |
#define | CPSW_MACPORT_FEATURE_INTERVLAN (ENET_BIT(1U)) |
InterVLAN feature mask. More... | |
#define | CPSW_MACPORT_INTERVLAN_ROUTEID_BASE (1U) |
Base InterVLAN Route Id. More... | |
#define | CPSW_MACPORT_INTERVLAN_ROUTE_MAX |
Maximum number of interVLAN routes available per egress port. More... | |
#define | CPSW_MACPORT_INTERVLAN_ROUTE2PTR(routeId) |
Convert route id to pointer. More... | |
Typedefs | |
typedef CpswMacPort_Obj * | CpswMacPort_Handle |
MAC port module handle. More... | |
Functions | |
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. More... | |
int32_t | CpswMacPort_rejoin (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId) |
Rejoin a running CPSW MAC port. More... | |
int32_t | CpswMacPort_ioctl (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms) |
Run an IOCTL operation on CPSW MAC port. More... | |
void | CpswMacPort_close (EnetMod_Handle hMod) |
Close CPSW MAC port. More... | |
#define CPSW_MACPORT_PRIVATE_IOCTL | ( | x | ) |
Helper macro to create private IOCTL commands for CPSW MAC port module.
#define CPSW_MACPORT_FEATURE_SGMII (ENET_BIT(0U)) |
SGMII feature mask.
#define CPSW_MACPORT_FEATURE_INTERVLAN (ENET_BIT(1U)) |
InterVLAN feature mask.
#define CPSW_MACPORT_INTERVLAN_ROUTEID_BASE (1U) |
Base InterVLAN Route Id.
#define CPSW_MACPORT_INTERVLAN_ROUTE_MAX |
Maximum number of interVLAN routes available per egress port.
#define CPSW_MACPORT_INTERVLAN_ROUTE2PTR | ( | routeId | ) |
Convert route id to pointer.
typedef CpswMacPort_Obj* CpswMacPort_Handle |
MAC port module handle.
MAC port private IOCTL commands.
Enumerator | |
---|---|
CPSW_MACPORT_IOCTL_ENABLE | Enable MAC port. IOCTL parameters: inArgs: EnetMacPort_LinkCfg outArgs: None |
CPSW_MACPORT_IOCTL_DISABLE | Disable MAC port. IOCTL parameters: inArgs: None outArgs: None |
CPSW_MACPORT_IOCTL_SET_INTERVLAN_ROUTE | Alloc free route and set interVLAN config for egress MAC port. IOCTL parameters: inArgs: CpswMacPort_InterVlanRoutingCfg outArgs: CpswMacPort_InterVlanRouteId |
CPSW_MACPORT_IOCTL_SET_SPECIFIC_INTERVLAN_ROUTE | Set interVLAN config for egress MAC port at given route index. IOCTL parameters: inArgs: CpswMacPort_SetSpecificInterVlanRouteInArgs outArgs: None |
CPSW_MACPORT_IOCTL_GET_INTERVLAN_ROUTE | Get interVLAN config for egress MAC port. IOCTL parameters: inArgs: CpswMacPort_InterVlanRouteId outArgs: CpswMacPort_InterVlanRoutingCfg |
CPSW_MACPORT_IOCTL_DELETE_INTERVLAN_ROUTE | Delete the specified interVlan route. IOCTL parameters: inArgs: CpswMacPort_InterVlanRoutingCfg outArgs: CpswMacPort_InterVlanRouteId |
CPSW_MACPORT_IOCTL_GET_INTERVLAN_FREEROUTES | Get interVLAN free routes available for the given egress port. IOCTL parameters: inArgs: None outArgs: CpswMacPort_InterVlanFreeRouteInfo |
CPSW_MACPORT_IOCTL_FIND_INTERVLAN_ROUTE | Find interVLAN route id matching the given route params. If unable to find the route returns CPSW_MACPORT_EROUTENOTFOUND IOCTL parameters: inArgs: CpswMacPort_InterVlanRoutingCfg outArgs: CpswMacPort_InterVlanRouteId |
CPSW_MACPORT_IOCTL_IS_INTERVLAN_ROUTE_FREE | Check if given interVLAN route is free. IOCTL parameters: inArgs: CpswMacPort_InterVlanRouteId outArgs: bool |
CPSW_MACPORT_IOCTL_SET_SHORT_IPG | Set transmit short gap configuration for MAC port. IOCTL parameters: inArgs: CpswMacPort_PortTxShortIpgCfg outArgs: None |
CPSW_MACPORT_IOCTL_GET_SHORT_IPG | Get transmit short gap configuration for MAC port. IOCTL parameters: inArgs: EnetMacPort_GenericInArgs outArgs: CpswMacPort_TxShortIpgCfg |
CPSW_MACPORT_IOCTL_GET_SGMII_AUTONEG_LINK_STATUS | Get SGMII auto-negotiate link status from the SGMII status register. IOCTL parameters: inArgs: EnetMacPort_GenericInArgs outArgs: bool |
CPSW_MACPORT_IOCTL_GET_SGMII_LINK_STATUS | Get SGMII link status from the SGMII status register. IOCTL parameters: inArgs: EnetMacPort_GenericInArgs outArgs: bool |
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.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
cfg | Configuration parameters |
cfgSize | Size of the configuration parameters |
int32_t CpswMacPort_rejoin | ( | EnetMod_Handle | hMod, |
Enet_Type | enetType, | ||
uint32_t | instId | ||
) |
Rejoin a running CPSW MAC port.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
int32_t CpswMacPort_ioctl | ( | EnetMod_Handle | hMod, |
uint32_t | cmd, | ||
Enet_IoctlPrms * | prms | ||
) |
Run an IOCTL operation on CPSW MAC port.
hMod | Enet Module handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
void CpswMacPort_close | ( | EnetMod_Handle | hMod | ) |
Close CPSW MAC port.
hMod | Enet Module handle |