![]() |
![]() |
This file contains the main structure definitions and function prototypes of the CPSW driver. More...
#include <ti/drv/cpsw/include/cpsw_types.h>
#include <ti/drv/cpsw/soc/cpsw_soc.h>
#include <ti/drv/cpsw/include/cpsw_ale.h>
#include <ti/drv/cpsw/include/cpsw_cpts.h>
#include <ti/drv/cpsw/include/cpsw_dma.h>
#include <ti/drv/cpsw/include/cpsw_hostport.h>
#include <ti/drv/cpsw/include/cpsw_macport.h>
#include <ti/drv/cpsw/include/cpsw_mdio.h>
#include <ti/drv/cpsw/include/cpsw_stats.h>
#include <ti/drv/cpsw/include/cpsw_phy.h>
#include <ti/drv/cpsw/include/cpsw_trace.h>
#include <ti/drv/cpsw/include/cpsw_utils.h>
#include <ti/drv/cpsw/include/cpsw_rm.h>
Macros | |
#define | CPSW_IOCTL_SET_NO_ARGS(prms) |
Set null args for an IOCTL command that takes no arguments. More... | |
#define | CPSW_IOCTL_SET_IN_ARGS(prms, in) |
Set the input args for an IOCTL command. More... | |
#define | CPSW_IOCTL_SET_OUT_ARGS(prms, out) |
Set the output args for an IOCTL command. More... | |
#define | CPSW_IOCTL_SET_INOUT_ARGS(prms, in, out) |
Set the input and output args for an IOCTL command. More... | |
#define | CPSW_PUBLIC_IOCTL(x) (CPSW_IOCTL_CPSW_BASE | CPSW_IOCTL_MIN(x)) |
#define | CPSW_DMA_TX_CH_NUM(chNum) (chNum) |
Set the input and output args for an IOCTL command. | |
#define | CPSW_SOC_RGMII_MHZ_250_CLK_VAL (250000000U) |
Frequency in HZ for RGMII 250MHz clock needed to operate in 1Gbps mode. | |
#define | CPSW_SOC_RGMII_MHZ_50_CLK_VAL (50000000U) |
Frequency in HZ for RGMII 50MHz clock needed to operate in 100Mbps mode. | |
#define | CPSW_SOC_RGMII_MHZ_5_CLK_VAL (5000000U) |
Frequency in HZ for RGMII 5MHz clock needed to operate in 10Mbps mode. | |
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) |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_MACSRC (CPSW_ALE_POLICER_MATCH_MACSRC) |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_MACDST (CPSW_ALE_POLICER_MATCH_MACDST) |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_ETHERTYPE (CPSW_ALE_POLICER_MATCH_ETHERTYPE) |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_IPSRC (CPSW_ALE_POLICER_MATCH_IPSRC) |
#define | CPSW_INTERVLAN_INGRESSPKT_MATCH_IPDST (CPSW_ALE_POLICER_MATCH_IPDST) |
InterVLAN ingress packet match aleEntry delete bitmask | |
Associated with some classifier types are ALE table entries. When deleting the classifier entry application needs to specify by means of below bitmask if the ALE entry associated with the classifier should also be deleted.If not set the ALE entry will remain. | |
#define | CPSW_INTERVLAN_PKTCLASSIFIER_DELETE_MACSRC (CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACSRC) |
#define | CPSW_INTERVLAN_PKTCLASSIFIER_DELETE_MACDST (CPSW_ALE_POLICER_TABLEENTRY_DELETE_MACDST) |
#define | CPSW_INTERVLAN_PKTCLASSIFIER_DELETE_ETHERTYPE (CPSW_ALE_POLICER_TABLEENTRY_DELETE_ETHERTYPE) |
#define | CPSW_INTERVLAN_PKTCLASSIFIER_DELETE_IPSRC (CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPSRC) |
#define | CPSW_INTERVLAN_PKTCLASSIFIER_DELETE_IPDST (CPSW_ALE_POLICER_TABLEENTRY_DELETE_IPDST) |
#define | CPSW_INTERVLAN_PKTCLASSIFIER_DELETE_VLAN (CPSW_ALE_POLICER_TABLEENTRY_DELETE_IVLAN) |
Functions | |
void | CpswOsal_initPrms (CpswOsal_Prms *osalPrms) |
CpswOsal_Prms structure init function. More... | |
int32_t | CpswOsal_setCachePrms (const CpswOsal_CachePrms *cachePrms) |
Set the OSAL cache paramaters in case user needs to override the default cache API. More... | |
void | CpswOsal_initCachePrms (CpswOsal_CachePrms *cachePrms) |
CpswOsal_CachePrms structure init function. More... | |
void | Cpsw_initParams (Cpsw_Config *cfg) |
Initialize CPSW configuration parameters with default values. More... | |
void | Cpsw_initMacPortParams (CpswMacPort_Config *cfg) |
Initialize MAC port configuration parameters with default values. More... | |
void | Cpsw_initPhyParams (CpswPhy_Config *cfg) |
Initialize PHY configuration parameters. More... | |
void | Cpsw_setPhyExtendedParams (CpswPhy_Config *cfg, const void *extendedCfg, uint32_t extendedCfgSize) |
Set PHY extended parameters. More... | |
void | Cpsw_initOsalPrms (CpswOsal_Prms *pOsalPrms) |
Initialize OSAL parameters with default values. More... | |
void | Cpsw_init (Cpsw_Type cpswType, const CpswOsal_Prms *pOsalPrms, CpswUtils_Prms *pUtilsPrms) |
Initialize CPSW driver. More... | |
void | Cpsw_deinit (Cpsw_Type cpswType) |
De-initialize CPSW driver. More... | |
CpswTrace_TraceLevel | Cpsw_setTraceLevel (CpswTrace_TraceLevel level) |
Set runtime trace level. More... | |
CpswTrace_TraceLevel | Cpsw_getTraceLevel (void) |
Get runtime trace level. More... | |
Cpsw_Handle | Cpsw_getHandle (Cpsw_Type cpswType) |
Get the CPSW opaque handle. More... | |
Cpsw_Handle | Cpsw_open (Cpsw_Type cpswType, const Cpsw_Config *cfg) |
Open and initialize CPSW peripheral. More... | |
Cpsw_Handle | Cpsw_reopen (Cpsw_Type cpswType) |
Re-open CPSW peripheral. More... | |
void | Cpsw_close (Cpsw_Handle hCpsw) |
Close CPSW peripheral. More... | |
int32_t | Cpsw_ioctl (Cpsw_Handle hCpsw, uint32_t coreId, uint32_t cmd, Cpsw_IoctlPrms *prms) |
Issue an operation on the CPSW peripheral/driver. More... | |
void | Cpsw_periodicTick (Cpsw_Handle hCpsw) |
Run PHY-related periodic tick. More... | |
uint32_t | Cpsw_getMacPortMax (Cpsw_Type cpswType) |
Get the number of MAC ports in the CPSW instance. More... | |
This file contains the main structure definitions and function prototypes of the CPSW driver.