![]()  | 
  
    PDK API Guide for J721E
    
   | 
 
This file contains the private type definitions and helper macros for the CPSW peripheral.
Go to the source code of this file.
Data Structures | |
| struct | Cpsw_MdioLinkIntCtx | 
| MDIO status change (MDIO_LINKINT) context.  More... | |
| struct | Cpsw_PortLinkState | 
| Port link state (link up/down, tick enabled)  More... | |
| struct | Cpsw_Obj | 
| CPSW driver object.  More... | |
Macros | |
| #define | CPSW_FEATURE_INTERVLAN (ENET_BIT(1U)) | 
| InterVLAN feature mask.  More... | |
| #define | CPSW_FEATURE_EST (ENET_BIT(2U)) | 
| EST feature mask.  More... | |
Typedefs | |
| typedef Cpsw_Obj * | Cpsw_Handle | 
| CPSW peripheral handle.  More... | |
Functions | |
| void | Cpsw_initCfg (EnetPer_Handle hPer, Enet_Type enetType, void *cfg, uint32_t cfgSize) | 
| Initialize CPSW peripheral's configuration parameters.  More... | |
| int32_t | Cpsw_open (EnetPer_Handle hPer, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize) | 
| Open and initialize the CPSW Peripheral.  More... | |
| int32_t | Cpsw_rejoin (EnetPer_Handle hPer, Enet_Type enetType, uint32_t instId) | 
| Rejoin a running CPSW peripheral.  More... | |
| void | Cpsw_close (EnetPer_Handle hPer) | 
| Close the CPSW peripheral.  More... | |
| int32_t | Cpsw_ioctl (EnetPer_Handle hPer, uint32_t cmd, Enet_IoctlPrms *prms) | 
| Issue an operation on the CPSW peripheral.  More... | |
| void | Cpsw_poll (EnetPer_Handle hPer, Enet_Event evt, const void *arg, uint32_t argSize) | 
| Poll for Ethernet events.  More... | |
| void | Cpsw_periodicTick (EnetPer_Handle hPer) | 
| Run periodic tick on the CPSW peripheral.  More... | |
| #define CPSW_FEATURE_INTERVLAN (ENET_BIT(1U)) | 
InterVLAN feature mask.
| #define CPSW_FEATURE_EST (ENET_BIT(2U)) | 
EST feature mask.
| typedef Cpsw_Obj* Cpsw_Handle | 
CPSW peripheral handle.
| void Cpsw_initCfg | ( | EnetPer_Handle | hPer, | 
| Enet_Type | enetType, | ||
| void * | cfg, | ||
| uint32_t | cfgSize | ||
| ) | 
Initialize CPSW peripheral's configuration parameters.
Initializes the configuration parameter of the CPSW peripheral.
| int32_t Cpsw_open | ( | EnetPer_Handle | hPer, | 
| Enet_Type | enetType, | ||
| uint32_t | instId, | ||
| const void * | cfg, | ||
| uint32_t | cfgSize | ||
| ) | 
Open and initialize the CPSW Peripheral.
Opens and initializes the CPSW peripheral with the configuration parameters provided by the caller.
| hPer | Enet Peripheral handle | 
| enetType | Enet Peripheral type | 
| instId | Enet Peripheral instance id | 
| cfg | Configuration parameters to be initialized. The config is of type Cpsw_Cfg. | 
| cfgSize | Size of the configuration parameters. It must be the size of Cpsw_Cfg config structure. | 
| int32_t Cpsw_rejoin | ( | EnetPer_Handle | hPer, | 
| Enet_Type | enetType, | ||
| uint32_t | instId | ||
| ) | 
Rejoin a running CPSW peripheral.
Reopens the CPSW peripheral, but doesn't perform any hardware initialization. This function is expected to be called to attach to a running peripheral.
This is an optional function and could be set to NULL if the peripheral doesn't implement it.
| hPer | Enet Peripheral handle | 
| enetType | Enet Peripheral type | 
| instId | Enet Peripheral instance id | 
| void Cpsw_close | ( | EnetPer_Handle | hPer | ) | 
Close the CPSW peripheral.
Closes the CPSW peripheral.
| hPer | Enet Peripheral handle | 
| int32_t Cpsw_ioctl | ( | EnetPer_Handle | hPer, | 
| uint32_t | cmd, | ||
| Enet_IoctlPrms * | prms | ||
| ) | 
Issue an operation on the CPSW peripheral.
Issues a control operation on the CPSW peripheral.
| hPer | Enet Peripheral handle | 
| cmd | IOCTL command Id | 
| prms | IOCTL parameters | 
| void Cpsw_poll | ( | EnetPer_Handle | hPer, | 
| Enet_Event | evt, | ||
| const void * | arg, | ||
| uint32_t | argSize | ||
| ) | 
Poll for Ethernet events.
The CPSW peripheral currently doesn't provide polling support.
| hPer | Enet Peripheral handle | 
| evt | Event type | 
| arg | Pointer to the poll argument. This is specific to the poll event type | 
| argSize | Size of arg  | 
| void Cpsw_periodicTick | ( | EnetPer_Handle | hPer | ) | 
Run periodic tick on the CPSW peripheral.
Run PHY periodic tick on the CPSW peripheral. The peripheral driver in turn runs the periodic tick operation on all opened PHYs.
| hPer | Enet Peripheral handle |