PDK API Guide for J721E
CPSW_SS_S Functions

Introduction

Functions

void CSL_CPSW_SS_getVersionInfo (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs, CSL_CPSW_SS_VERSION *versionInfo)
 
void CSL_CPSW_SS_INTD_getVersionInfo (CSL_cpswRegs_INTD *hCpswIntDRegs, CSL_CPSW_SS_INTD_VERSION *versionInfo)
 
Uint32 CSL_CPSW_SS_INTD_getEOIVector (CSL_cpswRegs_INTD *hCpswIntDRegs)
 
void CSL_CPSW_SS_INTD_setEOIVector (CSL_cpswRegs_INTD *hCpswIntDRegs, Uint32 eoiVector)
 
Uint32 CSL_CPSW_SS_INTD_getEOIIntrVector (CSL_cpswRegs_INTD *hCpswIntDRegs)
 
Uint32 CSL_CPSW_SS_INTD_getIntrVectorOutPulse (CSL_cpswRegs_INTD *hCpswIntDRegs)
 
void CSL_CPSW_SS_INTD_setEnableIntrCPSWEventInterrupt (CSL_cpswRegs_INTD *hCpswIntDRegs, Uint32 enable)
 
Uint32 CSL_CPSW_SS_INTD_getEnableIntrCPSWEventInterrupt (CSL_cpswRegs_INTD *hCpswIntDRegs)
 
void CSL_CPSW_SS_INTD_setClearIntrCPSWEventInterrupt (CSL_cpswRegs_INTD *hCpswIntDRegs)
 
void CSL_CPSW_SS_INTD_getStatusIntr (CSL_cpswRegs_INTD *hCpswIntDRegs, CSL_CPSW_SS_INTD_INTRSTATUS *intrStatus)
 
void CSL_CPSW_SS_INTD_setEnableIntrMdioInterrupt (CSL_cpswRegs_INTD *hCpswIntDRegs, Uint32 enable)
 
Uint32 CSL_CPSW_SS_INTD_getEnableIntrMdioInterrupt (CSL_cpswRegs_INTD *hCpswIntDRegs)
 
void CSL_CPSW_SS_INTD_setClearIntrMdioInterrupt (CSL_cpswRegs_INTD *hCpswIntDRegs)
 
void CSL_CPSW_SS_INTD_setEnableIntrStatInterrupt (CSL_cpswRegs_INTD *hCpswIntDRegs, Uint32 enable)
 
Uint32 CSL_CPSW_SS_INTD_getEnableIntrStatInterrupt (CSL_cpswRegs_INTD *hCpswIntDRegs)
 
void CSL_CPSW_SS_INTD_setClearIntrStatInterrupt (CSL_cpswRegs_INTD *hCpswIntDRegs)
 
void CSL_CPSW_SS_setSGMIIMode (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs, Uint32 macPortNum, CSL_SGMII_MODE sgmiiModeId)
 
void CSL_CPSW_SS_getRGMIIStatus (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs, Uint32 macPortNum, CSL_CPSW_SS_RGMIISTATUS *pRgmiiStatus)
 
Uint32 CSL_CPSW_SS_getSerdesResetIsolation (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs)
 
void CSL_CPSW_SS_setSerdesResetIsolation (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs, Uint32 resetIso)
 
Uint32 CSL_CPSW_SS_getQSGMIIControlRdCd (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs, Uint32 qsgmiiId)
 
void CSL_CPSW_SS_setQSGMIIControlRdCd (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs, Uint32 qsgmiiId, Uint32 qsgmiiControlRdCd)
 
Uint32 CSL_CPSW_SS_getQSGMIIStatusRxSync (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs, Uint32 qsgmiiId)
 
Uint32 CSL_CPSW_SS_getXGMIILinkStatus (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs, Uint32 xgmiiId)
 
Uint32 CSL_CPSW_SS_getSGMIILinkStatus (CSL_Xge_cpsw_ss_sRegs *hCpswSsRegs, Uint32 sgmiiId)
 

Function Documentation

