1964ee5c8SVladimir Oltean /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 2964ee5c8SVladimir Oltean /* 3964ee5c8SVladimir Oltean * Microsemi Ocelot Switch driver 4964ee5c8SVladimir Oltean * 5964ee5c8SVladimir Oltean * Copyright (c) 2017 Microsemi Corporation 6964ee5c8SVladimir Oltean */ 7964ee5c8SVladimir Oltean 8964ee5c8SVladimir Oltean #ifndef _MSCC_OCELOT_ANA_H_ 9964ee5c8SVladimir Oltean #define _MSCC_OCELOT_ANA_H_ 10964ee5c8SVladimir Oltean 11964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_B_DOM_EN BIT(22) 12964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_B_DOM_VAL BIT(21) 13964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_AGE_LOCKED BIT(20) 14964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_PID_EN BIT(19) 15964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_PID_VAL(x) (((x) << 14) & GENMASK(18, 14)) 16964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_PID_VAL_M GENMASK(18, 14) 17964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_PID_VAL_X(x) (((x) & GENMASK(18, 14)) >> 14) 18964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_VID_EN BIT(13) 19964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_VID_VAL(x) ((x) & GENMASK(12, 0)) 20964ee5c8SVladimir Oltean #define ANA_ANAGEFIL_VID_VAL_M GENMASK(12, 0) 21964ee5c8SVladimir Oltean 22964ee5c8SVladimir Oltean #define ANA_STORMLIMIT_CFG_RSZ 0x4 23964ee5c8SVladimir Oltean 24964ee5c8SVladimir Oltean #define ANA_STORMLIMIT_CFG_STORM_RATE(x) (((x) << 3) & GENMASK(6, 3)) 25964ee5c8SVladimir Oltean #define ANA_STORMLIMIT_CFG_STORM_RATE_M GENMASK(6, 3) 26964ee5c8SVladimir Oltean #define ANA_STORMLIMIT_CFG_STORM_RATE_X(x) (((x) & GENMASK(6, 3)) >> 3) 27964ee5c8SVladimir Oltean #define ANA_STORMLIMIT_CFG_STORM_UNIT BIT(2) 28964ee5c8SVladimir Oltean #define ANA_STORMLIMIT_CFG_STORM_MODE(x) ((x) & GENMASK(1, 0)) 29964ee5c8SVladimir Oltean #define ANA_STORMLIMIT_CFG_STORM_MODE_M GENMASK(1, 0) 30964ee5c8SVladimir Oltean 31964ee5c8SVladimir Oltean #define ANA_AUTOAGE_AGE_FAST BIT(21) 32964ee5c8SVladimir Oltean #define ANA_AUTOAGE_AGE_PERIOD(x) (((x) << 1) & GENMASK(20, 1)) 33964ee5c8SVladimir Oltean #define ANA_AUTOAGE_AGE_PERIOD_M GENMASK(20, 1) 34964ee5c8SVladimir Oltean #define ANA_AUTOAGE_AGE_PERIOD_X(x) (((x) & GENMASK(20, 1)) >> 1) 35964ee5c8SVladimir Oltean #define ANA_AUTOAGE_AUTOAGE_LOCKED BIT(0) 36964ee5c8SVladimir Oltean 37964ee5c8SVladimir Oltean #define ANA_MACTOPTIONS_REDUCED_TABLE BIT(1) 38964ee5c8SVladimir Oltean #define ANA_MACTOPTIONS_SHADOW BIT(0) 39964ee5c8SVladimir Oltean 40964ee5c8SVladimir Oltean #define ANA_AGENCTRL_FID_MASK(x) (((x) << 12) & GENMASK(23, 12)) 41964ee5c8SVladimir Oltean #define ANA_AGENCTRL_FID_MASK_M GENMASK(23, 12) 42964ee5c8SVladimir Oltean #define ANA_AGENCTRL_FID_MASK_X(x) (((x) & GENMASK(23, 12)) >> 12) 43964ee5c8SVladimir Oltean #define ANA_AGENCTRL_IGNORE_DMAC_FLAGS BIT(11) 44964ee5c8SVladimir Oltean #define ANA_AGENCTRL_IGNORE_SMAC_FLAGS BIT(10) 45964ee5c8SVladimir Oltean #define ANA_AGENCTRL_FLOOD_SPECIAL BIT(9) 46964ee5c8SVladimir Oltean #define ANA_AGENCTRL_FLOOD_IGNORE_VLAN BIT(8) 47964ee5c8SVladimir Oltean #define ANA_AGENCTRL_MIRROR_CPU BIT(7) 48964ee5c8SVladimir Oltean #define ANA_AGENCTRL_LEARN_CPU_COPY BIT(6) 49964ee5c8SVladimir Oltean #define ANA_AGENCTRL_LEARN_FWD_KILL BIT(5) 50964ee5c8SVladimir Oltean #define ANA_AGENCTRL_LEARN_IGNORE_VLAN BIT(4) 51964ee5c8SVladimir Oltean #define ANA_AGENCTRL_CPU_CPU_KILL_ENA BIT(3) 52964ee5c8SVladimir Oltean #define ANA_AGENCTRL_GREEN_COUNT_MODE BIT(2) 53964ee5c8SVladimir Oltean #define ANA_AGENCTRL_YELLOW_COUNT_MODE BIT(1) 54964ee5c8SVladimir Oltean #define ANA_AGENCTRL_RED_COUNT_MODE BIT(0) 55964ee5c8SVladimir Oltean 56964ee5c8SVladimir Oltean #define ANA_FLOODING_RSZ 0x4 57964ee5c8SVladimir Oltean 58964ee5c8SVladimir Oltean #define ANA_FLOODING_FLD_UNICAST(x) (((x) << 12) & GENMASK(17, 12)) 59964ee5c8SVladimir Oltean #define ANA_FLOODING_FLD_UNICAST_M GENMASK(17, 12) 60964ee5c8SVladimir Oltean #define ANA_FLOODING_FLD_UNICAST_X(x) (((x) & GENMASK(17, 12)) >> 12) 61964ee5c8SVladimir Oltean #define ANA_FLOODING_FLD_BROADCAST(x) (((x) << 6) & GENMASK(11, 6)) 62964ee5c8SVladimir Oltean #define ANA_FLOODING_FLD_BROADCAST_M GENMASK(11, 6) 63964ee5c8SVladimir Oltean #define ANA_FLOODING_FLD_BROADCAST_X(x) (((x) & GENMASK(11, 6)) >> 6) 64964ee5c8SVladimir Oltean #define ANA_FLOODING_FLD_MULTICAST(x) ((x) & GENMASK(5, 0)) 65964ee5c8SVladimir Oltean #define ANA_FLOODING_FLD_MULTICAST_M GENMASK(5, 0) 66964ee5c8SVladimir Oltean 67964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC4_CTRL(x) (((x) << 18) & GENMASK(23, 18)) 68964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC4_CTRL_M GENMASK(23, 18) 69964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC4_CTRL_X(x) (((x) & GENMASK(23, 18)) >> 18) 70964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC4_DATA(x) (((x) << 12) & GENMASK(17, 12)) 71964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC4_DATA_M GENMASK(17, 12) 72964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC4_DATA_X(x) (((x) & GENMASK(17, 12)) >> 12) 73964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC6_CTRL(x) (((x) << 6) & GENMASK(11, 6)) 74964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC6_CTRL_M GENMASK(11, 6) 75964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC6_CTRL_X(x) (((x) & GENMASK(11, 6)) >> 6) 76964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC6_DATA(x) ((x) & GENMASK(5, 0)) 77964ee5c8SVladimir Oltean #define ANA_FLOODING_IPMC_FLD_MC6_DATA_M GENMASK(5, 0) 78964ee5c8SVladimir Oltean 79964ee5c8SVladimir Oltean #define ANA_SFLOW_CFG_RSZ 0x4 80964ee5c8SVladimir Oltean 81964ee5c8SVladimir Oltean #define ANA_SFLOW_CFG_SF_RATE(x) (((x) << 2) & GENMASK(13, 2)) 82964ee5c8SVladimir Oltean #define ANA_SFLOW_CFG_SF_RATE_M GENMASK(13, 2) 83964ee5c8SVladimir Oltean #define ANA_SFLOW_CFG_SF_RATE_X(x) (((x) & GENMASK(13, 2)) >> 2) 84964ee5c8SVladimir Oltean #define ANA_SFLOW_CFG_SF_SAMPLE_RX BIT(1) 85964ee5c8SVladimir Oltean #define ANA_SFLOW_CFG_SF_SAMPLE_TX BIT(0) 86964ee5c8SVladimir Oltean 87964ee5c8SVladimir Oltean #define ANA_PORT_MODE_RSZ 0x4 88964ee5c8SVladimir Oltean 89964ee5c8SVladimir Oltean #define ANA_PORT_MODE_REDTAG_PARSE_CFG BIT(3) 90964ee5c8SVladimir Oltean #define ANA_PORT_MODE_VLAN_PARSE_CFG(x) (((x) << 1) & GENMASK(2, 1)) 91964ee5c8SVladimir Oltean #define ANA_PORT_MODE_VLAN_PARSE_CFG_M GENMASK(2, 1) 92964ee5c8SVladimir Oltean #define ANA_PORT_MODE_VLAN_PARSE_CFG_X(x) (((x) & GENMASK(2, 1)) >> 1) 93964ee5c8SVladimir Oltean #define ANA_PORT_MODE_L3_PARSE_CFG BIT(0) 94964ee5c8SVladimir Oltean 95964ee5c8SVladimir Oltean #define ANA_CUT_THRU_CFG_RSZ 0x4 96964ee5c8SVladimir Oltean 97964ee5c8SVladimir Oltean #define ANA_PGID_PGID_RSZ 0x4 98964ee5c8SVladimir Oltean 99964ee5c8SVladimir Oltean #define ANA_PGID_PGID_PGID(x) ((x) & GENMASK(11, 0)) 100964ee5c8SVladimir Oltean #define ANA_PGID_PGID_PGID_M GENMASK(11, 0) 101964ee5c8SVladimir Oltean #define ANA_PGID_PGID_CPUQ_DST_PGID(x) (((x) << 27) & GENMASK(29, 27)) 102964ee5c8SVladimir Oltean #define ANA_PGID_PGID_CPUQ_DST_PGID_M GENMASK(29, 27) 103964ee5c8SVladimir Oltean #define ANA_PGID_PGID_CPUQ_DST_PGID_X(x) (((x) & GENMASK(29, 27)) >> 27) 104964ee5c8SVladimir Oltean 105964ee5c8SVladimir Oltean #define ANA_TABLES_MACHDATA_VID(x) (((x) << 16) & GENMASK(28, 16)) 106964ee5c8SVladimir Oltean #define ANA_TABLES_MACHDATA_VID_M GENMASK(28, 16) 107964ee5c8SVladimir Oltean #define ANA_TABLES_MACHDATA_VID_X(x) (((x) & GENMASK(28, 16)) >> 16) 108964ee5c8SVladimir Oltean #define ANA_TABLES_MACHDATA_MACHDATA(x) ((x) & GENMASK(15, 0)) 109964ee5c8SVladimir Oltean #define ANA_TABLES_MACHDATA_MACHDATA_M GENMASK(15, 0) 110964ee5c8SVladimir Oltean 111964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMDATA_SSID_VALID BIT(16) 112964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMDATA_SSID(x) (((x) << 9) & GENMASK(15, 9)) 113964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMDATA_SSID_M GENMASK(15, 9) 114964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMDATA_SSID_X(x) (((x) & GENMASK(15, 9)) >> 9) 115964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMDATA_SFID_VALID BIT(8) 116964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMDATA_SFID(x) ((x) & GENMASK(7, 0)) 117964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMDATA_SFID_M GENMASK(7, 0) 118964ee5c8SVladimir Oltean 119964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_MAC_CPU_COPY BIT(15) 120964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_SRC_KILL BIT(14) 121964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_IGNORE_VLAN BIT(13) 122964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_AGED_FLAG BIT(12) 123964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_VALID BIT(11) 124964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_ENTRYTYPE(x) (((x) << 9) & GENMASK(10, 9)) 125964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_ENTRYTYPE_M GENMASK(10, 9) 126964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_ENTRYTYPE_X(x) (((x) & GENMASK(10, 9)) >> 9) 127964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_DEST_IDX(x) (((x) << 3) & GENMASK(8, 3)) 128964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_DEST_IDX_M GENMASK(8, 3) 129964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_DEST_IDX_X(x) (((x) & GENMASK(8, 3)) >> 3) 130964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_MAC_TABLE_CMD(x) ((x) & GENMASK(2, 0)) 131964ee5c8SVladimir Oltean #define ANA_TABLES_MACACCESS_MAC_TABLE_CMD_M GENMASK(2, 0) 132964ee5c8SVladimir Oltean #define MACACCESS_CMD_IDLE 0 133964ee5c8SVladimir Oltean #define MACACCESS_CMD_LEARN 1 134964ee5c8SVladimir Oltean #define MACACCESS_CMD_FORGET 2 135964ee5c8SVladimir Oltean #define MACACCESS_CMD_AGE 3 136964ee5c8SVladimir Oltean #define MACACCESS_CMD_GET_NEXT 4 137964ee5c8SVladimir Oltean #define MACACCESS_CMD_INIT 5 138964ee5c8SVladimir Oltean #define MACACCESS_CMD_READ 6 139964ee5c8SVladimir Oltean #define MACACCESS_CMD_WRITE 7 140964ee5c8SVladimir Oltean 141964ee5c8SVladimir Oltean #define ANA_TABLES_VLANACCESS_VLAN_PORT_MASK(x) (((x) << 2) & GENMASK(13, 2)) 142964ee5c8SVladimir Oltean #define ANA_TABLES_VLANACCESS_VLAN_PORT_MASK_M GENMASK(13, 2) 143964ee5c8SVladimir Oltean #define ANA_TABLES_VLANACCESS_VLAN_PORT_MASK_X(x) (((x) & GENMASK(13, 2)) >> 2) 144964ee5c8SVladimir Oltean #define ANA_TABLES_VLANACCESS_VLAN_TBL_CMD(x) ((x) & GENMASK(1, 0)) 145964ee5c8SVladimir Oltean #define ANA_TABLES_VLANACCESS_VLAN_TBL_CMD_M GENMASK(1, 0) 146964ee5c8SVladimir Oltean #define ANA_TABLES_VLANACCESS_CMD_IDLE 0x0 147964ee5c8SVladimir Oltean #define ANA_TABLES_VLANACCESS_CMD_WRITE 0x2 148964ee5c8SVladimir Oltean #define ANA_TABLES_VLANACCESS_CMD_INIT 0x3 149964ee5c8SVladimir Oltean 150964ee5c8SVladimir Oltean #define ANA_TABLES_VLANTIDX_VLAN_SEC_FWD_ENA BIT(17) 151964ee5c8SVladimir Oltean #define ANA_TABLES_VLANTIDX_VLAN_FLOOD_DIS BIT(16) 152964ee5c8SVladimir Oltean #define ANA_TABLES_VLANTIDX_VLAN_PRIV_VLAN BIT(15) 153964ee5c8SVladimir Oltean #define ANA_TABLES_VLANTIDX_VLAN_LEARN_DISABLED BIT(14) 154964ee5c8SVladimir Oltean #define ANA_TABLES_VLANTIDX_VLAN_MIRROR BIT(13) 155964ee5c8SVladimir Oltean #define ANA_TABLES_VLANTIDX_VLAN_SRC_CHK BIT(12) 156964ee5c8SVladimir Oltean #define ANA_TABLES_VLANTIDX_V_INDEX(x) ((x) & GENMASK(11, 0)) 157964ee5c8SVladimir Oltean #define ANA_TABLES_VLANTIDX_V_INDEX_M GENMASK(11, 0) 158964ee5c8SVladimir Oltean 159964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXACCESS_ISDX_PORT_MASK(x) (((x) << 2) & GENMASK(8, 2)) 160964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXACCESS_ISDX_PORT_MASK_M GENMASK(8, 2) 161964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXACCESS_ISDX_PORT_MASK_X(x) (((x) & GENMASK(8, 2)) >> 2) 162964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXACCESS_ISDX_TBL_CMD(x) ((x) & GENMASK(1, 0)) 163964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXACCESS_ISDX_TBL_CMD_M GENMASK(1, 0) 164964ee5c8SVladimir Oltean 165964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_SDLBI(x) (((x) << 21) & GENMASK(28, 21)) 166964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_SDLBI_M GENMASK(28, 21) 167964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_SDLBI_X(x) (((x) & GENMASK(28, 21)) >> 21) 168964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_MSTI(x) (((x) << 15) & GENMASK(20, 15)) 169964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_MSTI_M GENMASK(20, 15) 170964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_MSTI_X(x) (((x) & GENMASK(20, 15)) >> 15) 171964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_ES0_KEY_ENA BIT(14) 172964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_FORCE_ENA BIT(10) 173964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_INDEX(x) ((x) & GENMASK(7, 0)) 174964ee5c8SVladimir Oltean #define ANA_TABLES_ISDXTIDX_ISDX_INDEX_M GENMASK(7, 0) 175964ee5c8SVladimir Oltean 176964ee5c8SVladimir Oltean #define ANA_TABLES_ENTRYLIM_RSZ 0x4 177964ee5c8SVladimir Oltean 178964ee5c8SVladimir Oltean #define ANA_TABLES_ENTRYLIM_ENTRYLIM(x) (((x) << 14) & GENMASK(17, 14)) 179964ee5c8SVladimir Oltean #define ANA_TABLES_ENTRYLIM_ENTRYLIM_M GENMASK(17, 14) 180964ee5c8SVladimir Oltean #define ANA_TABLES_ENTRYLIM_ENTRYLIM_X(x) (((x) & GENMASK(17, 14)) >> 14) 181964ee5c8SVladimir Oltean #define ANA_TABLES_ENTRYLIM_ENTRYSTAT(x) ((x) & GENMASK(13, 0)) 182964ee5c8SVladimir Oltean #define ANA_TABLES_ENTRYLIM_ENTRYSTAT_M GENMASK(13, 0) 183964ee5c8SVladimir Oltean 184964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMACCESS_GEN_REC_SEQ_NUM(x) (((x) << 4) & GENMASK(31, 4)) 185964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMACCESS_GEN_REC_SEQ_NUM_M GENMASK(31, 4) 186964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMACCESS_GEN_REC_SEQ_NUM_X(x) (((x) & GENMASK(31, 4)) >> 4) 187964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMACCESS_SEQ_GEN_REC_ENA BIT(3) 188964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMACCESS_GEN_REC_TYPE BIT(2) 189964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMACCESS_STREAM_TBL_CMD(x) ((x) & GENMASK(1, 0)) 190964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMACCESS_STREAM_TBL_CMD_M GENMASK(1, 0) 191964ee5c8SVladimir Oltean 192964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_SEQ_GEN_ERR_STATUS(x) (((x) << 30) & GENMASK(31, 30)) 193964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_SEQ_GEN_ERR_STATUS_M GENMASK(31, 30) 194964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_SEQ_GEN_ERR_STATUS_X(x) (((x) & GENMASK(31, 30)) >> 30) 195964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_S_INDEX(x) (((x) << 16) & GENMASK(22, 16)) 196964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_S_INDEX_M GENMASK(22, 16) 197964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_S_INDEX_X(x) (((x) & GENMASK(22, 16)) >> 16) 198964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_FORCE_SF_BEHAVIOUR BIT(14) 199964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_SEQ_HISTORY_LEN(x) (((x) << 8) & GENMASK(13, 8)) 200964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_SEQ_HISTORY_LEN_M GENMASK(13, 8) 201964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_SEQ_HISTORY_LEN_X(x) (((x) & GENMASK(13, 8)) >> 8) 202964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_RESET_ON_ROGUE BIT(7) 203964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_REDTAG_POP BIT(6) 204964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_STREAM_SPLIT BIT(5) 205964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_SEQ_SPACE_LOG2(x) ((x) & GENMASK(4, 0)) 206964ee5c8SVladimir Oltean #define ANA_TABLES_STREAMTIDX_SEQ_SPACE_LOG2_M GENMASK(4, 0) 207964ee5c8SVladimir Oltean 208964ee5c8SVladimir Oltean #define ANA_TABLES_SEQ_MASK_SPLIT_MASK(x) (((x) << 16) & GENMASK(22, 16)) 209964ee5c8SVladimir Oltean #define ANA_TABLES_SEQ_MASK_SPLIT_MASK_M GENMASK(22, 16) 210964ee5c8SVladimir Oltean #define ANA_TABLES_SEQ_MASK_SPLIT_MASK_X(x) (((x) & GENMASK(22, 16)) >> 16) 211964ee5c8SVladimir Oltean #define ANA_TABLES_SEQ_MASK_INPUT_PORT_MASK(x) ((x) & GENMASK(6, 0)) 212964ee5c8SVladimir Oltean #define ANA_TABLES_SEQ_MASK_INPUT_PORT_MASK_M GENMASK(6, 0) 213964ee5c8SVladimir Oltean 214964ee5c8SVladimir Oltean #define ANA_TABLES_SFID_MASK_IGR_PORT_MASK(x) (((x) << 1) & GENMASK(7, 1)) 215964ee5c8SVladimir Oltean #define ANA_TABLES_SFID_MASK_IGR_PORT_MASK_M GENMASK(7, 1) 216964ee5c8SVladimir Oltean #define ANA_TABLES_SFID_MASK_IGR_PORT_MASK_X(x) (((x) & GENMASK(7, 1)) >> 1) 217964ee5c8SVladimir Oltean #define ANA_TABLES_SFID_MASK_IGR_SRCPORT_MATCH_ENA BIT(0) 218964ee5c8SVladimir Oltean 219964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_IGR_PRIO_MATCH_ENA BIT(22) 220964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_IGR_PRIO(x) (((x) << 19) & GENMASK(21, 19)) 221964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_IGR_PRIO_M GENMASK(21, 19) 222964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_IGR_PRIO_X(x) (((x) & GENMASK(21, 19)) >> 19) 223964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_FORCE_BLOCK BIT(18) 224964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_MAX_SDU_LEN(x) (((x) << 2) & GENMASK(17, 2)) 225964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_MAX_SDU_LEN_M GENMASK(17, 2) 226964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_MAX_SDU_LEN_X(x) (((x) & GENMASK(17, 2)) >> 2) 227964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_SFID_TBL_CMD(x) ((x) & GENMASK(1, 0)) 228964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDACCESS_SFID_TBL_CMD_M GENMASK(1, 0) 229964ee5c8SVladimir Oltean 230*7d4b564dSXiaoliang Yang #define SFIDACCESS_CMD_IDLE 0 231*7d4b564dSXiaoliang Yang #define SFIDACCESS_CMD_READ 1 232*7d4b564dSXiaoliang Yang #define SFIDACCESS_CMD_WRITE 2 233*7d4b564dSXiaoliang Yang #define SFIDACCESS_CMD_INIT 3 234*7d4b564dSXiaoliang Yang 235964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_SGID_VALID BIT(26) 236964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_SGID(x) (((x) << 18) & GENMASK(25, 18)) 237964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_SGID_M GENMASK(25, 18) 238964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_SGID_X(x) (((x) & GENMASK(25, 18)) >> 18) 239964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_POL_ENA BIT(17) 240964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_POL_IDX(x) (((x) << 8) & GENMASK(16, 8)) 241964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_POL_IDX_M GENMASK(16, 8) 242964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_POL_IDX_X(x) (((x) & GENMASK(16, 8)) >> 8) 243964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_SFID_INDEX(x) ((x) & GENMASK(7, 0)) 244964ee5c8SVladimir Oltean #define ANA_TABLES_SFIDTIDX_SFID_INDEX_M GENMASK(7, 0) 245964ee5c8SVladimir Oltean 246964ee5c8SVladimir Oltean #define ANA_MSTI_STATE_RSZ 0x4 247964ee5c8SVladimir Oltean 248964ee5c8SVladimir Oltean #define ANA_OAM_UPM_LM_CNT_RSZ 0x4 249964ee5c8SVladimir Oltean 250964ee5c8SVladimir Oltean #define ANA_SG_ACCESS_CTRL_SGID(x) ((x) & GENMASK(7, 0)) 251964ee5c8SVladimir Oltean #define ANA_SG_ACCESS_CTRL_SGID_M GENMASK(7, 0) 252964ee5c8SVladimir Oltean #define ANA_SG_ACCESS_CTRL_CONFIG_CHANGE BIT(28) 253964ee5c8SVladimir Oltean 254964ee5c8SVladimir Oltean #define ANA_SG_CONFIG_REG_3_BASE_TIME_SEC_MSB(x) ((x) & GENMASK(15, 0)) 255964ee5c8SVladimir Oltean #define ANA_SG_CONFIG_REG_3_BASE_TIME_SEC_MSB_M GENMASK(15, 0) 256964ee5c8SVladimir Oltean #define ANA_SG_CONFIG_REG_3_LIST_LENGTH(x) (((x) << 16) & GENMASK(18, 16)) 257964ee5c8SVladimir Oltean #define ANA_SG_CONFIG_REG_3_LIST_LENGTH_M GENMASK(18, 16) 258964ee5c8SVladimir Oltean #define ANA_SG_CONFIG_REG_3_LIST_LENGTH_X(x) (((x) & GENMASK(18, 16)) >> 16) 259964ee5c8SVladimir Oltean #define ANA_SG_CONFIG_REG_3_GATE_ENABLE BIT(20) 2604ab810a4SXiaoliang Yang #define ANA_SG_CONFIG_REG_3_INIT_IPS(x) (((x) << 21) & GENMASK(24, 21)) 2614ab810a4SXiaoliang Yang #define ANA_SG_CONFIG_REG_3_INIT_IPS_M GENMASK(24, 21) 2624ab810a4SXiaoliang Yang #define ANA_SG_CONFIG_REG_3_INIT_IPS_X(x) (((x) & GENMASK(24, 21)) >> 21) 263*7d4b564dSXiaoliang Yang #define ANA_SG_CONFIG_REG_3_IPV_VALID BIT(24) 264*7d4b564dSXiaoliang Yang #define ANA_SG_CONFIG_REG_3_IPV_INVALID(x) (((x) << 24) & GENMASK(24, 24)) 265*7d4b564dSXiaoliang Yang #define ANA_SG_CONFIG_REG_3_INIT_IPV(x) (((x) << 21) & GENMASK(23, 21)) 266*7d4b564dSXiaoliang Yang #define ANA_SG_CONFIG_REG_3_INIT_IPV_M GENMASK(23, 21) 267*7d4b564dSXiaoliang Yang #define ANA_SG_CONFIG_REG_3_INIT_IPV_X(x) (((x) & GENMASK(23, 21)) >> 21) 2684ab810a4SXiaoliang Yang #define ANA_SG_CONFIG_REG_3_INIT_GATE_STATE BIT(25) 269964ee5c8SVladimir Oltean 270964ee5c8SVladimir Oltean #define ANA_SG_GCL_GS_CONFIG_RSZ 0x4 271964ee5c8SVladimir Oltean 272964ee5c8SVladimir Oltean #define ANA_SG_GCL_GS_CONFIG_IPS(x) ((x) & GENMASK(3, 0)) 273964ee5c8SVladimir Oltean #define ANA_SG_GCL_GS_CONFIG_IPS_M GENMASK(3, 0) 274964ee5c8SVladimir Oltean #define ANA_SG_GCL_GS_CONFIG_GATE_STATE BIT(4) 275964ee5c8SVladimir Oltean 276964ee5c8SVladimir Oltean #define ANA_SG_GCL_TI_CONFIG_RSZ 0x4 277964ee5c8SVladimir Oltean 278964ee5c8SVladimir Oltean #define ANA_SG_STATUS_REG_3_CFG_CHG_TIME_SEC_MSB(x) ((x) & GENMASK(15, 0)) 279964ee5c8SVladimir Oltean #define ANA_SG_STATUS_REG_3_CFG_CHG_TIME_SEC_MSB_M GENMASK(15, 0) 280964ee5c8SVladimir Oltean #define ANA_SG_STATUS_REG_3_GATE_STATE BIT(16) 281964ee5c8SVladimir Oltean #define ANA_SG_STATUS_REG_3_IPS(x) (((x) << 20) & GENMASK(23, 20)) 282964ee5c8SVladimir Oltean #define ANA_SG_STATUS_REG_3_IPS_M GENMASK(23, 20) 283964ee5c8SVladimir Oltean #define ANA_SG_STATUS_REG_3_IPS_X(x) (((x) & GENMASK(23, 20)) >> 20) 284964ee5c8SVladimir Oltean #define ANA_SG_STATUS_REG_3_CONFIG_PENDING BIT(24) 285964ee5c8SVladimir Oltean 286964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_GSZ 0x100 287964ee5c8SVladimir Oltean 288964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_VID_AS_ISDX BIT(21) 289964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_AWARE_ENA BIT(20) 290964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_POP_CNT(x) (((x) << 18) & GENMASK(19, 18)) 291964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_POP_CNT_M GENMASK(19, 18) 292964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_POP_CNT_X(x) (((x) & GENMASK(19, 18)) >> 18) 293964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_INNER_TAG_ENA BIT(17) 294964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_TAG_TYPE BIT(16) 295964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_DEI BIT(15) 296964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_PCP(x) (((x) << 12) & GENMASK(14, 12)) 297964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_PCP_M GENMASK(14, 12) 298964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_PCP_X(x) (((x) & GENMASK(14, 12)) >> 12) 299964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_VID(x) ((x) & GENMASK(11, 0)) 300964ee5c8SVladimir Oltean #define ANA_PORT_VLAN_CFG_VLAN_VID_M GENMASK(11, 0) 301964ee5c8SVladimir Oltean 302964ee5c8SVladimir Oltean #define ANA_PORT_DROP_CFG_GSZ 0x100 303964ee5c8SVladimir Oltean 304964ee5c8SVladimir Oltean #define ANA_PORT_DROP_CFG_DROP_UNTAGGED_ENA BIT(6) 305964ee5c8SVladimir Oltean #define ANA_PORT_DROP_CFG_DROP_S_TAGGED_ENA BIT(5) 306964ee5c8SVladimir Oltean #define ANA_PORT_DROP_CFG_DROP_C_TAGGED_ENA BIT(4) 307964ee5c8SVladimir Oltean #define ANA_PORT_DROP_CFG_DROP_PRIO_S_TAGGED_ENA BIT(3) 308964ee5c8SVladimir Oltean #define ANA_PORT_DROP_CFG_DROP_PRIO_C_TAGGED_ENA BIT(2) 309964ee5c8SVladimir Oltean #define ANA_PORT_DROP_CFG_DROP_NULL_MAC_ENA BIT(1) 310964ee5c8SVladimir Oltean #define ANA_PORT_DROP_CFG_DROP_MC_SMAC_ENA BIT(0) 311964ee5c8SVladimir Oltean 312964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_GSZ 0x100 313964ee5c8SVladimir Oltean 314964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_DP_DEFAULT_VAL BIT(8) 315964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_QOS_DEFAULT_VAL(x) (((x) << 5) & GENMASK(7, 5)) 316964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_QOS_DEFAULT_VAL_M GENMASK(7, 5) 317964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_QOS_DEFAULT_VAL_X(x) (((x) & GENMASK(7, 5)) >> 5) 318964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_QOS_DSCP_ENA BIT(4) 319964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_QOS_PCP_ENA BIT(3) 320964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_DSCP_TRANSLATE_ENA BIT(2) 321964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_DSCP_REWR_CFG(x) ((x) & GENMASK(1, 0)) 322964ee5c8SVladimir Oltean #define ANA_PORT_QOS_CFG_DSCP_REWR_CFG_M GENMASK(1, 0) 323964ee5c8SVladimir Oltean 324964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_GSZ 0x100 325964ee5c8SVladimir Oltean 326964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_S1_ENA BIT(14) 327964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_S1_DMAC_DIP_ENA(x) (((x) << 11) & GENMASK(13, 11)) 328964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_S1_DMAC_DIP_ENA_M GENMASK(13, 11) 329964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_S1_DMAC_DIP_ENA_X(x) (((x) & GENMASK(13, 11)) >> 11) 330964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_S1_VLAN_INNER_TAG_ENA(x) (((x) << 8) & GENMASK(10, 8)) 331964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_S1_VLAN_INNER_TAG_ENA_M GENMASK(10, 8) 332964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_S1_VLAN_INNER_TAG_ENA_X(x) (((x) & GENMASK(10, 8)) >> 8) 333964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_PAG_VAL(x) ((x) & GENMASK(7, 0)) 334964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_CFG_PAG_VAL_M GENMASK(7, 0) 335964ee5c8SVladimir Oltean 336964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_GSZ 0x100 337964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_RSZ 0x4 338964ee5c8SVladimir Oltean 339964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP6_CFG(x) (((x) << 4) & GENMASK(6, 4)) 340964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP6_CFG_M GENMASK(6, 4) 341964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP6_CFG_X(x) (((x) & GENMASK(6, 4)) >> 4) 342964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP4_CFG(x) (((x) << 2) & GENMASK(3, 2)) 343964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP4_CFG_M GENMASK(3, 2) 344964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP4_CFG_X(x) (((x) & GENMASK(3, 2)) >> 2) 345964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_OTHER_CFG(x) ((x) & GENMASK(1, 0)) 346964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_OTHER_CFG_M GENMASK(1, 0) 347964ee5c8SVladimir Oltean 348964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_GSZ 0x100 349964ee5c8SVladimir Oltean 350964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_UDP_PAYLOAD_ENA(x) (((x) << 17) & GENMASK(18, 17)) 351964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_UDP_PAYLOAD_ENA_M GENMASK(18, 17) 352964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_UDP_PAYLOAD_ENA_X(x) (((x) & GENMASK(18, 17)) >> 17) 353964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_ETYPE_PAYLOAD_ENA(x) (((x) << 15) & GENMASK(16, 15)) 354964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_ETYPE_PAYLOAD_ENA_M GENMASK(16, 15) 355964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_ETYPE_PAYLOAD_ENA_X(x) (((x) & GENMASK(16, 15)) >> 15) 356964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_ENA BIT(14) 357964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_SNAP_DIS(x) (((x) << 12) & GENMASK(13, 12)) 358964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_SNAP_DIS_M GENMASK(13, 12) 359964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_SNAP_DIS_X(x) (((x) & GENMASK(13, 12)) >> 12) 360964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_ARP_DIS(x) (((x) << 10) & GENMASK(11, 10)) 361964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_ARP_DIS_M GENMASK(11, 10) 362964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_ARP_DIS_X(x) (((x) & GENMASK(11, 10)) >> 10) 363964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_IP_TCPUDP_DIS(x) (((x) << 8) & GENMASK(9, 8)) 364964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_IP_TCPUDP_DIS_M GENMASK(9, 8) 365964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_IP_TCPUDP_DIS_X(x) (((x) & GENMASK(9, 8)) >> 8) 366964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_IP_OTHER_DIS(x) (((x) << 6) & GENMASK(7, 6)) 367964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_IP_OTHER_DIS_M GENMASK(7, 6) 368964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_IP_OTHER_DIS_X(x) (((x) & GENMASK(7, 6)) >> 6) 369964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_IP6_CFG(x) (((x) << 2) & GENMASK(5, 2)) 370964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_IP6_CFG_M GENMASK(5, 2) 371964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_IP6_CFG_X(x) (((x) & GENMASK(5, 2)) >> 2) 372964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_OAM_DIS(x) ((x) & GENMASK(1, 0)) 373964ee5c8SVladimir Oltean #define ANA_PORT_VCAP_S2_CFG_S2_OAM_DIS_M GENMASK(1, 0) 374964ee5c8SVladimir Oltean 375964ee5c8SVladimir Oltean #define ANA_PORT_PCP_DEI_MAP_GSZ 0x100 376964ee5c8SVladimir Oltean #define ANA_PORT_PCP_DEI_MAP_RSZ 0x4 377964ee5c8SVladimir Oltean 378964ee5c8SVladimir Oltean #define ANA_PORT_PCP_DEI_MAP_DP_PCP_DEI_VAL BIT(3) 379964ee5c8SVladimir Oltean #define ANA_PORT_PCP_DEI_MAP_QOS_PCP_DEI_VAL(x) ((x) & GENMASK(2, 0)) 380964ee5c8SVladimir Oltean #define ANA_PORT_PCP_DEI_MAP_QOS_PCP_DEI_VAL_M GENMASK(2, 0) 381964ee5c8SVladimir Oltean 382964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CFG_GSZ 0x100 383964ee5c8SVladimir Oltean 384964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CFG_CPU_VRAP_REDIR_ENA BIT(7) 385964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CFG_CPU_MLD_REDIR_ENA BIT(6) 386964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CFG_CPU_IGMP_REDIR_ENA BIT(5) 387964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CFG_CPU_IPMC_CTRL_COPY_ENA BIT(4) 388964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CFG_CPU_SRC_COPY_ENA BIT(3) 389964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CFG_CPU_ALLBRIDGE_DROP_ENA BIT(2) 390964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CFG_CPU_ALLBRIDGE_REDIR_ENA BIT(1) 391964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CFG_CPU_OAM_ENA BIT(0) 392964ee5c8SVladimir Oltean 393964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_BPDU_CFG_GSZ 0x100 394964ee5c8SVladimir Oltean 395964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_DROP_ENA(x) (((x) << 16) & GENMASK(31, 16)) 396964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_DROP_ENA_M GENMASK(31, 16) 397964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_DROP_ENA_X(x) (((x) & GENMASK(31, 16)) >> 16) 398964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_REDIR_ENA(x) ((x) & GENMASK(15, 0)) 399964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_REDIR_ENA_M GENMASK(15, 0) 400964ee5c8SVladimir Oltean 401964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_GARP_CFG_GSZ 0x100 402964ee5c8SVladimir Oltean 403964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_GARP_CFG_GARP_DROP_ENA(x) (((x) << 16) & GENMASK(31, 16)) 404964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_GARP_CFG_GARP_DROP_ENA_M GENMASK(31, 16) 405964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_GARP_CFG_GARP_DROP_ENA_X(x) (((x) & GENMASK(31, 16)) >> 16) 406964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_GARP_CFG_GARP_REDIR_ENA(x) ((x) & GENMASK(15, 0)) 407964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_GARP_CFG_GARP_REDIR_ENA_M GENMASK(15, 0) 408964ee5c8SVladimir Oltean 409964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CCM_CFG_GSZ 0x100 410964ee5c8SVladimir Oltean 411964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CCM_CFG_CCM_DROP_ENA(x) (((x) << 16) & GENMASK(31, 16)) 412964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CCM_CFG_CCM_DROP_ENA_M GENMASK(31, 16) 413964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CCM_CFG_CCM_DROP_ENA_X(x) (((x) & GENMASK(31, 16)) >> 16) 414964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CCM_CFG_CCM_REDIR_ENA(x) ((x) & GENMASK(15, 0)) 415964ee5c8SVladimir Oltean #define ANA_PORT_CPU_FWD_CCM_CFG_CCM_REDIR_ENA_M GENMASK(15, 0) 416964ee5c8SVladimir Oltean 417964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_GSZ 0x100 418964ee5c8SVladimir Oltean 419964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_SRC_MIRROR_ENA BIT(15) 420964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_LIMIT_DROP BIT(14) 421964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_LIMIT_CPU BIT(13) 422964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_LOCKED_PORTMOVE_DROP BIT(12) 423964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_LOCKED_PORTMOVE_CPU BIT(11) 424964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_LEARNDROP BIT(10) 425964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_LEARNCPU BIT(9) 426964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_LEARNAUTO BIT(8) 427964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_LEARN_ENA BIT(7) 428964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_RECV_ENA BIT(6) 429964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_PORTID_VAL(x) (((x) << 2) & GENMASK(5, 2)) 430964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_PORTID_VAL_M GENMASK(5, 2) 431964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_PORTID_VAL_X(x) (((x) & GENMASK(5, 2)) >> 2) 432964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_USE_B_DOM_TBL BIT(1) 433964ee5c8SVladimir Oltean #define ANA_PORT_PORT_CFG_LSR_MODE BIT(0) 434964ee5c8SVladimir Oltean 435964ee5c8SVladimir Oltean #define ANA_PORT_POL_CFG_GSZ 0x100 436964ee5c8SVladimir Oltean 437964ee5c8SVladimir Oltean #define ANA_PORT_POL_CFG_POL_CPU_REDIR_8021 BIT(19) 438964ee5c8SVladimir Oltean #define ANA_PORT_POL_CFG_POL_CPU_REDIR_IP BIT(18) 439964ee5c8SVladimir Oltean #define ANA_PORT_POL_CFG_PORT_POL_ENA BIT(17) 440964ee5c8SVladimir Oltean #define ANA_PORT_POL_CFG_QUEUE_POL_ENA(x) (((x) << 9) & GENMASK(16, 9)) 441964ee5c8SVladimir Oltean #define ANA_PORT_POL_CFG_QUEUE_POL_ENA_M GENMASK(16, 9) 442964ee5c8SVladimir Oltean #define ANA_PORT_POL_CFG_QUEUE_POL_ENA_X(x) (((x) & GENMASK(16, 9)) >> 9) 443964ee5c8SVladimir Oltean #define ANA_PORT_POL_CFG_POL_ORDER(x) ((x) & GENMASK(8, 0)) 444964ee5c8SVladimir Oltean #define ANA_PORT_POL_CFG_POL_ORDER_M GENMASK(8, 0) 445964ee5c8SVladimir Oltean 446964ee5c8SVladimir Oltean #define ANA_PORT_PTP_CFG_GSZ 0x100 447964ee5c8SVladimir Oltean 448964ee5c8SVladimir Oltean #define ANA_PORT_PTP_CFG_PTP_BACKPLANE_MODE BIT(0) 449964ee5c8SVladimir Oltean 450964ee5c8SVladimir Oltean #define ANA_PORT_PTP_DLY1_CFG_GSZ 0x100 451964ee5c8SVladimir Oltean 452964ee5c8SVladimir Oltean #define ANA_PORT_PTP_DLY2_CFG_GSZ 0x100 453964ee5c8SVladimir Oltean 454964ee5c8SVladimir Oltean #define ANA_PORT_SFID_CFG_GSZ 0x100 455964ee5c8SVladimir Oltean #define ANA_PORT_SFID_CFG_RSZ 0x4 456964ee5c8SVladimir Oltean 457964ee5c8SVladimir Oltean #define ANA_PORT_SFID_CFG_SFID_VALID BIT(8) 458964ee5c8SVladimir Oltean #define ANA_PORT_SFID_CFG_SFID(x) ((x) & GENMASK(7, 0)) 459964ee5c8SVladimir Oltean #define ANA_PORT_SFID_CFG_SFID_M GENMASK(7, 0) 460964ee5c8SVladimir Oltean 461964ee5c8SVladimir Oltean #define ANA_PFC_PFC_CFG_GSZ 0x40 462964ee5c8SVladimir Oltean 463964ee5c8SVladimir Oltean #define ANA_PFC_PFC_CFG_RX_PFC_ENA(x) (((x) << 2) & GENMASK(9, 2)) 464964ee5c8SVladimir Oltean #define ANA_PFC_PFC_CFG_RX_PFC_ENA_M GENMASK(9, 2) 465964ee5c8SVladimir Oltean #define ANA_PFC_PFC_CFG_RX_PFC_ENA_X(x) (((x) & GENMASK(9, 2)) >> 2) 466964ee5c8SVladimir Oltean #define ANA_PFC_PFC_CFG_FC_LINK_SPEED(x) ((x) & GENMASK(1, 0)) 467964ee5c8SVladimir Oltean #define ANA_PFC_PFC_CFG_FC_LINK_SPEED_M GENMASK(1, 0) 468964ee5c8SVladimir Oltean 469964ee5c8SVladimir Oltean #define ANA_PFC_PFC_TIMER_GSZ 0x40 470964ee5c8SVladimir Oltean #define ANA_PFC_PFC_TIMER_RSZ 0x4 471964ee5c8SVladimir Oltean 472964ee5c8SVladimir Oltean #define ANA_IPT_OAM_MEP_CFG_GSZ 0x8 473964ee5c8SVladimir Oltean 474964ee5c8SVladimir Oltean #define ANA_IPT_OAM_MEP_CFG_MEP_IDX_P(x) (((x) << 6) & GENMASK(10, 6)) 475964ee5c8SVladimir Oltean #define ANA_IPT_OAM_MEP_CFG_MEP_IDX_P_M GENMASK(10, 6) 476964ee5c8SVladimir Oltean #define ANA_IPT_OAM_MEP_CFG_MEP_IDX_P_X(x) (((x) & GENMASK(10, 6)) >> 6) 477964ee5c8SVladimir Oltean #define ANA_IPT_OAM_MEP_CFG_MEP_IDX(x) (((x) << 1) & GENMASK(5, 1)) 478964ee5c8SVladimir Oltean #define ANA_IPT_OAM_MEP_CFG_MEP_IDX_M GENMASK(5, 1) 479964ee5c8SVladimir Oltean #define ANA_IPT_OAM_MEP_CFG_MEP_IDX_X(x) (((x) & GENMASK(5, 1)) >> 1) 480964ee5c8SVladimir Oltean #define ANA_IPT_OAM_MEP_CFG_MEP_IDX_ENA BIT(0) 481964ee5c8SVladimir Oltean 482964ee5c8SVladimir Oltean #define ANA_IPT_IPT_GSZ 0x8 483964ee5c8SVladimir Oltean 484964ee5c8SVladimir Oltean #define ANA_IPT_IPT_IPT_CFG(x) (((x) << 15) & GENMASK(16, 15)) 485964ee5c8SVladimir Oltean #define ANA_IPT_IPT_IPT_CFG_M GENMASK(16, 15) 486964ee5c8SVladimir Oltean #define ANA_IPT_IPT_IPT_CFG_X(x) (((x) & GENMASK(16, 15)) >> 15) 487964ee5c8SVladimir Oltean #define ANA_IPT_IPT_ISDX_P(x) (((x) << 7) & GENMASK(14, 7)) 488964ee5c8SVladimir Oltean #define ANA_IPT_IPT_ISDX_P_M GENMASK(14, 7) 489964ee5c8SVladimir Oltean #define ANA_IPT_IPT_ISDX_P_X(x) (((x) & GENMASK(14, 7)) >> 7) 490964ee5c8SVladimir Oltean #define ANA_IPT_IPT_PPT_IDX(x) ((x) & GENMASK(6, 0)) 491964ee5c8SVladimir Oltean #define ANA_IPT_IPT_PPT_IDX_M GENMASK(6, 0) 492964ee5c8SVladimir Oltean 493964ee5c8SVladimir Oltean #define ANA_PPT_PPT_RSZ 0x4 494964ee5c8SVladimir Oltean 495964ee5c8SVladimir Oltean #define ANA_FID_MAP_FID_MAP_RSZ 0x4 496964ee5c8SVladimir Oltean 497964ee5c8SVladimir Oltean #define ANA_FID_MAP_FID_MAP_FID_C_VAL(x) (((x) << 6) & GENMASK(11, 6)) 498964ee5c8SVladimir Oltean #define ANA_FID_MAP_FID_MAP_FID_C_VAL_M GENMASK(11, 6) 499964ee5c8SVladimir Oltean #define ANA_FID_MAP_FID_MAP_FID_C_VAL_X(x) (((x) & GENMASK(11, 6)) >> 6) 500964ee5c8SVladimir Oltean #define ANA_FID_MAP_FID_MAP_FID_B_VAL(x) ((x) & GENMASK(5, 0)) 501964ee5c8SVladimir Oltean #define ANA_FID_MAP_FID_MAP_FID_B_VAL_M GENMASK(5, 0) 502964ee5c8SVladimir Oltean 503964ee5c8SVladimir Oltean #define ANA_AGGR_CFG_AC_RND_ENA BIT(7) 504964ee5c8SVladimir Oltean #define ANA_AGGR_CFG_AC_DMAC_ENA BIT(6) 505964ee5c8SVladimir Oltean #define ANA_AGGR_CFG_AC_SMAC_ENA BIT(5) 506964ee5c8SVladimir Oltean #define ANA_AGGR_CFG_AC_IP6_FLOW_LBL_ENA BIT(4) 507964ee5c8SVladimir Oltean #define ANA_AGGR_CFG_AC_IP6_TCPUDP_ENA BIT(3) 508964ee5c8SVladimir Oltean #define ANA_AGGR_CFG_AC_IP4_SIPDIP_ENA BIT(2) 509964ee5c8SVladimir Oltean #define ANA_AGGR_CFG_AC_IP4_TCPUDP_ENA BIT(1) 510964ee5c8SVladimir Oltean #define ANA_AGGR_CFG_AC_ISDX_ENA BIT(0) 511964ee5c8SVladimir Oltean 512964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_MLD(x) (((x) << 27) & GENMASK(29, 27)) 513964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_MLD_M GENMASK(29, 27) 514964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_MLD_X(x) (((x) & GENMASK(29, 27)) >> 27) 515964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_IGMP(x) (((x) << 24) & GENMASK(26, 24)) 516964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_IGMP_M GENMASK(26, 24) 517964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_IGMP_X(x) (((x) & GENMASK(26, 24)) >> 24) 518964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_IPMC_CTRL(x) (((x) << 21) & GENMASK(23, 21)) 519964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_IPMC_CTRL_M GENMASK(23, 21) 520964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_IPMC_CTRL_X(x) (((x) & GENMASK(23, 21)) >> 21) 521964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_ALLBRIDGE(x) (((x) << 18) & GENMASK(20, 18)) 522964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_ALLBRIDGE_M GENMASK(20, 18) 523964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_ALLBRIDGE_X(x) (((x) & GENMASK(20, 18)) >> 18) 524964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_LOCKED_PORTMOVE(x) (((x) << 15) & GENMASK(17, 15)) 525964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_LOCKED_PORTMOVE_M GENMASK(17, 15) 526964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_LOCKED_PORTMOVE_X(x) (((x) & GENMASK(17, 15)) >> 15) 527964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_SRC_COPY(x) (((x) << 12) & GENMASK(14, 12)) 528964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_SRC_COPY_M GENMASK(14, 12) 529964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_SRC_COPY_X(x) (((x) & GENMASK(14, 12)) >> 12) 530964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_MAC_COPY(x) (((x) << 9) & GENMASK(11, 9)) 531964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_MAC_COPY_M GENMASK(11, 9) 532964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_MAC_COPY_X(x) (((x) & GENMASK(11, 9)) >> 9) 533964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_LRN(x) (((x) << 6) & GENMASK(8, 6)) 534964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_LRN_M GENMASK(8, 6) 535964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_LRN_X(x) (((x) & GENMASK(8, 6)) >> 6) 536964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_MIRROR(x) (((x) << 3) & GENMASK(5, 3)) 537964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_MIRROR_M GENMASK(5, 3) 538964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_MIRROR_X(x) (((x) & GENMASK(5, 3)) >> 3) 539964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_SFLOW(x) ((x) & GENMASK(2, 0)) 540964ee5c8SVladimir Oltean #define ANA_CPUQ_CFG_CPUQ_SFLOW_M GENMASK(2, 0) 541964ee5c8SVladimir Oltean 542964ee5c8SVladimir Oltean #define ANA_CPUQ_8021_CFG_RSZ 0x4 543964ee5c8SVladimir Oltean 544964ee5c8SVladimir Oltean #define ANA_CPUQ_8021_CFG_CPUQ_BPDU_VAL(x) (((x) << 6) & GENMASK(8, 6)) 545964ee5c8SVladimir Oltean #define ANA_CPUQ_8021_CFG_CPUQ_BPDU_VAL_M GENMASK(8, 6) 546964ee5c8SVladimir Oltean #define ANA_CPUQ_8021_CFG_CPUQ_BPDU_VAL_X(x) (((x) & GENMASK(8, 6)) >> 6) 547964ee5c8SVladimir Oltean #define ANA_CPUQ_8021_CFG_CPUQ_GARP_VAL(x) (((x) << 3) & GENMASK(5, 3)) 548964ee5c8SVladimir Oltean #define ANA_CPUQ_8021_CFG_CPUQ_GARP_VAL_M GENMASK(5, 3) 549964ee5c8SVladimir Oltean #define ANA_CPUQ_8021_CFG_CPUQ_GARP_VAL_X(x) (((x) & GENMASK(5, 3)) >> 3) 550964ee5c8SVladimir Oltean #define ANA_CPUQ_8021_CFG_CPUQ_CCM_VAL(x) ((x) & GENMASK(2, 0)) 551964ee5c8SVladimir Oltean #define ANA_CPUQ_8021_CFG_CPUQ_CCM_VAL_M GENMASK(2, 0) 552964ee5c8SVladimir Oltean 553964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_RSZ 0x4 554964ee5c8SVladimir Oltean 555964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_DP_DSCP_VAL BIT(11) 556964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_QOS_DSCP_VAL(x) (((x) << 8) & GENMASK(10, 8)) 557964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_QOS_DSCP_VAL_M GENMASK(10, 8) 558964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_QOS_DSCP_VAL_X(x) (((x) & GENMASK(10, 8)) >> 8) 559964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_DSCP_TRANSLATE_VAL(x) (((x) << 2) & GENMASK(7, 2)) 560964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_DSCP_TRANSLATE_VAL_M GENMASK(7, 2) 561964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_DSCP_TRANSLATE_VAL_X(x) (((x) & GENMASK(7, 2)) >> 2) 562964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_DSCP_TRUST_ENA BIT(1) 563964ee5c8SVladimir Oltean #define ANA_DSCP_CFG_DSCP_REWR_ENA BIT(0) 564964ee5c8SVladimir Oltean 565964ee5c8SVladimir Oltean #define ANA_DSCP_REWR_CFG_RSZ 0x4 566964ee5c8SVladimir Oltean 567964ee5c8SVladimir Oltean #define ANA_VCAP_RNG_TYPE_CFG_RSZ 0x4 568964ee5c8SVladimir Oltean 569964ee5c8SVladimir Oltean #define ANA_VCAP_RNG_VAL_CFG_RSZ 0x4 570964ee5c8SVladimir Oltean 571964ee5c8SVladimir Oltean #define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MIN_VAL(x) (((x) << 16) & GENMASK(31, 16)) 572964ee5c8SVladimir Oltean #define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MIN_VAL_M GENMASK(31, 16) 573964ee5c8SVladimir Oltean #define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MIN_VAL_X(x) (((x) & GENMASK(31, 16)) >> 16) 574964ee5c8SVladimir Oltean #define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MAX_VAL(x) ((x) & GENMASK(15, 0)) 575964ee5c8SVladimir Oltean #define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MAX_VAL_M GENMASK(15, 0) 576964ee5c8SVladimir Oltean 577964ee5c8SVladimir Oltean #define ANA_VRAP_CFG_VRAP_VLAN_AWARE_ENA BIT(12) 578964ee5c8SVladimir Oltean #define ANA_VRAP_CFG_VRAP_VID(x) ((x) & GENMASK(11, 0)) 579964ee5c8SVladimir Oltean #define ANA_VRAP_CFG_VRAP_VID_M GENMASK(11, 0) 580964ee5c8SVladimir Oltean 581964ee5c8SVladimir Oltean #define ANA_DISCARD_CFG_DROP_TAGGING_ISDX0 BIT(3) 582964ee5c8SVladimir Oltean #define ANA_DISCARD_CFG_DROP_CTRLPROT_ISDX0 BIT(2) 583964ee5c8SVladimir Oltean #define ANA_DISCARD_CFG_DROP_TAGGING_S2_ENA BIT(1) 584964ee5c8SVladimir Oltean #define ANA_DISCARD_CFG_DROP_CTRLPROT_S2_ENA BIT(0) 585964ee5c8SVladimir Oltean 586964ee5c8SVladimir Oltean #define ANA_FID_CFG_VID_MC_ENA BIT(0) 587964ee5c8SVladimir Oltean 588964ee5c8SVladimir Oltean #define ANA_POL_PIR_CFG_GSZ 0x20 589964ee5c8SVladimir Oltean 590964ee5c8SVladimir Oltean #define ANA_POL_PIR_CFG_PIR_RATE(x) (((x) << 6) & GENMASK(20, 6)) 591964ee5c8SVladimir Oltean #define ANA_POL_PIR_CFG_PIR_RATE_M GENMASK(20, 6) 592964ee5c8SVladimir Oltean #define ANA_POL_PIR_CFG_PIR_RATE_X(x) (((x) & GENMASK(20, 6)) >> 6) 593964ee5c8SVladimir Oltean #define ANA_POL_PIR_CFG_PIR_BURST(x) ((x) & GENMASK(5, 0)) 594964ee5c8SVladimir Oltean #define ANA_POL_PIR_CFG_PIR_BURST_M GENMASK(5, 0) 595964ee5c8SVladimir Oltean 596964ee5c8SVladimir Oltean #define ANA_POL_CIR_CFG_GSZ 0x20 597964ee5c8SVladimir Oltean 598964ee5c8SVladimir Oltean #define ANA_POL_CIR_CFG_CIR_RATE(x) (((x) << 6) & GENMASK(20, 6)) 599964ee5c8SVladimir Oltean #define ANA_POL_CIR_CFG_CIR_RATE_M GENMASK(20, 6) 600964ee5c8SVladimir Oltean #define ANA_POL_CIR_CFG_CIR_RATE_X(x) (((x) & GENMASK(20, 6)) >> 6) 601964ee5c8SVladimir Oltean #define ANA_POL_CIR_CFG_CIR_BURST(x) ((x) & GENMASK(5, 0)) 602964ee5c8SVladimir Oltean #define ANA_POL_CIR_CFG_CIR_BURST_M GENMASK(5, 0) 603964ee5c8SVladimir Oltean 604964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_GSZ 0x20 605964ee5c8SVladimir Oltean 606964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_IPG_SIZE(x) (((x) << 5) & GENMASK(9, 5)) 607964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_IPG_SIZE_M GENMASK(9, 5) 608964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_IPG_SIZE_X(x) (((x) & GENMASK(9, 5)) >> 5) 609964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_FRM_MODE(x) (((x) << 3) & GENMASK(4, 3)) 610964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_FRM_MODE_M GENMASK(4, 3) 611964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_FRM_MODE_X(x) (((x) & GENMASK(4, 3)) >> 3) 612964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_DLB_COUPLED BIT(2) 613964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_CIR_ENA BIT(1) 614964ee5c8SVladimir Oltean #define ANA_POL_MODE_CFG_OVERSHOOT_ENA BIT(0) 615964ee5c8SVladimir Oltean 616964ee5c8SVladimir Oltean #define ANA_POL_PIR_STATE_GSZ 0x20 617964ee5c8SVladimir Oltean 618964ee5c8SVladimir Oltean #define ANA_POL_CIR_STATE_GSZ 0x20 619964ee5c8SVladimir Oltean 620964ee5c8SVladimir Oltean #define ANA_POL_STATE_GSZ 0x20 621964ee5c8SVladimir Oltean 622964ee5c8SVladimir Oltean #define ANA_POL_FLOWC_RSZ 0x4 623964ee5c8SVladimir Oltean 624964ee5c8SVladimir Oltean #define ANA_POL_FLOWC_POL_FLOWC BIT(0) 625964ee5c8SVladimir Oltean 626964ee5c8SVladimir Oltean #define ANA_POL_HYST_POL_FC_HYST(x) (((x) << 4) & GENMASK(9, 4)) 627964ee5c8SVladimir Oltean #define ANA_POL_HYST_POL_FC_HYST_M GENMASK(9, 4) 628964ee5c8SVladimir Oltean #define ANA_POL_HYST_POL_FC_HYST_X(x) (((x) & GENMASK(9, 4)) >> 4) 629964ee5c8SVladimir Oltean #define ANA_POL_HYST_POL_STOP_HYST(x) ((x) & GENMASK(3, 0)) 630964ee5c8SVladimir Oltean #define ANA_POL_HYST_POL_STOP_HYST_M GENMASK(3, 0) 631964ee5c8SVladimir Oltean 632964ee5c8SVladimir Oltean #define ANA_POL_MISC_CFG_POL_CLOSE_ALL BIT(1) 633964ee5c8SVladimir Oltean #define ANA_POL_MISC_CFG_POL_LEAK_DIS BIT(0) 634964ee5c8SVladimir Oltean 635964ee5c8SVladimir Oltean #endif 636