AM64x MCU+ SDK  08.05.00
cpsw_macport.h File Reference

Introduction

This file contains the type definitions and helper macros for the CPSW MAC port module interface.

Go to the source code of this file.

Data Structures

struct  CpswMacPort_TxShortIpgCfg
 Configuration of transmit short inter packet gap feature. More...
 
struct  CpswMacPort_PortTxShortIpgCfg
 MAC port's short gap configuration. More...
 
struct  CpswMacPort_InterVlanRoutingCfg
 Port interVLAN configuration parameters. More...
 
struct  CpswMacPort_FifoStats
 FIFO related statistics of a MAC port. More...
 
struct  CpswMacPort_IpTsCfg
 Port IP configuration for time synchronization events. More...
 
struct  CpswMacPort_TsEventCfg
 Port configuration for time synchronization. More...
 
struct  CpswMacPort_EnableTsEventInArgs
 Input args for CPSW_MACPORT_IOCTL_ENABLE_CPTS_EVENT. More...
 
struct  CpswMacPort_EstTimestampCfg
 EST timestamping configuration parameters. More...
 
struct  CpswMacPort_Cfg
 MAC port module configuration parameters. More...
 

Macros

#define CPSW_MACPORT_PUBLIC_IOCTL(x)
 Helper macro to create IOCTL commands for CPSW MAC port module. More...
 
#define CPSW_MACPORT_EST_TIME_INTERVAL_MIN   (0x010U)
 EST non-zero minimum time interval, in wireside clocks. Needed to guarantee that next fetch value has time to be fetched before current fetch count is over. More...
 
#define CPSW_MACPORT_EST_TIME_INTERVAL_MAX   (0x3FFFU)
 EST maximum time interval (14-bit), in wireside clocks. More...
 
#define CPSW_MACPORT_EST_TIME_STEP_1G   (8U)
 Time interval step in nsecs for 1 Gbps link. More...
 
#define CPSW_MACPORT_EST_TIME_STEP_100M   (40U)
 Time interval step in nsecs for 100 Mbps link. More...
 
#define CPSW_MACPORT_EST_TIME_STEP_10M   (400U)
 Time interval step in nsecs for a 10 Mbps link. More...
 
#define CPSW_MACPORT_EST_TIME_MIN(speed)   (CPSW_MACPORT_EST_TIME_STEP_##speed * CPSW_MACPORT_EST_TIME_INTERVAL_MIN)
 Min time interval in nsecs for given link speed. More...
 
#define CPSW_MACPORT_EST_TIME_MAX(speed)   (CPSW_MACPORT_EST_TIME_STEP_##speed * CPSW_MACPORT_EST_TIME_INTERVAL_MAX)
 Max time interval in nsecs for given link speed. More...
 
#define CPSW_MACPORT_EST_ALLOWCNT_FACTOR_1G   (1U)
 EST allow count scaling factor for 1 Gbps link. More...
 
#define CPSW_MACPORT_EST_ALLOWCNT_FACTOR_100M   (2U)
 EST allow count scaling factor for 100 Mbps link. More...
 
#define CPSW_MACPORT_EST_ALLOWCNT_FACTOR_10M   (2U)
 EST allow count scaling factor for 10 Mbps link. More...
 
#define CPSW_MACPORT_EST_GUARD_BAND(maxPktSize, speed)
 Guard band duration in nsecs for given link speed and maximum packet size in previous time interval. More...
 

Enumerations

enum  CpswMacPort_Ioctl {
  CPSW_MACPORT_IOCTL_GET_FIFO_STATS = CPSW_MACPORT_PUBLIC_IOCTL(0U), CPSW_MACPORT_IOCTL_ENABLE_CPTS_EVENT = CPSW_MACPORT_PUBLIC_IOCTL(1U), CPSW_MACPORT_IOCTL_DISABLE_CPTS_EVENT = CPSW_MACPORT_PUBLIC_IOCTL(2U), CPSW_MACPORT_IOCTL_EST_ENABLE_TIMESTAMP = CPSW_MACPORT_PUBLIC_IOCTL(3U),
  CPSW_MACPORT_IOCTL_EST_DISABLE_TIMESTAMP = CPSW_MACPORT_PUBLIC_IOCTL(4U)
}
 CPSW MAC port IOCTL commands. More...
 
enum  CpswMacPort_InterVlanRouteId {
  CPSW_MACPORT_INTERVLAN_ROUTEID_FIRST, CPSW_MACPORT_INTERVLAN_ROUTEID_1 = CPSW_MACPORT_INTERVLAN_ROUTEID_FIRST, CPSW_MACPORT_INTERVLAN_ROUTEID_2, CPSW_MACPORT_INTERVLAN_ROUTEID_3,
  CPSW_MACPORT_INTERVLAN_ROUTEID_4, CPSW_MACPORT_INTERVLAN_ROUTEID_LAST = CPSW_MACPORT_INTERVLAN_ROUTEID_4
}
 MAC port interVLAN route identifier. More...
 
enum  CpswMacPort_EstTimestampMode { CPSW_MACPORT_EST_TIMESTAMP_ALL, CPSW_MACPORT_EST_TIMESTAMP_ONEPRI, CPSW_MACPORT_EST_TIMESTAMP_FIRST, CPSW_MACPORT_EST_TIMESTAMP_FIRST_ONEPRI }
 EST timestamping modes. More...
 

Functions

void CpswMacPort_initCfg (CpswMacPort_Cfg *macPortCfg)
 Initialize CPSW MAC port configuration parameters. More...