void CSL_CPSW_SS_getVersionInfo ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs,
CSL_CPSW_SS_VERSION versionInfo 
)

============================================================================
CSL_CPSW_SS_getVersionInfo

Description
This function retrieves the ethernet switch subsystem version information.

Arguments

       versionInfo         CSL_CPSW_SS_VERSION structure that needs to be populated
                           with the version info read from the hardware.
*   

Return Value
None

Pre Condition
None

Post Condition
None

Reads
XGE_CPSW_SS_S_IDVER_REG_MINOR_VER, XGE_CPSW_SS_S_IDVER_REG_MAJOR_VER, XGE_CPSW_SS_S_IDVER_REG_RTL_VER, XGE_CPSW_SS_S_IDVER_REG_IDENT

Example

       CSL_CPSW_SS_VERSION    versionInfo;

       CSL_CPSW_SS_getVersionInfo (&versionInfo);

void CSL_CPSW_SS_INTD_getVersionInfo ( CSL_cpswRegs_INTD *  hCpswIntDRegs,
CSL_CPSW_SS_INTD_VERSION versionInfo 
)

============================================================================
CSL_CPSW_SS_getIntdVersionInfo

Description
This function retrieves the CPSW_SS INTD information.

Arguments

       versionInfo         CSL_CPSW_SS_INTD_VERSION structure that needs to be
                           populated with the version info read from the hardware.
*   

Return Value
None


Uint32 CSL_CPSW_SS_INTD_getEOIVector ( CSL_cpswRegs_INTD *  hCpswIntDRegs)

============================================================================
CSL_CPSW_SS_INTD_getEOIVector

Description
This function retrieves the CPSW_SS INTD EOI_VECTOR from EOI_REG The EOI Register allows the software to perform an end of interrupt handshake to interrupts with an IP that does not have an EOI register. The EOI handshake allows system interrupts to be re-evaluated for the associate logic with the EOI vector value (to allow multiple logic paths to re-evaluate individually without separate EOI registers). The EOI occurs the cycle after the register is written

Arguments

       none
*   

Return Value
eoiVector


void CSL_CPSW_SS_INTD_setEOIVector ( CSL_cpswRegs_INTD *  hCpswIntDRegs,
Uint32  eoiVector 
)

============================================================================
CSL_CPSW_SS_INTD_setEOIVector

Description
This function set the CPSW_SS INTD EOI_VECTOR in EOI_REG The EOI Register allows the software to perform an end of interrupt handshake to interrupts with an IP that does not have an EOI register. The EOI handshake allows system interrupts to be re-evaluated for the associate logic with the EOI vector value (to allow multiple logic paths to re-evaluate individually without separate EOI registers). The EOI occurs the cycle after the register is written

Arguments

       eoiVector EOI vector to be set
*   

Return Value
none


Uint32 CSL_CPSW_SS_INTD_getEOIIntrVector ( CSL_cpswRegs_INTD *  hCpswIntDRegs)

============================================================================
CSL_CPSW_SS_INTD_getEOIIntrVector

Description
This function retrieves the CPSW_SS INTD INTR_VECTOR from INTR_VECTOR_REG

The EOI Interrupt Vector Register captures the active and prioritized interrupts so that software may quickly read the values rather than check every bit in the IP Interrupt Source Register. The exact definition of this register is configuration dependent Arguments

       none
*   

Return Value
intrVector EOI Interrupt Vector value. This has the latest prioritized interrupt values.


Uint32 CSL_CPSW_SS_INTD_getIntrVectorOutPulse ( CSL_cpswRegs_INTD *  hCpswIntDRegs)

============================================================================
CSL_CPSW_SS_INTD_getIntrVectorOutPulse

Description
This function get the CPSW_SS INTD INTR_VECTOR_REG_OUT_PULSE

Arguments

       none
*   

Return Value
intrVectorOutPulse field from INTR_VECTOR_REG_OUT_PULSE The Interrupt Vector Registers captures the interrupt vector of active and prioritized interrupts for each host based in that hosts' enabled interrupts


