Functions
SERDES ETHERNET

Functions

CSL_IDEF_INLINE CSL_SERDES_RESULT CSL_EthernetSerdesInit (uint32_t base_addr, CSL_SERDES_REF_CLOCK ref_clock, CSL_SERDES_LINK_RATE rate)
CSL_IDEF_INLINE void CSL_EthernetSerdesLaneConfig (uint32_t base_addr, CSL_SERDES_REF_CLOCK ref_clock, CSL_SERDES_LINK_RATE rate, uint32_t lane_num)
CSL_IDEF_INLINE void CSL_EthernetSerdesComEnable (uint32_t base_addr)
CSL_IDEF_INLINE
CSL_SERDES_LANE_ENABLE_STATUS 
CSL_EthernetSerdesLaneEnable (uint32_t base_addr, uint32_t lane_num, CSL_SERDES_LOOPBACK loopback_mode, CSL_SERDES_LANE_CTRL_RATE lane_ctrl_rate)
CSL_IDEF_INLINE void CSL_EthernetSerdesLaneDisable (uint32_t base_addr, uint32_t lane_num)
CSL_IDEF_INLINE void CSL_EthernetSerdesLaneReset (uint32_t base_addr, uint32_t lane_num)
CSL_IDEF_INLINE void CSL_EthernetSerdesPllEnable (uint32_t base_addr)
CSL_IDEF_INLINE CSL_SERDES_STATUS CSL_EthernetSerdesGetStatus (uint32_t base_addr, uint32_t num_lanes)
CSL_IDEF_INLINE CSL_SERDES_STATUS CSL_EthernetSerdesGetPLLStatus (uint32_t base_addr)
CSL_IDEF_INLINE CSL_SERDES_STATUS CSL_EthernetSerdesGetLaneStatus (uint32_t base_addr, uint32_t lane_num)
CSL_IDEF_INLINE void CSL_EthernetSerdesShutdown (uint32_t base_addr)

Detailed Description

============================================================================

Introduction

Overview

This module deals with setting up SERDES configuration for ETHERNET. The API flow should be as follows:

CSL_EthernetSerdesInit (base_addr, ref_clock, rate);

CSL_EthernetSerdesLaneConfig (base_addr, ref_clock, rate, lane_num);

CSL_EthernetSerdesComEnable (base_addr);

CSL_EthernetSerdesLaneEnable (base_addr, lane_num, link_rate, loopback_mode, lane_ctrl_rate);

CSL_EthernetSerdesPllEnable (base_addr);

CSL_EthernetSerdesGetStatus (base_addr, num_lanes);

OR

CSL_EthernetSerdesGetPLLStatus (base_addr);

CSL_EthernetSerdesGetLaneStatus (base_addr, lane_num); Individual lane status

References

============================================================================


Function Documentation

CSL_IDEF_INLINE void CSL_EthernetSerdesComEnable ( uint32_t  base_addr)

============================================================================
CSL_EthernetSerdesComEnable

Description
This API is currently deprecated and the functionality is integrated into CSL_EthernetSerdesInit API. It is currently used for backwards compatibility.

Arguments base_addr

Return Value None

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
     CSL_EthernetSerdesComEnable(CSL_NETCP_SERDES_CFG_REGS);

    

===========================================================================

CSL_IDEF_INLINE CSL_SERDES_STATUS CSL_EthernetSerdesGetLaneStatus ( uint32_t  base_addr,
uint32_t  lane_num 
)

============================================================================
CSL_EthernetSerdesGetLaneStatus

Description
This API returns the status of the Lanes

Arguments base_addr, lane_num

Return Value CSL_SERDES_STATUS

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
     CSL_EthernetSerdesGetLaneStatus(CSL_NETCP_SERDES_CFG_REGS, 0);

    

===========================================================================

CSL_IDEF_INLINE CSL_SERDES_STATUS CSL_EthernetSerdesGetPLLStatus ( uint32_t  base_addr)

============================================================================
CSL_EthernetSerdesGetPLLStatus

Description
This API returns the status of the PLL lock

Arguments base_addr

Return Value CSL_SERDES_STATUS

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
     CSL_EthernetSerdesGetPLLStatus(CSL_NETCP_SERDES_CFG_REGS);

    

===========================================================================

CSL_IDEF_INLINE CSL_SERDES_STATUS CSL_EthernetSerdesGetStatus ( uint32_t  base_addr,
uint32_t  num_lanes 
)

============================================================================
CSL_EthernetSerdesGetStatus

Description
This API returns the status of the PLL lock

