PDK API Guide for J721E
|
This file contains the private type definitions and helper macros for the ICSSG peripheral.
Go to the source code of this file.
Data Structures | |
struct | Icssg_evtCbInfo |
Icssg event callback info structure. More... | |
struct | Icssg_Pruss |
ICSS_PRU object. More... | |
struct | Icssg_Fw |
ICSSG firmware. More... | |
struct | Icssg_FwPoolMem |
ICSSG buffer pool memories. More... | |
struct | Icssg_IoctlCmd_s |
IOCTL command structure used to communicate with ICSSG. More... | |
struct | Icssg_IoctlCmdResp |
IOCTL command response structure used to communicate with ICSSG. More... | |
struct | Icssg_Obj |
Icssg per object. More... | |
Macros | |
#define | ICSSG_PRUSS_ID_0 (0U) |
PRU ICSS subsystem instance 0. More... | |
#define | ICSSG_PRUSS_ID_1 (1U) |
PRU ICSS subsystem instance 1. More... | |
#define | ICSSG_PRUSS_ID_2 (2U) |
PRU ICSS subsystem instance 2. More... | |
#define | ICSSG_CACHELINE_ALIGNMENT (64U) |
Cache alignment used for IOCTL command structure. More... | |
Typedefs | |
typedef Icssg_Obj * | Icssg_Handle |
MAC port module handle. More... | |
Functions | |
struct Icssg_IoctlCmd_s | __attribute__ ((packed)) Icssg_IoctlCmd |
IOCTL command structure used to communicate with ICSSG. More... | |
void | Icssg_initCfg (EnetPer_Handle hPer, Enet_Type enetType, void *cfg, uint32_t cfgSize) |
Initialize ICSSG peripheral's configuration parameters. More... | |
int32_t | Icssg_open (EnetPer_Handle hPer, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize) |
Open and initialize the ICSSG Peripheral. More... | |
int32_t | Icssg_rejoin (EnetPer_Handle hPer, Enet_Type enetType, uint32_t instId) |
Rejoin a running ICSSG peripheral. More... | |
int32_t | Icssg_ioctl (EnetPer_Handle hPer, uint32_t cmd, Enet_IoctlPrms *prms) |
Issue an operation on the ICSSG peripheral. More... | |
void | Icssg_poll (EnetPer_Handle hPer, Enet_Event evt, const void *arg, uint32_t argSize) |
Poll for Ethernet events. More... | |
uint64_t | Icssg_convertTs (EnetPer_Handle hPer, uint64_t ts) |
Converts ICSSG timestamp to nanoseconds. More... | |
void | Icssg_periodicTick (EnetPer_Handle hPer) |
Run periodic tick on the ICSSG peripheral. More... | |
void | Icssg_registerEventCb (EnetPer_Handle hPer, Enet_Event evt, uint32_t evtNum, Enet_EventCallback evtCb, void *evtCbArgs) |
void | Icssg_unregisterEventCb (EnetPer_Handle hPer, Enet_Event evt, uint32_t evtNum) |
void | Icssg_close (EnetPer_Handle hPer) |
Close the ICSSG peripheral. More... | |
Variables | |
uint8_t | param |
uint8_t | seqNum |
uint8_t | type |
uint8_t | header |
uint32_t | spare [3] |
#define ICSSG_PRUSS_ID_0 (0U) |
PRU ICSS subsystem instance 0.
#define ICSSG_PRUSS_ID_1 (1U) |
PRU ICSS subsystem instance 1.
#define ICSSG_PRUSS_ID_2 (2U) |
PRU ICSS subsystem instance 2.
#define ICSSG_CACHELINE_ALIGNMENT (64U) |
Cache alignment used for IOCTL command structure.
typedef Icssg_Obj* Icssg_Handle |
MAC port module handle.
struct Icssg_IoctlCmd_s __attribute__ | ( | (packed) | ) |
IOCTL command structure used to communicate with ICSSG.
void Icssg_initCfg | ( | EnetPer_Handle | hPer, |
Enet_Type | enetType, | ||
void * | cfg, | ||
uint32_t | cfgSize | ||
) |
Initialize ICSSG peripheral's configuration parameters.
Initializes the configuration parameter of the ICSSG peripheral.
int32_t Icssg_open | ( | EnetPer_Handle | hPer, |
Enet_Type | enetType, | ||
uint32_t | instId, | ||
const void * | cfg, | ||
uint32_t | cfgSize | ||
) |
Open and initialize the ICSSG Peripheral.
Opens and initializes the ICSSG 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 Icssg_Cfg. |
cfgSize | Size of the configuration parameters. It must be the size of Icssg_Cfg config structure. |
int32_t Icssg_rejoin | ( | EnetPer_Handle | hPer, |
Enet_Type | enetType, | ||
uint32_t | instId | ||
) |
Rejoin a running ICSSG peripheral.
This operation is not supported by the ICSSG peripheral. Calling this function will return ENET_ENOTSUPPORTED.
hPer | Enet Peripheral handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
ENET_ENOTSUPPORTED |
int32_t Icssg_ioctl | ( | EnetPer_Handle | hPer, |
uint32_t | cmd, | ||
Enet_IoctlPrms * | prms | ||
) |
Issue an operation on the ICSSG peripheral.
Issues a control operation on the ICSSG peripheral.
hPer | Enet Peripheral handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
void Icssg_poll | ( | EnetPer_Handle | hPer, |
Enet_Event | evt, | ||
const void * | arg, | ||
uint32_t | argSize | ||
) |
Poll for Ethernet events.
Unblocking poll for the events specified in evt
. ICSSG uses this function to poll for completion of asynchronous IOCTLs.
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 |
uint64_t Icssg_convertTs | ( | EnetPer_Handle | hPer, |
uint64_t | ts | ||
) |
Converts ICSSG timestamp to nanoseconds.
ICSSG timestamp encodes IEP count low/high and rollover count as bit fields in the 64-bit value returned by ICSSG. This value needs to be converted to nanoseconds before application can consume it.
hPer | Enet Peripheral handle |
ts | Timestamp value, definition is peripheral specific |
void Icssg_periodicTick | ( | EnetPer_Handle | hPer | ) |
Run periodic tick on the ICSSG peripheral.
Run PHY periodic tick on the ICSSG peripheral. The peripheral driver in turn runs the periodic tick operation on all opened PHYs.
hPer | Enet Peripheral handle |
void Icssg_registerEventCb | ( | EnetPer_Handle | hPer, |
Enet_Event | evt, | ||
uint32_t | evtNum, | ||
Enet_EventCallback | evtCb, | ||
void * | evtCbArgs | ||
) |
void Icssg_unregisterEventCb | ( | EnetPer_Handle | hPer, |
Enet_Event | evt, | ||
uint32_t | evtNum | ||
) |
void Icssg_close | ( | EnetPer_Handle | hPer | ) |
Close the ICSSG peripheral.
Closes the ICSSG peripheral.
hPer | Enet Peripheral handle |
uint8_t param |
Command parameter
uint8_t seqNum |
Sequence number
uint8_t type |
Command type
uint8_t header |
Command header
uint32_t spare[3] |
Spare data. Used for commands that take additional arguments