diff options
author | Mandy Lavi <mandy.lavi@freescale.com> | 2013-10-31 16:51:23 (GMT) |
---|---|---|
committer | Madalin-Cristian Bucur <madalin.bucur@freescale.com> | 2014-01-06 15:03:57 (GMT) |
commit | 55cfaca07b53b48608ce29150e152eb4ef0b2703 (patch) | |
tree | 653a859959f2550acc46df7f812e7468cc838222 /drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.h | |
parent | 4ce33519e320bd72efaf3fab0acc4007af10a60e (diff) | |
download | linux-fsl-qoriq-55cfaca07b53b48608ce29150e152eb4ef0b2703.tar.xz |
fmd: fmd22 integration
- Fix for PCD: key mask not properly enabled in exact match table
- Fix for PFC mapping function
- Added counters for miss entry in match and hash tables
- Added counter for IPv4 options in IP fragmentation
Change-Id: I1626afc661d412c518172d405860a33d801cd005
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/6251
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com>
Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Conflicts:
drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.c
drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.h
Change-Id: If356927d0cd4e22e8949a0106c2a403fcf1343a2
Reviewed-on: http://git.am.freescale.net:8181/7665
Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.h')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.h | 52 |
1 files changed, 17 insertions, 35 deletions
diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.h b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.h index 12be3c2..d4cc285 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.h +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/Port/fm_port.h @@ -47,6 +47,7 @@ #include "fm_sp_common.h" #include "fsl_fman_sp.h" +#include "fsl_fman_port.h" #define __ERR_MODULE__ MODULE_FM_PORT @@ -54,6 +55,7 @@ #define MIN_EXT_BUF_SIZE 64 #define DATA_ALIGNMENT 64 #define MAX_LIODN_OFFSET 64 +#define MAX_PORT_FIFO_SIZE MIN(BMI_MAX_FIFO_SIZE, 1024*BMI_FIFO_UNITS) /**************************************************************************//** @Description Memory Map defines @@ -105,8 +107,8 @@ #define DEFAULT_notSupported 0xff #if (DPAA_VERSION < 11) -#define DEFAULT_PORT_rxFifoPriElevationLevel BMI_MAX_FIFO_SIZE -#define DEFAULT_PORT_rxFifoThreshold (BMI_MAX_FIFO_SIZE*3/4) +#define DEFAULT_PORT_rxFifoPriElevationLevel MAX_PORT_FIFO_SIZE +#define DEFAULT_PORT_rxFifoThreshold (MAX_PORT_FIFO_SIZE*3/4) #define DEFAULT_PORT_txFifoMinFillLevel 0 #define DEFAULT_PORT_txFifoLowComfLevel (5*KILOBYTE) @@ -124,26 +126,22 @@ ((type) == e_FM_PORT_TYPE_OH_OFFLINE_PARSING)) ? 3 : 1)) #define DEFAULT_PORT_extraNumOfTasks(type) \ - (uint32_t)((((type) == e_FM_PORT_TYPE_RX_10G) || \ - ((type) == e_FM_PORT_TYPE_TX_10G)) ? 8 : \ - ((((type) == e_FM_PORT_TYPE_RX) || \ - ((type) == e_FM_PORT_TYPE_TX)) ? 2 : 0)) + (uint32_t)(((type) == e_FM_PORT_TYPE_RX_10G) ? 8 : \ + (((type) == e_FM_PORT_TYPE_RX) ? 2 : 0)) #define DEFAULT_PORT_numOfOpenDmas(type) \ (uint32_t)((((type) == e_FM_PORT_TYPE_TX_10G) || \ ((type) == e_FM_PORT_TYPE_RX_10G)) ? 8 : 1 ) #define DEFAULT_PORT_extraNumOfOpenDmas(type) \ - (uint32_t)((((type) == e_FM_PORT_TYPE_RX_10G) || \ - ((type) == e_FM_PORT_TYPE_TX_10G)) ? 8 : \ - ((((type) == e_FM_PORT_TYPE_RX) || \ - ((type) == e_FM_PORT_TYPE_TX)) ? 1 : 0)) + (uint32_t)(((type) == e_FM_PORT_TYPE_RX_10G) ? 8 : \ + (((type) == e_FM_PORT_TYPE_RX) ? 1 : 0)) #define DEFAULT_PORT_numOfFifoBufs(type) \ (uint32_t)((((type) == e_FM_PORT_TYPE_RX_10G) || \ ((type) == e_FM_PORT_TYPE_TX_10G)) ? 48 : \ - ((((type) == e_FM_PORT_TYPE_RX) || \ - ((type) == e_FM_PORT_TYPE_TX)) ? 44 : 8)) + ((type) == e_FM_PORT_TYPE_RX) ? 45 : \ + ((type) == e_FM_PORT_TYPE_TX) ? 44 : 8) #define DEFAULT_PORT_extraNumOfFifoBufs 0 @@ -161,7 +159,7 @@ #define DEFAULT_PORT_numOfTasks(type) \ (uint32_t)((((type) == e_FM_PORT_TYPE_RX_10G) || \ - ((type) == e_FM_PORT_TYPE_TX_10G)) ? 14 : \ + ((type) == e_FM_PORT_TYPE_TX_10G)) ? 14 : \ (((type) == e_FM_PORT_TYPE_RX) || \ ((type) == e_FM_PORT_TYPE_TX)) ? 4 : \ ((type) == e_FM_PORT_TYPE_OH_OFFLINE_PARSING) ? 6 : 1) @@ -170,17 +168,17 @@ #define DEFAULT_PORT_numOfOpenDmas(type) \ (uint32_t)(((type) == e_FM_PORT_TYPE_RX_10G) ? 8 : \ - ((type) == e_FM_PORT_TYPE_TX_10G) ? 12 : \ + ((type) == e_FM_PORT_TYPE_TX_10G) ? 12 : \ ((type) == e_FM_PORT_TYPE_RX) ? 2 : \ ((type) == e_FM_PORT_TYPE_TX) ? 3 : \ - ((type) == e_FM_PORT_TYPE_OH_HOST_COMMAND) ? 2 : 4 ) + ((type) == e_FM_PORT_TYPE_OH_HOST_COMMAND) ? 2 : 4) #define DEFAULT_PORT_extraNumOfOpenDmas(type) 0 #define DEFAULT_PORT_numOfFifoBufs(type) \ (uint32_t) (((type) == e_FM_PORT_TYPE_RX_10G) ? 96 : \ ((type) == e_FM_PORT_TYPE_TX_10G) ? 64 : \ - ((type) == e_FM_PORT_TYPE_OH_HOST_COMMAND) ? 10 : 50 ) + ((type) == e_FM_PORT_TYPE_OH_HOST_COMMAND) ? 10 : 50) #define DEFAULT_PORT_extraNumOfFifoBufs 0 @@ -491,7 +489,6 @@ typedef _Packed struct #define BMI_SP_ID_MASK 0xff000000 #define BMI_SP_ID_SHIFT 24 #define BMI_SP_EN 0x01000000 -#define BMI_EBD_EN 0x80000000 #endif /* (DPAA_VERSION >= 11) */ #define BMI_PORT_CFG_EN 0x80000000 @@ -500,7 +497,6 @@ typedef _Packed struct #define BMI_PORT_CFG_IM 0x01000000 #define BMI_PORT_STATUS_BSY 0x80000000 #define BMI_COUNTERS_EN 0x80000000 -#define BMI_DMA_ATTR_WRITE_OPTIMIZE FMAN_SP_DMA_ATTR_WRITE_OPTIMIZE #define BMI_PORT_RFNE_FRWD_DCL4C 0x10000000 #define BMI_PORT_RFNE_FRWD_RPD 0x40000000 @@ -510,7 +506,6 @@ typedef _Packed struct #define BMI_CMD_MR_SLEAC 0x00100000 #define BMI_CMD_MR_MA 0x00080000 #define BMI_CMD_MR_DEAS 0x00040000 -#define BMI_CMD_TX_MR_DEF (0) #define BMI_CMD_RX_MR_DEF (BMI_CMD_MR_LEAC | \ BMI_CMD_MR_SLEAC | \ BMI_CMD_MR_MA | \ @@ -523,11 +518,6 @@ typedef _Packed struct #define BMI_CMD_ATTR_MACCMD_SECURED 0x00001000 #define BMI_CMD_ATTR_MACCMD_SC_MASK 0x00000f00 -#define BMI_EXT_BUF_POOL_EN_COUNTER FMAN_SP_EXT_BUF_POOL_EN_COUNTER -#define BMI_EXT_BUF_POOL_VALID FMAN_SP_EXT_BUF_POOL_VALID - -#define BMI_EXT_BUF_POOL_BACKUP FMAN_SP_EXT_BUF_POOL_BACKUP - #define BMI_EXT_BUF_POOL_ID_MASK 0x003F0000 #define BMI_STATUS_RX_MASK_UNUSED (uint32_t)(~(FM_PORT_FRM_ERR_DMA | \ FM_PORT_FRM_ERR_PHYSICAL | \ @@ -592,7 +582,6 @@ typedef _Packed struct /* shifts */ #define BMI_PORT_CFG_MS_SEL_SHIFT 16 -#define BMI_DMA_ATTR_SWP_SHIFT FMAN_SP_DMA_ATTR_SWP_SHIFT #define BMI_DMA_ATTR_IC_CACHE_SHIFT FMAN_SP_DMA_ATTR_IC_CACHE_SHIFT #define BMI_DMA_ATTR_HDR_CACHE_SHIFT FMAN_SP_DMA_ATTR_HDR_CACHE_SHIFT #define BMI_DMA_ATTR_SG_CACHE_SHIFT FMAN_SP_DMA_ATTR_SG_CACHE_SHIFT @@ -606,14 +595,10 @@ typedef _Packed struct #define BMI_RX_FRAME_END_CS_IGNORE_SHIFT 24 #define BMI_RX_FRAME_END_CUT_SHIFT 16 -#define BMI_IC_TO_EXT_SHIFT FMAN_SP_IC_TO_EXT_SHIFT -#define BMI_IC_FROM_INT_SHIFT FMAN_SP_IC_FROM_INT_SHIFT #define BMI_IC_SIZE_SHIFT FMAN_SP_IC_SIZE_SHIFT #define BMI_INT_BUF_MARG_SHIFT 28 -#define BMI_EXT_BUF_MARG_START_SHIFT FMAN_SP_EXT_BUF_MARG_START_SHIFT -#define BMI_SG_DISABLE FMAN_SP_SG_DISABLE #define BMI_EXT_BUF_MARG_END_SHIFT FMAN_SP_EXT_BUF_MARG_END_SHIFT #define BMI_CMD_ATTR_COLOR_SHIFT 26 @@ -623,16 +608,11 @@ typedef _Packed struct #define BMI_CMD_ATTR_MACCMD_SECURED_SHIFT 12 #define BMI_CMD_ATTR_MACCMD_SC_SHIFT 8 -#define BMI_POOL_DEP_NUM_OF_POOLS_SHIFT FMAN_SP_POOL_DEP_NUM_OF_POOLS_SHIFT #define BMI_POOL_DEP_NUM_OF_POOLS_VECTOR_SHIFT 24 -#define BMI_EXT_BUF_POOL_ID_SHIFT FMAN_SP_EXT_BUF_POOL_ID_SHIFT #define BMI_TX_FIFO_MIN_FILL_SHIFT 16 -#define BMI_FIFO_PIPELINE_DEPTH_SHIFT 12 #define BMI_TX_LOW_COMF_SHIFT 0 -#define BMI_FRAME_END_CS_IGNORE_SHIFT 24 - #define BMI_PERFORMANCE_TASK_COMP_SHIFT 24 #define BMI_PERFORMANCE_PORT_COMP_SHIFT 16 #define BMI_PERFORMANCE_DMA_COMP_SHIFT 12 @@ -658,6 +638,7 @@ typedef _Packed struct #define MAX_BURST_SIZE 1024 #define MIN_NUM_OF_OP_DMAS 2 + /**************************************************************************//** @Description QMI defines *//***************************************************************************/ @@ -810,6 +791,7 @@ typedef struct { typedef struct { + struct fman_port_cfg dfltCfg; uint32_t dfltFqid; uint32_t confFqid; uint32_t errFqid; @@ -873,6 +855,7 @@ typedef struct t_FmPortRxPoolsParams } t_FmPortRxPoolsParams; typedef struct { + struct fman_port port; t_Handle h_Fm; t_Handle h_FmPcd; t_Handle h_FmMuram; @@ -902,7 +885,6 @@ typedef struct { /* Independent-Mode parameters support */ bool imEn; t_FmMacIm im; - uint8_t fifoDeqPipelineDepth; volatile bool lock; t_Handle h_Spinlock; t_FmPortExceptionCallback *f_Exception; |