CPSW peripheral supports CPSW_2G, CPSW_5G and CPSW_9G found in SoCs of the Jacinto 7 family.
Features:
Compile-time configuration:
Typedefs | |
typedef void(* | Cpsw_MdioLinkStateChangeCb) (Cpsw_MdioLinkStateChangeInfo *info, void *appArg) |
CPSW PHY link state change callback function. More... | |
typedef void(* | Cpsw_PortLinkStatusChangeCb) (Enet_MacPort macPort, bool isLinkUp, void *appArg) |
CPSW port link status change callback function. More... | |
Enumerations | |
enum | Cpsw_Ioctl { CPSW_PER_IOCTL_SET_INTERVLAN_ROUTE_UNI_EGRESS = CPSW_PER_PUBLIC_IOCTL(0U), CPSW_PER_IOCTL_CLEAR_INTERVLAN_ROUTE_UNI_EGRESS = CPSW_PER_PUBLIC_IOCTL(1U), CPSW_PER_IOCTL_SET_INTERVLAN_ROUTE_MULTI_EGRESS = CPSW_PER_PUBLIC_IOCTL(2U), CPSW_PER_IOCTL_CLEAR_INTERVLAN_ROUTE_MULTI_EGRESS = CPSW_PER_PUBLIC_IOCTL(3U), CPSW_PER_IOCTL_SET_SHORT_IPG_CFG = CPSW_PER_PUBLIC_IOCTL(4U), CPSW_PER_IOCTL_GET_SHORT_IPG_CFG = CPSW_PER_PUBLIC_IOCTL(5U) } |
CPSW peripheral IOCTL commands. More... | |
Macros | |
#define | CPSW_PER_PUBLIC_IOCTL(x) |
Helper macro to create CPSW IOCTL commands. More... | |
#define | CPSW_MAC_PORT_NUM (8U) |
#define | CPSW_INTR_STATS_PEND0 (1U) |
CPSW statistics interrupt id. More... | |
#define | CPSW_INTR_MDIO_PEND (2U) |
CPSW MDIO interrupt id. More... | |
#define | CPSW_INTR_EVNT_PEND (3U) |
CPSW event pending interrupt (CPTS) id. More... | |
CPSW InterVLAN ingress packet match types. | |
Ingress packet match criteria for interVLAN routing. Each packet match criteria is represented by a bit. To enable multiple match criteria create bitmask ORing required ingress packet match criteria defines | |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_PORT (CPSW_ALE_POLICER_MATCH_PORT) |
Enable classifier match with PORT number. More... | |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_MACSRC (CPSW_ALE_POLICER_MATCH_MACSRC) |
Enable classifier match with MAC source address entry. More... | |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_MACDST (CPSW_ALE_POLICER_MATCH_MACDST) |
Enable classifier match with MAC destination address entry. More... | |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_ETHERTYPE (CPSW_ALE_POLICER_MATCH_ETHERTYPE) |
Enable classifier match with MAC destination address entry. More... | |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_IPSRC (CPSW_ALE_POLICER_MATCH_IPSRC) |
Enable classifier match with IPv4/IPv6 source address. More... | |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_IPDST (CPSW_ALE_POLICER_MATCH_IPDST) |
Enable classifier match with IPv4/IPv6 destination address. More... | |
#define CPSW_PER_PUBLIC_IOCTL | ( | x | ) |
Helper macro to create CPSW IOCTL commands.
#define CPSW_MAC_PORT_NUM (8U) |
Maximum number of MAC ports supported by this driver.
#define CPSW_INTERVLAN_INGRESSPKT_MATCH_PORT (CPSW_ALE_POLICER_MATCH_PORT) |
Enable classifier match with PORT number.
#define CPSW_INTERVLAN_INGRESSPKT_MATCH_MACSRC (CPSW_ALE_POLICER_MATCH_MACSRC) |
Enable classifier match with MAC source address entry.
#define CPSW_INTERVLAN_INGRESSPKT_MATCH_MACDST (CPSW_ALE_POLICER_MATCH_MACDST) |
Enable classifier match with MAC destination address entry.
#define CPSW_INTERVLAN_INGRESSPKT_MATCH_ETHERTYPE (CPSW_ALE_POLICER_MATCH_ETHERTYPE) |
Enable classifier match with MAC destination address entry.
#define CPSW_INTERVLAN_INGRESSPKT_MATCH_IPSRC (CPSW_ALE_POLICER_MATCH_IPSRC) |
Enable classifier match with IPv4/IPv6 source address.
#define CPSW_INTERVLAN_INGRESSPKT_MATCH_IPDST (CPSW_ALE_POLICER_MATCH_IPDST) |
Enable classifier match with IPv4/IPv6 destination address.
#define CPSW_INTR_STATS_PEND0 (1U) |
CPSW statistics interrupt id.
#define CPSW_INTR_MDIO_PEND (2U) |
CPSW MDIO interrupt id.
#define CPSW_INTR_EVNT_PEND (3U) |
CPSW event pending interrupt (CPTS) id.
typedef void(* Cpsw_MdioLinkStateChangeCb) (Cpsw_MdioLinkStateChangeInfo *info, void *appArg) |
CPSW PHY link state change callback function.
Callback for PHY link state change interrupt (MDIO_LINKINT). This callback is invoked from interrupt context.
typedef void(* Cpsw_PortLinkStatusChangeCb) (Enet_MacPort macPort, bool isLinkUp, void *appArg) |
CPSW port link status change callback function.
Callback for port link state change event. This callback is invoked when port link is fully functional (PHY linked, ALE ports enabled, etc) or when port link is fully shutdown (ALE ports disabled).
enum Cpsw_Ioctl |
CPSW peripheral IOCTL commands.
Enumerator | |
---|---|
CPSW_PER_IOCTL_SET_INTERVLAN_ROUTE_UNI_EGRESS | Setup interVLAN route for a single egress port. IOCTL parameters: |
CPSW_PER_IOCTL_CLEAR_INTERVLAN_ROUTE_UNI_EGRESS | Setup interVLAN route for a single egress port. IOCTL parameters:
|
CPSW_PER_IOCTL_SET_INTERVLAN_ROUTE_MULTI_EGRESS | Setup interVLAN route for a multiple egress port. IOCTL parameters: |
CPSW_PER_IOCTL_CLEAR_INTERVLAN_ROUTE_MULTI_EGRESS | Clear interVLAN route for a multiple egress port route. IOCTL parameters:
|
CPSW_PER_IOCTL_SET_SHORT_IPG_CFG | Configure short inter-packet gap (IPG) for specific MAC ports. IOCTL parameters:
|
CPSW_PER_IOCTL_GET_SHORT_IPG_CFG | Get the current short inter-packet gap (IPG) configuration for all open MAC ports. IOCTL parameters:
|