void CSL_CPSW_SS_INTD_setEnableIntrCPSWEventInterrupt ( CSL_cpswRegs_INTD *  hCpswIntDRegs,
Uint32  enable 
)

============================================================================
CSL_CPSW_SS_INTD_setEnableIntrCPSWEventInterrupt

Description
This function enables/disables the CPSW event interrupt

Arguments

       enable Flag to enable/disable
*   

Return Value
none


Uint32 CSL_CPSW_SS_INTD_getEnableIntrCPSWEventInterrupt ( CSL_cpswRegs_INTD *  hCpswIntDRegs)

============================================================================
CSL_CPSW_SS_INTD_getEnableIntrCPSWEventInterrupt

Description
This function returns flag indicating if the CPSW event interrupt is enabled

Arguments

       none
*   

Return Value
Flag indicating if the interrupt is enabled or not


void CSL_CPSW_SS_INTD_setClearIntrCPSWEventInterrupt ( CSL_cpswRegs_INTD *  hCpswIntDRegs)

============================================================================
CSL_CPSW_SS_INTD_setClearIntrCPSWEventInterrupt

Description
This function clears the CPSW EVENT Interrupt status by writing to the ENABLE_CLR_REG_OUT_PULSE_0 register

Arguments

       none
*   

Return Value
none


void CSL_CPSW_SS_INTD_getStatusIntr ( CSL_cpswRegs_INTD *  hCpswIntDRegs,
CSL_CPSW_SS_INTD_INTRSTATUS intrStatus 
)

============================================================================
CSL_CPSW_SS_INTD_getStatusIntr

Description
This function returns CSL_CPSW_SS_INTD_INTRSTATUS populated with status of various CPSW interrupts

Arguments

       intrStatus Interrupt status to be populated
*   

Return Value
none


void CSL_CPSW_SS_INTD_setEnableIntrMdioInterrupt ( CSL_cpswRegs_INTD *  hCpswIntDRegs,
Uint32  enable 
)

============================================================================
CSL_CPSW_SS_INTD_setEnableIntrMdioInterrupt

Description
This function enables/disables the MDIO interrupt

Arguments

       enable Flag to enable/disable
*   

Return Value
none


Uint32 CSL_CPSW_SS_INTD_getEnableIntrMdioInterrupt ( CSL_cpswRegs_INTD *  hCpswIntDRegs)

============================================================================
CSL_CPSW_SS_INTD_getEnableIntrMdioInterrupt

Description
This function returns flag indicating if the MDIO interrupt is enabled

Arguments

       none
*   

Return Value
Flag indicating if the interrupt is enabled or not


void CSL_CPSW_SS_INTD_setClearIntrMdioInterrupt ( CSL_cpswRegs_INTD *  hCpswIntDRegs)

============================================================================
CSL_CPSW_SS_INTD_setClearIntrMdioInterrupt

Description
This function clears the CPSW MDIO Interrupt status by writing to the ENABLE_CLR_REG_OUT_PULSE_0 register

Arguments

       none
*   

Return Value
none


void CSL_CPSW_SS_INTD_setEnableIntrStatInterrupt ( CSL_cpswRegs_INTD *  hCpswIntDRegs,
Uint32  enable 
)

============================================================================
CSL_CPSW_SS_INTD_setEnableIntrStatInterrupt

Description
This function enables/disables the STAT interrupt

Arguments

       enable Flag to enable/disable
*   

Return Value
none


Uint32 CSL_CPSW_SS_INTD_getEnableIntrStatInterrupt ( CSL_cpswRegs_INTD *  hCpswIntDRegs)

============================================================================
CSL_CPSW_SS_INTD_getEnableIntrStatInterrupt

Description
This function returns flag indicating if the STAT interrupt is enabled

Arguments

       none
*   

Return Value
Flag indicating if the interrupt is enabled or not


void CSL_CPSW_SS_INTD_setClearIntrStatInterrupt ( CSL_cpswRegs_INTD *  hCpswIntDRegs)

