PDK API Guide for J721E
|
This file contains private type definitions and helper macros for the MDIO port module which are meant for internal use in Enet Per drivers.
Go to the source code of this file.
Data Structures | |
struct | Mdio_PhyStatus |
MDIO PHY status. More... | |
struct | Mdio_Callbacks |
MDIO callback functions. More... | |
struct | Mdio_Obj |
MDIO port object. More... | |
Macros | |
#define | MDIO_PRIVATE_IOCTL(x) |
Helper macro to create private IOCTL commands for MDIO module. More... | |
#define | MDIO_FEATURE_CLAUSE45 (ENET_BIT(0U)) |
MDIO Clause-45 feature mask. More... | |
Typedefs | |
typedef void(* | Mdio_LinkStateCallback) (EnetMdio_Group group, Mdio_PhyStatus *phyStatus, void *cbArgs) |
MDIO link state change callback function. More... | |
typedef void(* | Mdio_UserAccessCallback) (EnetMdio_Group group, uint8_t phyAddr, void *cbArgs) |
MDIO user access completion callback function. More... | |
typedef Mdio_Obj * | Mdio_Handle |
MDIO module handle. More... | |
Enumerations | |
enum | Mdio_PrivIoctls { MDIO_IOCTL_HANDLE_INTR = MDIO_PRIVATE_IOCTL(0U) } |
MDIO private IOCTL commands. More... | |
Functions | |
int32_t | Mdio_open (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize) |
Open and initialize MDIO. More... | |
int32_t | Mdio_rejoin (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId) |
Rejoin a running MDIO. More... | |
int32_t | Mdio_ioctl (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms) |
Run an IOCTL operation on MDIO. More... | |
int32_t | Mdio_ioctlManualMode (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms) |
Run an IOCTL operation on MDIO when MDIO manual mode is enabled. More... | |
void | Mdio_close (EnetMod_Handle hMod) |
Close MDIO. More... | |
#define MDIO_PRIVATE_IOCTL | ( | x | ) |
Helper macro to create private IOCTL commands for MDIO module.
#define MDIO_FEATURE_CLAUSE45 (ENET_BIT(0U)) |
MDIO Clause-45 feature mask.
typedef void(* Mdio_LinkStateCallback) (EnetMdio_Group group, Mdio_PhyStatus *phyStatus, void *cbArgs) |
MDIO link state change callback function.
Callback for the MDIO link state change interrupt (MDIO_LINKINT). This callback is invoked from interrupt context.
group | User channel or group |
phyStatus | PHY status: alive and linked masks |
cbArgs | Callback function arguments |
typedef void(* Mdio_UserAccessCallback) (EnetMdio_Group group, uint8_t phyAddr, void *cbArgs) |
MDIO user access completion callback function.
group | User channel or group |
phyAddr | Address of the PHY that completed access |
cbArgs | Callback function arguments |
typedef Mdio_Obj* Mdio_Handle |
MDIO module handle.
enum Mdio_PrivIoctls |
MDIO private IOCTL commands.
Enumerator | |
---|---|
MDIO_IOCTL_HANDLE_INTR | Handle MDIO_INTR which combines MDIO_LINKINT and MDIO_USERINT events. IOCTL parameters: inArgs: Mdio_Callbacks outArgs: None |
int32_t Mdio_open | ( | EnetMod_Handle | hMod, |
Enet_Type | enetType, | ||
uint32_t | instId, | ||
const void * | cfg, | ||
uint32_t | cfgSize | ||
) |
Open and initialize MDIO.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
cfg | Configuration parameters |
cfgSize | Size of the configuration parameters |
int32_t Mdio_rejoin | ( | EnetMod_Handle | hMod, |
Enet_Type | enetType, | ||
uint32_t | instId | ||
) |
Rejoin a running MDIO.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
instId | Enet Peripheral instance id |
int32_t Mdio_ioctl | ( | EnetMod_Handle | hMod, |
uint32_t | cmd, | ||
Enet_IoctlPrms * | prms | ||
) |
Run an IOCTL operation on MDIO.
hMod | Enet Module handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
int32_t Mdio_ioctlManualMode | ( | EnetMod_Handle | hMod, |
uint32_t | cmd, | ||
Enet_IoctlPrms * | prms | ||
) |
Run an IOCTL operation on MDIO when MDIO manual mode is enabled.
hMod | Enet Module handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
void Mdio_close | ( | EnetMod_Handle | hMod | ) |
Close MDIO.
hMod | Enet Module handle |