Path: blob/main/sys/contrib/ncsw/inc/integrations/dpaa_integration_ext.h
48378 views
/******************************************************************************12� 1995-2003, 2004, 2005-2011 Freescale Semiconductor, Inc.3All rights reserved.45This is proprietary source code of Freescale Semiconductor Inc.,6and its use is subject to the NetComm Device Drivers EULA.7The copyright notice above does not evidence any actual or intended8publication of such source code.910ALTERNATIVELY, redistribution and use in source and binary forms, with11or without modification, are permitted provided that the following12conditions are met:13* Redistributions of source code must retain the above copyright14notice, this list of conditions and the following disclaimer.15* Redistributions in binary form must reproduce the above copyright16notice, this list of conditions and the following disclaimer in the17documentation and/or other materials provided with the distribution.18* Neither the name of Freescale Semiconductor nor the19names of its contributors may be used to endorse or promote products20derived from this software without specific prior written permission.2122THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY23EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED24WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE25DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY26DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES27(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;28LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND29ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT30(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS31SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3233**************************************************************************/34/**3536@File dpaa_integration_ext.h3738@Description P5020 FM external definitions and structures.39*//***************************************************************************/40#ifndef __DPAA_INTEGRATION_EXT_H41#define __DPAA_INTEGRATION_EXT_H4243#include "std_ext.h"444546/**************************************************************************//**47@Description DPAA SW Portals Enumeration.48*//***************************************************************************/49typedef enum50{51e_DPAA_SWPORTAL0 = 0,52e_DPAA_SWPORTAL1,53e_DPAA_SWPORTAL2,54e_DPAA_SWPORTAL3,55e_DPAA_SWPORTAL4,56e_DPAA_SWPORTAL5,57e_DPAA_SWPORTAL6,58e_DPAA_SWPORTAL7,59e_DPAA_SWPORTAL8,60e_DPAA_SWPORTAL9,61e_DPAA_SWPORTAL_DUMMY_LAST62} e_DpaaSwPortal;6364/**************************************************************************//**65@Description DPAA Direct Connect Portals Enumeration.66*//***************************************************************************/67typedef enum68{69e_DPAA_DCPORTAL0 = 0,70e_DPAA_DCPORTAL1,71e_DPAA_DCPORTAL2,72e_DPAA_DCPORTAL3,73e_DPAA_DCPORTAL4,74e_DPAA_DCPORTAL_DUMMY_LAST75} e_DpaaDcPortal;7677#define DPAA_MAX_NUM_OF_SW_PORTALS e_DPAA_SWPORTAL_DUMMY_LAST78#define DPAA_MAX_NUM_OF_DC_PORTALS e_DPAA_DCPORTAL_DUMMY_LAST7980/*****************************************************************************81QMan INTEGRATION-SPECIFIC DEFINITIONS82******************************************************************************/83#define QM_MAX_NUM_OF_POOL_CHANNELS 15 /**< Total number of channels, dedicated and pool */84#define QM_MAX_NUM_OF_WQ 8 /**< Number of work queues per channel */85#define QM_MAX_NUM_OF_CGS 256 /**< Congestion groups number */86#define QM_MAX_NUM_OF_FQIDS (16 * MEGABYTE)87/**< FQIDs range - 24 bits */8889/**************************************************************************//**90@Description Work Queue Channel assignments in QMan.91*//***************************************************************************/92typedef enum93{94e_QM_FQ_CHANNEL_SWPORTAL0 = 0, /**< Dedicated channels serviced by software portals 0 to 9 */95e_QM_FQ_CHANNEL_SWPORTAL1,96e_QM_FQ_CHANNEL_SWPORTAL2,97e_QM_FQ_CHANNEL_SWPORTAL3,98e_QM_FQ_CHANNEL_SWPORTAL4,99e_QM_FQ_CHANNEL_SWPORTAL5,100e_QM_FQ_CHANNEL_SWPORTAL6,101e_QM_FQ_CHANNEL_SWPORTAL7,102e_QM_FQ_CHANNEL_SWPORTAL8,103e_QM_FQ_CHANNEL_SWPORTAL9,104105e_QM_FQ_CHANNEL_POOL1 = 0x21, /**< Pool channels that can be serviced by any of the software portals */106e_QM_FQ_CHANNEL_POOL2,107e_QM_FQ_CHANNEL_POOL3,108e_QM_FQ_CHANNEL_POOL4,109e_QM_FQ_CHANNEL_POOL5,110e_QM_FQ_CHANNEL_POOL6,111e_QM_FQ_CHANNEL_POOL7,112e_QM_FQ_CHANNEL_POOL8,113e_QM_FQ_CHANNEL_POOL9,114e_QM_FQ_CHANNEL_POOL10,115e_QM_FQ_CHANNEL_POOL11,116e_QM_FQ_CHANNEL_POOL12,117e_QM_FQ_CHANNEL_POOL13,118e_QM_FQ_CHANNEL_POOL14,119e_QM_FQ_CHANNEL_POOL15,120121e_QM_FQ_CHANNEL_FMAN0_SP0 = 0x40, /**< Dedicated channels serviced by Direct Connect Portal 0:122connected to FMan 0; assigned in incrementing order to123each sub-portal (SP) in the portal */124e_QM_FQ_CHANNEL_FMAN0_SP1,125e_QM_FQ_CHANNEL_FMAN0_SP2,126e_QM_FQ_CHANNEL_FMAN0_SP3,127e_QM_FQ_CHANNEL_FMAN0_SP4,128e_QM_FQ_CHANNEL_FMAN0_SP5,129e_QM_FQ_CHANNEL_FMAN0_SP6,130e_QM_FQ_CHANNEL_FMAN0_SP7,131e_QM_FQ_CHANNEL_FMAN0_SP8,132e_QM_FQ_CHANNEL_FMAN0_SP9,133e_QM_FQ_CHANNEL_FMAN0_SP10,134e_QM_FQ_CHANNEL_FMAN0_SP11,135136e_QM_FQ_CHANNEL_RMAN_SP2 = 0x62, /**< Dedicated channels serviced by Direct Connect Portal 1: connected to RMan */137e_QM_FQ_CHANNEL_RMAN_SP3,138139e_QM_FQ_CHANNEL_CAAM = 0x80, /**< Dedicated channel serviced by Direct Connect Portal 2:140connected to SEC 4.x */141142e_QM_FQ_CHANNEL_PME = 0xA0, /**< Dedicated channel serviced by Direct Connect Portal 3:143connected to PME */144e_QM_FQ_CHANNEL_RAID = 0xC0 /**< Dedicated channel serviced by Direct Connect Portal 4:145connected to RAID */146} e_QmFQChannel;147148/*****************************************************************************149BMan INTEGRATION-SPECIFIC DEFINITIONS150******************************************************************************/151#define BM_MAX_NUM_OF_POOLS 64 /**< Number of buffers pools */152153/*****************************************************************************154FM INTEGRATION-SPECIFIC DEFINITIONS155******************************************************************************/156#define INTG_MAX_NUM_OF_FM 1157158/* Ports defines */159#define FM_MAX_NUM_OF_1G_MACS 5160#define FM_MAX_NUM_OF_10G_MACS 1161#define FM_MAX_NUM_OF_MACS (FM_MAX_NUM_OF_1G_MACS + FM_MAX_NUM_OF_10G_MACS)162#define FM_MAX_NUM_OF_OH_PORTS 7163164#define FM_MAX_NUM_OF_1G_RX_PORTS FM_MAX_NUM_OF_1G_MACS165#define FM_MAX_NUM_OF_10G_RX_PORTS FM_MAX_NUM_OF_10G_MACS166#define FM_MAX_NUM_OF_RX_PORTS (FM_MAX_NUM_OF_10G_RX_PORTS + FM_MAX_NUM_OF_1G_RX_PORTS)167168#define FM_MAX_NUM_OF_1G_TX_PORTS FM_MAX_NUM_OF_1G_MACS169#define FM_MAX_NUM_OF_10G_TX_PORTS FM_MAX_NUM_OF_10G_MACS170#define FM_MAX_NUM_OF_TX_PORTS (FM_MAX_NUM_OF_10G_TX_PORTS + FM_MAX_NUM_OF_1G_TX_PORTS)171172#define FM_PORT_MAX_NUM_OF_EXT_POOLS 8 /**< Number of external BM pools per Rx port */173#define FM_PORT_NUM_OF_CONGESTION_GRPS 256 /**< Total number of congestion groups in QM */174#define FM_MAX_NUM_OF_SUB_PORTALS 12175#define FM_PORT_MAX_NUM_OF_OBSERVED_EXT_POOLS 0176177/* RAMs defines */178#define FM_MURAM_SIZE (160 * KILOBYTE)179#define FM_IRAM_SIZE(a,b) ( 64 * KILOBYTE)180181/* PCD defines */182#define FM_PCD_PLCR_NUM_ENTRIES 256 /**< Total number of policer profiles */183#define FM_PCD_KG_NUM_OF_SCHEMES 32 /**< Total number of KG schemes */184#define FM_PCD_MAX_NUM_OF_CLS_PLANS 256 /**< Number of classification plan entries. */185186/* RTC defines */187#define FM_RTC_NUM_OF_ALARMS 2 /**< RTC number of alarms */188#define FM_RTC_NUM_OF_PERIODIC_PULSES 2 /**< RTC number of periodic pulses */189#define FM_RTC_NUM_OF_EXT_TRIGGERS 2 /**< RTC number of external triggers */190191/* QMI defines */192#define QMI_MAX_NUM_OF_TNUMS 64193#define MAX_QMI_DEQ_SUBPORTAL 12194#define QMI_DEF_TNUMS_THRESH 48195196/* FPM defines */197#define FM_NUM_OF_FMAN_CTRL_EVENT_REGS 4198199/* DMA defines */200#define DMA_THRESH_MAX_COMMQ 31201#define DMA_THRESH_MAX_BUF 127202203/* BMI defines */204#define BMI_MAX_NUM_OF_TASKS 128205#define BMI_MAX_NUM_OF_DMAS 32206#define BMI_MAX_FIFO_SIZE (FM_MURAM_SIZE)207#define PORT_MAX_WEIGHT 16208209210#define FM_CHECK_PORT_RESTRICTIONS(__validPorts, __newPortIndx) TRUE211212/* P5020 unique features */213#define FM_QMI_DEQ_OPTIONS_SUPPORT214#define FM_NO_DISPATCH_RAM_ECC215#define FM_FIFO_ALLOCATION_OLD_ALG216#define FM_NO_WATCHDOG217#define FM_NO_TNUM_AGING218#define FM_NO_TGEC_LOOPBACK219#define FM_KG_NO_BYPASS_FQID_GEN220#define FM_KG_NO_BYPASS_PLCR_PROFILE_GEN221#define FM_NO_BACKUP_POOLS222#define FM_NO_OP_OBSERVED_POOLS223#define FM_NO_ADVANCED_RATE_LIMITER224#define FM_NO_OP_OBSERVED_CGS225226/* FM erratas (P5020, P3041) */227#define FM_TX_ECC_FRMS_ERRATA_10GMAC_A004228#define FM_TX_SHORT_FRAME_BAD_TS_ERRATA_10GMAC_A006 /* No implementation, Out of LLD scope */229#define FM_TX_FIFO_CORRUPTION_ERRATA_10GMAC_A007230#define FM_ECC_HALT_NO_SYNC_ERRATA_10GMAC_A008231232#define FM_NO_RX_PREAM_ERRATA_DTSECx1233#define FM_GRS_ERRATA_DTSEC_A002234#define FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003235#define FM_GTS_ERRATA_DTSEC_A004236#define FM_PAUSE_BLOCK_ERRATA_DTSEC_A006 /* do nothing */237#define FM_RESERVED_ACCESS_TO_DISABLED_DEV_ERRATA_DTSEC_A0011 /* do nothing */238#define FM_GTS_AFTER_MAC_ABORTED_FRAME_ERRATA_DTSEC_A0012 FM_GTS_ERRATA_DTSEC_A004239#define FM_10_100_SGMII_NO_TS_ERRATA_DTSEC3240#define FM_TX_LOCKUP_ERRATA_DTSEC6241242#define FM_IM_TX_SYNC_SKIP_TNUM_ERRATA_FMAN_A001 /* Implemented by ucode */243#define FM_HC_DEF_FQID_ONLY_ERRATA_FMAN_A003 /* Implemented by ucode */244#define FM_IM_TX_SHARED_TNUM_ERRATA_FMAN4 /* Implemented by ucode */245#define FM_IM_GS_DEADLOCK_ERRATA_FMAN5 /* Implemented by ucode */246#define FM_IM_DEQ_PIPELINE_DEPTH_ERRATA_FMAN10 /* Implemented by ucode */247#define FM_CC_GEN6_MISSMATCH_ERRATA_FMAN12 /* Implemented by ucode */248#define FM_CC_CHANGE_SHARED_TNUM_ERRATA_FMAN13 /* Implemented by ucode */249#define FM_IM_LARGE_MRBLR_ERRATA_FMAN15 /* Implemented by ucode */250#define FM_BMI_TO_RISC_ENQ_ERRATA_FMANc /* No implementation, Out of LLD scope */251#define FM_INVALID_SWPRS_DATA_ERRATA_FMANd252//#define FM_PRS_MPLS_SSA_ERRATA_FMANj /* No implementation, No patch yet */253//#define FM_PRS_INITIAL_PLANID_ERRATA_FMANk /* No implementation, No patch yet */254255#define FM_NO_COPY_CTXA_CTXB_ERRATA_FMAN_SW001256257#define FM_10G_REM_N_LCL_FLT_EX_ERRATA_10GMAC001258259/* P2041 */260#define FM_BAD_VLAN_DETECT_ERRATA_10GMAC_A010261262/* Common to all */263#define FM_RX_PREAM_4_ERRATA_DTSEC_A001 FM_NO_RX_PREAM_ERRATA_DTSECx1264#define FM_UCODE_NOT_RESET_ERRATA_BUGZILLA6173265#define FM_MAGIC_PACKET_UNRECOGNIZED_ERRATA_DTSEC2 /* No implementation, Out of LLD scope */266#define FM_PRS_MEM_ERRATA_FMAN_SW003267#define FM_LEN_CHECK_ERRATA_FMAN_SW002268269#define DPAA_VERSION 10270#define FM_PCD_SW_PRS_SIZE 0x00000800271#define FM_PCD_PRS_SW_PATCHES_SIZE 0x00000200272#define FM_NUM_OF_CTRL 2273274#endif /* __DPAA_INTEGRATION_EXT_H */275276277