Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 0 additions & 105 deletions include/common/enet_osal_dflt.h

This file was deleted.

34 changes: 34 additions & 0 deletions include/common/enet_phymdio_dflt.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,40 @@ extern "C" {
/* Function Declarations */
/* ========================================================================== */

int32_t EnetPhyMdioDflt_isAlive(uint32_t phyAddr,
bool *isAlive,
Mdio_Obj * hMdio);

int32_t EnetPhyMdioDflt_isLinked(uint32_t phyAddr,
bool *isLinked,
Mdio_Obj * hMdio);

int32_t EnetPhyMdioDflt_readC22(uint32_t group,
uint32_t phyAddr,
uint32_t reg,
uint16_t *val,
Mdio_Obj * hMdio);

int32_t EnetPhyMdioDflt_writeC22(uint32_t group,
uint32_t phyAddr,
uint32_t reg,
uint16_t val,
Mdio_Obj * hMdio);

int32_t EnetPhyMdioDflt_readC45(uint32_t group,
uint32_t phyAddr,
uint8_t mmd,
uint16_t reg,
uint16_t *val,
Mdio_Obj * hMdio);

int32_t EnetPhyMdioDflt_writeC45(uint32_t group,
uint32_t phyAddr,
uint8_t mmd,
uint16_t reg,
uint16_t val,
Mdio_Obj * hMdio);

/*!
* \brief Get handle to the default Enet MDIO implementation.
*
Expand Down
39 changes: 0 additions & 39 deletions include/core/enet_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,6 @@ extern "C" {
/* Structures and Enums */
/* ========================================================================== */

/*!
* \brief Enet object.
*/
typedef struct Enet_Obj_s
{
/*! Underlying Ethernet Peripheral */
EnetPer_Obj *enetPer;

/*! Magic number used to indicate if driver has been opened */
Enet_Magic magic;

/*! Main, API-level Lock */
void *lock;
} Enet_Obj;

/*!
* \brief Ethernet driver handle.
*
* Ethernet driver opaque handle used to call any Enet related APIs.
*/
typedef struct Enet_Obj_s *Enet_Handle;

/* ========================================================================== */
/* Global Variables Declarations */
/* ========================================================================== */
Expand All @@ -114,18 +92,6 @@ typedef struct Enet_Obj_s *Enet_Handle;
/* Function Declarations */
/* ========================================================================== */

/*!
* \brief Get the Enet Peripheral handle associated with Enet driver.
*
* Gets the underlying Enet Peripheral handle associated with the given Enet
* driver.
*
* \param hEnet Enet handle
*
* \return EthPer handle
*/
static inline EnetPer_Handle Enet_getPerHandle(Enet_Handle hEnet);

/* ========================================================================== */
/* Deprecated Function Declarations */
/* ========================================================================== */
Expand All @@ -136,11 +102,6 @@ static inline EnetPer_Handle Enet_getPerHandle(Enet_Handle hEnet);
/* Static Function Definitions */
/* ========================================================================== */

static inline EnetPer_Handle Enet_getPerHandle(Enet_Handle hEnet)
{
return hEnet->enetPer;
}

#ifdef __cplusplus
}
#endif
Expand Down
59 changes: 54 additions & 5 deletions include/core/enet_ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,71 @@ extern "C" {
* #ENET_SINPROGRESS if operation is asynchronous and was initiated successfully.
* \ref Enet_ErrorCodes in case of any failure.
*/
#ifdef ENET_CPSW
#define ENET_IOCTL(hEnet, coreId, ioctlCmd, prms, status) \
do { \
extern int32_t Enet_ioctl(Enet_Handle enetHandle, \
uint32_t ioctlCoreId, \
uint32_t cmd, \
Enet_IoctlPrms *ioctlPrms); \
extern int32_t Cpsw_ioctl(uint32_t enetHandle, \
uint32_t cmd, \
Enet_IoctlPrms *ioctlPrms); \
extern int32_t Enet_ioctl_register_##ioctlCmd(uint32_t enetHandle, \
uint32_t ioctlCoreId); \
\
status = Enet_ioctl_register_##ioctlCmd(hEnet, coreId); \
if (ENET_SOK == status) \
{ \
status = Cpsw_ioctl(hEnet, ioctlCmd, prms); \
} \
} while (0)
#endif

#ifdef ENET_ICSSG
#define ENET_IOCTL(hEnet, coreId, ioctlCmd, prms, status) \
do { \
extern int32_t Icssg_ioctl(uint32_t enetHandle, \
uint32_t cmd, \
Enet_IoctlPrms *ioctlPrms); \
extern int32_t Enet_ioctl_register_##ioctlCmd(uint32_t enetHandle, \
uint32_t ioctlCoreId); \
\
status = Enet_ioctl_register_##ioctlCmd(hEnet, coreId); \
if (ENET_SOK == status) \
{ \
status = Icssg_ioctl(hEnet, ioctlCmd, prms); \
} \
} while (0)
#endif

#ifdef ENET_CPSW_AND_ICSSG
#define ENET_IOCTL(hEnet, coreId, ioctlCmd, prms, status) \
do { \
bool isCpsw = ((hEnet->enetPer->enetType == ENET_GMAC_3G) || \
(hEnet->enetPer->enetType == ENET_CPSW_2G) || \
(hEnet->enetPer->enetType == ENET_CPSW_3G) || \
(hEnet->enetPer->enetType == ENET_CPSW_5G) || \
(hEnet->enetPer->enetType == ENET_CPSW_9G)); \
extern int32_t Cpsw_ioctl(Enet_Handle enetHandle, \
uint32_t cmd, \
Enet_IoctlPrms *ioctlPrms); \
extern int32_t Icssg_ioctl(Enet_Handle enetHandle, \
uint32_t cmd, \
Enet_IoctlPrms *ioctlPrms); \
extern int32_t Enet_ioctl_register_##ioctlCmd(Enet_Handle enetHandle, \
uint32_t ioctlCoreId); \
\
status = Enet_ioctl_register_##ioctlCmd(hEnet, coreId); \
if (ENET_SOK == status) \
{ \
status = Enet_ioctl(hEnet, coreId, ioctlCmd, prms); \
if(isCpsw == true) \
{ \
status = Cpsw_ioctl(hEnet, ioctlCmd, prms); \
} \
else \
{ \
status = Icssg_ioctl(hEnet, ioctlCmd, prms); \
} \
} \
} while (0)
#endif


/* ========================================================================== */
Expand Down
Loading