Arguments base_addr, num_lanes

Return Value CSL_SERDES_STATUS

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
     CSL_EthernetSerdesGetStatus(CSL_NETCP_SERDES_CFG_REGS, 4);

    

===========================================================================

CSL_IDEF_INLINE CSL_SERDES_RESULT CSL_EthernetSerdesInit ( uint32_t  base_addr,
CSL_SERDES_REF_CLOCK  ref_clock,
CSL_SERDES_LINK_RATE  rate 
)

============================================================================
CSL_EthernetSerdesInit

Description
This API initializes the Serdes CMU and COMLANE registers.

Arguments base_addr, ref_clock, rate

Return Value CSL_SERDES_RESULT

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
    csl_retval = CSL_EthernetSerdesInit(CSL_NETCP_SERDES_CFG_REGS, CSL_SERDES_REF_CLOCK_156p25M, CSL_SERDES_LINK_RATE_1p25G);

    

===========================================================================

CSL_IDEF_INLINE void CSL_EthernetSerdesLaneConfig ( uint32_t  base_addr,
CSL_SERDES_REF_CLOCK  ref_clock,
CSL_SERDES_LINK_RATE  rate,
uint32_t  lane_num 
)

============================================================================
CSL_EthernetSerdesLaneConfig

Description
This API is currently deprecated and the functionality is integrated into CSL_EthernetSerdesInit API. It is currently used for backwards compatibility.

Arguments base_addr, ref_clock, rate, lane_num

Return Value None

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
     CSL_EthernetSerdesLaneConfig(CSL_NETCP_SERDES_CFG_REGS, CSL_SERDES_REF_CLOCK_156p25M, CSL_SERDES_LINK_RATE_1p25G, 1);

    

===========================================================================

CSL_IDEF_INLINE void CSL_EthernetSerdesLaneDisable ( uint32_t  base_addr,
uint32_t  lane_num 
)

============================================================================
CSL_EthernetSerdesLaneDisable

Description
This API disables the Serdes Lanes

Arguments base_addr, lane_num

Return Value None

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
     CSL_EthernetSerdesLaneDisable(CSL_NETCP_SERDES_CFG_REGS, 0);

    

===========================================================================

CSL_IDEF_INLINE CSL_SERDES_LANE_ENABLE_STATUS CSL_EthernetSerdesLaneEnable ( uint32_t  base_addr,
uint32_t  lane_num,
CSL_SERDES_LOOPBACK  loopback_mode,
CSL_SERDES_LANE_CTRL_RATE  lane_ctrl_rate 
)

============================================================================
CSL_EthernetSerdesLaneEnable

Description
This API enables the Serdes CMU and COMLANE

Arguments base_addr, lane_num, loopback_mode, lane_ctrl_rate

Return Value CSL_SERDES_LANE_ENABLE_STATUS

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
Only CSL_SERDES_LANE_QUARTER_RATE is supported for Ethernet.

Example

 
     CSL_EthernetSerdesLaneEnable(CSL_NETCP_SERDES_CFG_REGS, 0, CSL_SERDES_LOOPBACK_DISABLED, CSL_SERDES_LANE_QUARTER_RATE);

    

===========================================================================

CSL_IDEF_INLINE void CSL_EthernetSerdesLaneReset ( uint32_t  base_addr,
uint32_t  lane_num 
)

============================================================================
CSL_EthernetSerdesLaneReset

Description
This API resets the Serdes Lanes

Arguments base_addr, lane_num

Return Value None

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
     CSL_EthernetSerdesLaneReset(CSL_NETCP_SERDES_CFG_REGS, 0);

    

===========================================================================

CSL_IDEF_INLINE void CSL_EthernetSerdesPllEnable ( uint32_t  base_addr)

============================================================================
CSL_EthernetSerdesPllEnable

Description
This API enables the PLL

Arguments base_addr

Return Value None

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
     CSL_EthernetSerdesPllEnable(CSL_NETCP_SERDES_CFG_REGS);

    

===========================================================================

CSL_IDEF_INLINE void CSL_EthernetSerdesShutdown ( uint32_t  base_addr)

============================================================================
CSL_EthernetSerdesShutdown

Description
This API shuts down the Serdes by Disabling and Resetting the Serdes

Arguments base_addr

Return Value None

Pre Condition
None

Post Condition
None

Reads
None

Usage Constraints:
None

Example

 
     CSL_EthernetSerdesShutdown(CSL_NETCP_SERDES_CFG_REGS);

    

===========================================================================


Copyright 2014, Texas Instruments Incorporated