============================================================================
CSL_CPSW_SS_INTD_setClearIntrStatInterrupt

Description
This function clears the CPSW STAT Interrupt status by writing to the ENABLE_CLR_REG_OUT_PULSE_0 register

Arguments

       none
*   

Return Value
none


void CSL_CPSW_SS_setSGMIIMode ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs,
Uint32  macPortNum,
CSL_SGMII_MODE  sgmiiModeId 
)

============================================================================
CSL_CPSW_SS_setSGMIIMode

Description
This function sets the SGMII mode (fiber or copper) for the given macPort

Arguments

       macPortNum Mac Port for which SGMII mode is set
       sgmiiModeId CSL_SGMII_MODE value
*   

Return Value
none


void CSL_CPSW_SS_getRGMIIStatus ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs,
Uint32  macPortNum,
CSL_CPSW_SS_RGMIISTATUS pRgmiiStatus 
)

============================================================================
CSL_CPSW_SS_getRGMIIStatus

Description
This function returns the RGMII status for the given macPort

Arguments

       macPortNum Mac Port for which RGMII status is queried
       pRgmiiStatus RGMII status to be populated
*   

Return Value
none


Uint32 CSL_CPSW_SS_getSerdesResetIsolation ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs)

============================================================================
CSL_CPSW_SS_getSerdesResetIsolation

Description
This function returns the Serdes reset isolation configuration

Arguments

       none
*   

Return Value
Serdes Reset isolation value


void CSL_CPSW_SS_setSerdesResetIsolation ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs,
Uint32  resetIso 
)

============================================================================
CSL_CPSW_SS_setSerdesResetIsolation

Description
This function sets the serdes reset isolation configuration

Arguments

       resetIso Reset isolation configuration to be set
*   

Return Value
none


Uint32 CSL_CPSW_SS_getQSGMIIControlRdCd ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs,
Uint32  qsgmiiId 
)

============================================================================
CSL_CPSW_SS_getQSGMIIControlRdCd

Description
This function returns the QSGMII control register for the given qsgmii

Arguments

       qsgmiiId  QSGMII (0/1) for which the QSGMII control register is queried
*   

Return Value
QSGMII control configuration for the given QSGMII id


void CSL_CPSW_SS_setQSGMIIControlRdCd ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs,
Uint32  qsgmiiId,
Uint32  qsgmiiControlRdCd 
)

============================================================================
CSL_CPSW_SS_setQSGMIIControlRdCd

Description
This function sets the QSGMII control register for the given qsgmii

Arguments

       qsgmiiId  QSGMII (0/1) for which the QSGMII control register is set
       qsgmiiControlRdCd QSMII control configuration
*   

Return Value
QSGMII control configuration for the given QSGMII id


Uint32 CSL_CPSW_SS_getQSGMIIStatusRxSync ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs,
Uint32  qsgmiiId 
)

============================================================================
CSL_CPSW_SS_getQSGMIIStatusRxSync

Description
This function returns the QSGMII status register for the given qsgmii

Arguments

       qsgmiiId  QSGMII (0/1) for which the QSGMII status register is queried
*   

Return Value
QSGMII status for the given QSGMII id


Uint32 CSL_CPSW_SS_getXGMIILinkStatus ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs,
Uint32  xgmiiId 
)

============================================================================
CSL_CPSW_SS_getXGMIILinkStatus

Description
This function returns the XGMII link status register for the given xgmii

Arguments

       xgmiiid  XGMII (0/1) for which the XGMII status register is queried
*   

Return Value
XGMII status for the given XGMII id


Uint32 CSL_CPSW_SS_getSGMIILinkStatus ( CSL_Xge_cpsw_ss_sRegs *  hCpswSsRegs,
Uint32  sgmiiId 
)

============================================================================
CSL_CPSW_SS_getSGMIILinkStatus

Description
This function returns the SGMII link status register for the given sgmii

Arguments

       qsgmiiId  QSGMII (0/1) for which the QSGMII status register is queried
*   

Return Value
SGMII link status for the given SGMII id