18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Microsemi Ocelot Switch driver 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2017 Microsemi Corporation 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef _MSCC_OCELOT_ANA_H_ 98c2ecf20Sopenharmony_ci#define _MSCC_OCELOT_ANA_H_ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_B_DOM_EN BIT(22) 128c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_B_DOM_VAL BIT(21) 138c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_AGE_LOCKED BIT(20) 148c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_PID_EN BIT(19) 158c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_PID_VAL(x) (((x) << 14) & GENMASK(18, 14)) 168c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_PID_VAL_M GENMASK(18, 14) 178c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_PID_VAL_X(x) (((x) & GENMASK(18, 14)) >> 14) 188c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_VID_EN BIT(13) 198c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_VID_VAL(x) ((x) & GENMASK(12, 0)) 208c2ecf20Sopenharmony_ci#define ANA_ANAGEFIL_VID_VAL_M GENMASK(12, 0) 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define ANA_STORMLIMIT_CFG_RSZ 0x4 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define ANA_STORMLIMIT_CFG_STORM_RATE(x) (((x) << 3) & GENMASK(6, 3)) 258c2ecf20Sopenharmony_ci#define ANA_STORMLIMIT_CFG_STORM_RATE_M GENMASK(6, 3) 268c2ecf20Sopenharmony_ci#define ANA_STORMLIMIT_CFG_STORM_RATE_X(x) (((x) & GENMASK(6, 3)) >> 3) 278c2ecf20Sopenharmony_ci#define ANA_STORMLIMIT_CFG_STORM_UNIT BIT(2) 288c2ecf20Sopenharmony_ci#define ANA_STORMLIMIT_CFG_STORM_MODE(x) ((x) & GENMASK(1, 0)) 298c2ecf20Sopenharmony_ci#define ANA_STORMLIMIT_CFG_STORM_MODE_M GENMASK(1, 0) 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#define ANA_AUTOAGE_AGE_FAST BIT(21) 328c2ecf20Sopenharmony_ci#define ANA_AUTOAGE_AGE_PERIOD(x) (((x) << 1) & GENMASK(20, 1)) 338c2ecf20Sopenharmony_ci#define ANA_AUTOAGE_AGE_PERIOD_M GENMASK(20, 1) 348c2ecf20Sopenharmony_ci#define ANA_AUTOAGE_AGE_PERIOD_X(x) (((x) & GENMASK(20, 1)) >> 1) 358c2ecf20Sopenharmony_ci#define ANA_AUTOAGE_AUTOAGE_LOCKED BIT(0) 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define ANA_MACTOPTIONS_REDUCED_TABLE BIT(1) 388c2ecf20Sopenharmony_ci#define ANA_MACTOPTIONS_SHADOW BIT(0) 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_FID_MASK(x) (((x) << 12) & GENMASK(23, 12)) 418c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_FID_MASK_M GENMASK(23, 12) 428c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_FID_MASK_X(x) (((x) & GENMASK(23, 12)) >> 12) 438c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_IGNORE_DMAC_FLAGS BIT(11) 448c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_IGNORE_SMAC_FLAGS BIT(10) 458c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_FLOOD_SPECIAL BIT(9) 468c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_FLOOD_IGNORE_VLAN BIT(8) 478c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_MIRROR_CPU BIT(7) 488c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_LEARN_CPU_COPY BIT(6) 498c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_LEARN_FWD_KILL BIT(5) 508c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_LEARN_IGNORE_VLAN BIT(4) 518c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_CPU_CPU_KILL_ENA BIT(3) 528c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_GREEN_COUNT_MODE BIT(2) 538c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_YELLOW_COUNT_MODE BIT(1) 548c2ecf20Sopenharmony_ci#define ANA_AGENCTRL_RED_COUNT_MODE BIT(0) 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci#define ANA_FLOODING_RSZ 0x4 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci#define ANA_FLOODING_FLD_UNICAST(x) (((x) << 12) & GENMASK(17, 12)) 598c2ecf20Sopenharmony_ci#define ANA_FLOODING_FLD_UNICAST_M GENMASK(17, 12) 608c2ecf20Sopenharmony_ci#define ANA_FLOODING_FLD_UNICAST_X(x) (((x) & GENMASK(17, 12)) >> 12) 618c2ecf20Sopenharmony_ci#define ANA_FLOODING_FLD_BROADCAST(x) (((x) << 6) & GENMASK(11, 6)) 628c2ecf20Sopenharmony_ci#define ANA_FLOODING_FLD_BROADCAST_M GENMASK(11, 6) 638c2ecf20Sopenharmony_ci#define ANA_FLOODING_FLD_BROADCAST_X(x) (((x) & GENMASK(11, 6)) >> 6) 648c2ecf20Sopenharmony_ci#define ANA_FLOODING_FLD_MULTICAST(x) ((x) & GENMASK(5, 0)) 658c2ecf20Sopenharmony_ci#define ANA_FLOODING_FLD_MULTICAST_M GENMASK(5, 0) 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC4_CTRL(x) (((x) << 18) & GENMASK(23, 18)) 688c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC4_CTRL_M GENMASK(23, 18) 698c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC4_CTRL_X(x) (((x) & GENMASK(23, 18)) >> 18) 708c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC4_DATA(x) (((x) << 12) & GENMASK(17, 12)) 718c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC4_DATA_M GENMASK(17, 12) 728c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC4_DATA_X(x) (((x) & GENMASK(17, 12)) >> 12) 738c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC6_CTRL(x) (((x) << 6) & GENMASK(11, 6)) 748c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC6_CTRL_M GENMASK(11, 6) 758c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC6_CTRL_X(x) (((x) & GENMASK(11, 6)) >> 6) 768c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC6_DATA(x) ((x) & GENMASK(5, 0)) 778c2ecf20Sopenharmony_ci#define ANA_FLOODING_IPMC_FLD_MC6_DATA_M GENMASK(5, 0) 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci#define ANA_SFLOW_CFG_RSZ 0x4 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci#define ANA_SFLOW_CFG_SF_RATE(x) (((x) << 2) & GENMASK(13, 2)) 828c2ecf20Sopenharmony_ci#define ANA_SFLOW_CFG_SF_RATE_M GENMASK(13, 2) 838c2ecf20Sopenharmony_ci#define ANA_SFLOW_CFG_SF_RATE_X(x) (((x) & GENMASK(13, 2)) >> 2) 848c2ecf20Sopenharmony_ci#define ANA_SFLOW_CFG_SF_SAMPLE_RX BIT(1) 858c2ecf20Sopenharmony_ci#define ANA_SFLOW_CFG_SF_SAMPLE_TX BIT(0) 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci#define ANA_PORT_MODE_RSZ 0x4 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci#define ANA_PORT_MODE_REDTAG_PARSE_CFG BIT(3) 908c2ecf20Sopenharmony_ci#define ANA_PORT_MODE_VLAN_PARSE_CFG(x) (((x) << 1) & GENMASK(2, 1)) 918c2ecf20Sopenharmony_ci#define ANA_PORT_MODE_VLAN_PARSE_CFG_M GENMASK(2, 1) 928c2ecf20Sopenharmony_ci#define ANA_PORT_MODE_VLAN_PARSE_CFG_X(x) (((x) & GENMASK(2, 1)) >> 1) 938c2ecf20Sopenharmony_ci#define ANA_PORT_MODE_L3_PARSE_CFG BIT(0) 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci#define ANA_CUT_THRU_CFG_RSZ 0x4 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci#define ANA_PGID_PGID_RSZ 0x4 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci#define ANA_PGID_PGID_PGID(x) ((x) & GENMASK(11, 0)) 1008c2ecf20Sopenharmony_ci#define ANA_PGID_PGID_PGID_M GENMASK(11, 0) 1018c2ecf20Sopenharmony_ci#define ANA_PGID_PGID_CPUQ_DST_PGID(x) (((x) << 27) & GENMASK(29, 27)) 1028c2ecf20Sopenharmony_ci#define ANA_PGID_PGID_CPUQ_DST_PGID_M GENMASK(29, 27) 1038c2ecf20Sopenharmony_ci#define ANA_PGID_PGID_CPUQ_DST_PGID_X(x) (((x) & GENMASK(29, 27)) >> 27) 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci#define ANA_TABLES_MACHDATA_VID(x) (((x) << 16) & GENMASK(28, 16)) 1068c2ecf20Sopenharmony_ci#define ANA_TABLES_MACHDATA_VID_M GENMASK(28, 16) 1078c2ecf20Sopenharmony_ci#define ANA_TABLES_MACHDATA_VID_X(x) (((x) & GENMASK(28, 16)) >> 16) 1088c2ecf20Sopenharmony_ci#define ANA_TABLES_MACHDATA_MACHDATA(x) ((x) & GENMASK(15, 0)) 1098c2ecf20Sopenharmony_ci#define ANA_TABLES_MACHDATA_MACHDATA_M GENMASK(15, 0) 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMDATA_SSID_VALID BIT(16) 1128c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMDATA_SSID(x) (((x) << 9) & GENMASK(15, 9)) 1138c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMDATA_SSID_M GENMASK(15, 9) 1148c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMDATA_SSID_X(x) (((x) & GENMASK(15, 9)) >> 9) 1158c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMDATA_SFID_VALID BIT(8) 1168c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMDATA_SFID(x) ((x) & GENMASK(7, 0)) 1178c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMDATA_SFID_M GENMASK(7, 0) 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_MAC_CPU_COPY BIT(15) 1208c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_SRC_KILL BIT(14) 1218c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_IGNORE_VLAN BIT(13) 1228c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_AGED_FLAG BIT(12) 1238c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_VALID BIT(11) 1248c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_ENTRYTYPE(x) (((x) << 9) & GENMASK(10, 9)) 1258c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_ENTRYTYPE_M GENMASK(10, 9) 1268c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_ENTRYTYPE_X(x) (((x) & GENMASK(10, 9)) >> 9) 1278c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_DEST_IDX(x) (((x) << 3) & GENMASK(8, 3)) 1288c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_DEST_IDX_M GENMASK(8, 3) 1298c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_DEST_IDX_X(x) (((x) & GENMASK(8, 3)) >> 3) 1308c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_MAC_TABLE_CMD(x) ((x) & GENMASK(2, 0)) 1318c2ecf20Sopenharmony_ci#define ANA_TABLES_MACACCESS_MAC_TABLE_CMD_M GENMASK(2, 0) 1328c2ecf20Sopenharmony_ci#define MACACCESS_CMD_IDLE 0 1338c2ecf20Sopenharmony_ci#define MACACCESS_CMD_LEARN 1 1348c2ecf20Sopenharmony_ci#define MACACCESS_CMD_FORGET 2 1358c2ecf20Sopenharmony_ci#define MACACCESS_CMD_AGE 3 1368c2ecf20Sopenharmony_ci#define MACACCESS_CMD_GET_NEXT 4 1378c2ecf20Sopenharmony_ci#define MACACCESS_CMD_INIT 5 1388c2ecf20Sopenharmony_ci#define MACACCESS_CMD_READ 6 1398c2ecf20Sopenharmony_ci#define MACACCESS_CMD_WRITE 7 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANACCESS_VLAN_PORT_MASK(x) (((x) << 2) & GENMASK(13, 2)) 1428c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANACCESS_VLAN_PORT_MASK_M GENMASK(13, 2) 1438c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANACCESS_VLAN_PORT_MASK_X(x) (((x) & GENMASK(13, 2)) >> 2) 1448c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANACCESS_VLAN_TBL_CMD(x) ((x) & GENMASK(1, 0)) 1458c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANACCESS_VLAN_TBL_CMD_M GENMASK(1, 0) 1468c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANACCESS_CMD_IDLE 0x0 1478c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANACCESS_CMD_WRITE 0x2 1488c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANACCESS_CMD_INIT 0x3 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANTIDX_VLAN_SEC_FWD_ENA BIT(17) 1518c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANTIDX_VLAN_FLOOD_DIS BIT(16) 1528c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANTIDX_VLAN_PRIV_VLAN BIT(15) 1538c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANTIDX_VLAN_LEARN_DISABLED BIT(14) 1548c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANTIDX_VLAN_MIRROR BIT(13) 1558c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANTIDX_VLAN_SRC_CHK BIT(12) 1568c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANTIDX_V_INDEX(x) ((x) & GENMASK(11, 0)) 1578c2ecf20Sopenharmony_ci#define ANA_TABLES_VLANTIDX_V_INDEX_M GENMASK(11, 0) 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXACCESS_ISDX_PORT_MASK(x) (((x) << 2) & GENMASK(8, 2)) 1608c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXACCESS_ISDX_PORT_MASK_M GENMASK(8, 2) 1618c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXACCESS_ISDX_PORT_MASK_X(x) (((x) & GENMASK(8, 2)) >> 2) 1628c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXACCESS_ISDX_TBL_CMD(x) ((x) & GENMASK(1, 0)) 1638c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXACCESS_ISDX_TBL_CMD_M GENMASK(1, 0) 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_SDLBI(x) (((x) << 21) & GENMASK(28, 21)) 1668c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_SDLBI_M GENMASK(28, 21) 1678c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_SDLBI_X(x) (((x) & GENMASK(28, 21)) >> 21) 1688c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_MSTI(x) (((x) << 15) & GENMASK(20, 15)) 1698c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_MSTI_M GENMASK(20, 15) 1708c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_MSTI_X(x) (((x) & GENMASK(20, 15)) >> 15) 1718c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_ES0_KEY_ENA BIT(14) 1728c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_FORCE_ENA BIT(10) 1738c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_INDEX(x) ((x) & GENMASK(7, 0)) 1748c2ecf20Sopenharmony_ci#define ANA_TABLES_ISDXTIDX_ISDX_INDEX_M GENMASK(7, 0) 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci#define ANA_TABLES_ENTRYLIM_RSZ 0x4 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci#define ANA_TABLES_ENTRYLIM_ENTRYLIM(x) (((x) << 14) & GENMASK(17, 14)) 1798c2ecf20Sopenharmony_ci#define ANA_TABLES_ENTRYLIM_ENTRYLIM_M GENMASK(17, 14) 1808c2ecf20Sopenharmony_ci#define ANA_TABLES_ENTRYLIM_ENTRYLIM_X(x) (((x) & GENMASK(17, 14)) >> 14) 1818c2ecf20Sopenharmony_ci#define ANA_TABLES_ENTRYLIM_ENTRYSTAT(x) ((x) & GENMASK(13, 0)) 1828c2ecf20Sopenharmony_ci#define ANA_TABLES_ENTRYLIM_ENTRYSTAT_M GENMASK(13, 0) 1838c2ecf20Sopenharmony_ci 1848c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMACCESS_GEN_REC_SEQ_NUM(x) (((x) << 4) & GENMASK(31, 4)) 1858c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMACCESS_GEN_REC_SEQ_NUM_M GENMASK(31, 4) 1868c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMACCESS_GEN_REC_SEQ_NUM_X(x) (((x) & GENMASK(31, 4)) >> 4) 1878c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMACCESS_SEQ_GEN_REC_ENA BIT(3) 1888c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMACCESS_GEN_REC_TYPE BIT(2) 1898c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMACCESS_STREAM_TBL_CMD(x) ((x) & GENMASK(1, 0)) 1908c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMACCESS_STREAM_TBL_CMD_M GENMASK(1, 0) 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_SEQ_GEN_ERR_STATUS(x) (((x) << 30) & GENMASK(31, 30)) 1938c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_SEQ_GEN_ERR_STATUS_M GENMASK(31, 30) 1948c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_SEQ_GEN_ERR_STATUS_X(x) (((x) & GENMASK(31, 30)) >> 30) 1958c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_S_INDEX(x) (((x) << 16) & GENMASK(22, 16)) 1968c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_S_INDEX_M GENMASK(22, 16) 1978c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_S_INDEX_X(x) (((x) & GENMASK(22, 16)) >> 16) 1988c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_FORCE_SF_BEHAVIOUR BIT(14) 1998c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_SEQ_HISTORY_LEN(x) (((x) << 8) & GENMASK(13, 8)) 2008c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_SEQ_HISTORY_LEN_M GENMASK(13, 8) 2018c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_SEQ_HISTORY_LEN_X(x) (((x) & GENMASK(13, 8)) >> 8) 2028c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_RESET_ON_ROGUE BIT(7) 2038c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_REDTAG_POP BIT(6) 2048c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_STREAM_SPLIT BIT(5) 2058c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_SEQ_SPACE_LOG2(x) ((x) & GENMASK(4, 0)) 2068c2ecf20Sopenharmony_ci#define ANA_TABLES_STREAMTIDX_SEQ_SPACE_LOG2_M GENMASK(4, 0) 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_ci#define ANA_TABLES_SEQ_MASK_SPLIT_MASK(x) (((x) << 16) & GENMASK(22, 16)) 2098c2ecf20Sopenharmony_ci#define ANA_TABLES_SEQ_MASK_SPLIT_MASK_M GENMASK(22, 16) 2108c2ecf20Sopenharmony_ci#define ANA_TABLES_SEQ_MASK_SPLIT_MASK_X(x) (((x) & GENMASK(22, 16)) >> 16) 2118c2ecf20Sopenharmony_ci#define ANA_TABLES_SEQ_MASK_INPUT_PORT_MASK(x) ((x) & GENMASK(6, 0)) 2128c2ecf20Sopenharmony_ci#define ANA_TABLES_SEQ_MASK_INPUT_PORT_MASK_M GENMASK(6, 0) 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci#define ANA_TABLES_SFID_MASK_IGR_PORT_MASK(x) (((x) << 1) & GENMASK(7, 1)) 2158c2ecf20Sopenharmony_ci#define ANA_TABLES_SFID_MASK_IGR_PORT_MASK_M GENMASK(7, 1) 2168c2ecf20Sopenharmony_ci#define ANA_TABLES_SFID_MASK_IGR_PORT_MASK_X(x) (((x) & GENMASK(7, 1)) >> 1) 2178c2ecf20Sopenharmony_ci#define ANA_TABLES_SFID_MASK_IGR_SRCPORT_MATCH_ENA BIT(0) 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_IGR_PRIO_MATCH_ENA BIT(22) 2208c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_IGR_PRIO(x) (((x) << 19) & GENMASK(21, 19)) 2218c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_IGR_PRIO_M GENMASK(21, 19) 2228c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_IGR_PRIO_X(x) (((x) & GENMASK(21, 19)) >> 19) 2238c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_FORCE_BLOCK BIT(18) 2248c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_MAX_SDU_LEN(x) (((x) << 2) & GENMASK(17, 2)) 2258c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_MAX_SDU_LEN_M GENMASK(17, 2) 2268c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_MAX_SDU_LEN_X(x) (((x) & GENMASK(17, 2)) >> 2) 2278c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_SFID_TBL_CMD(x) ((x) & GENMASK(1, 0)) 2288c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDACCESS_SFID_TBL_CMD_M GENMASK(1, 0) 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_SGID_VALID BIT(26) 2318c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_SGID(x) (((x) << 18) & GENMASK(25, 18)) 2328c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_SGID_M GENMASK(25, 18) 2338c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_SGID_X(x) (((x) & GENMASK(25, 18)) >> 18) 2348c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_POL_ENA BIT(17) 2358c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_POL_IDX(x) (((x) << 8) & GENMASK(16, 8)) 2368c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_POL_IDX_M GENMASK(16, 8) 2378c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_POL_IDX_X(x) (((x) & GENMASK(16, 8)) >> 8) 2388c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_SFID_INDEX(x) ((x) & GENMASK(7, 0)) 2398c2ecf20Sopenharmony_ci#define ANA_TABLES_SFIDTIDX_SFID_INDEX_M GENMASK(7, 0) 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ci#define ANA_MSTI_STATE_RSZ 0x4 2428c2ecf20Sopenharmony_ci 2438c2ecf20Sopenharmony_ci#define ANA_OAM_UPM_LM_CNT_RSZ 0x4 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci#define ANA_SG_ACCESS_CTRL_SGID(x) ((x) & GENMASK(7, 0)) 2468c2ecf20Sopenharmony_ci#define ANA_SG_ACCESS_CTRL_SGID_M GENMASK(7, 0) 2478c2ecf20Sopenharmony_ci#define ANA_SG_ACCESS_CTRL_CONFIG_CHANGE BIT(28) 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_BASE_TIME_SEC_MSB(x) ((x) & GENMASK(15, 0)) 2508c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_BASE_TIME_SEC_MSB_M GENMASK(15, 0) 2518c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_LIST_LENGTH(x) (((x) << 16) & GENMASK(18, 16)) 2528c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_LIST_LENGTH_M GENMASK(18, 16) 2538c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_LIST_LENGTH_X(x) (((x) & GENMASK(18, 16)) >> 16) 2548c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_GATE_ENABLE BIT(20) 2558c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_INIT_IPS(x) (((x) << 21) & GENMASK(24, 21)) 2568c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_INIT_IPS_M GENMASK(24, 21) 2578c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_INIT_IPS_X(x) (((x) & GENMASK(24, 21)) >> 21) 2588c2ecf20Sopenharmony_ci#define ANA_SG_CONFIG_REG_3_INIT_GATE_STATE BIT(25) 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci#define ANA_SG_GCL_GS_CONFIG_RSZ 0x4 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci#define ANA_SG_GCL_GS_CONFIG_IPS(x) ((x) & GENMASK(3, 0)) 2638c2ecf20Sopenharmony_ci#define ANA_SG_GCL_GS_CONFIG_IPS_M GENMASK(3, 0) 2648c2ecf20Sopenharmony_ci#define ANA_SG_GCL_GS_CONFIG_GATE_STATE BIT(4) 2658c2ecf20Sopenharmony_ci 2668c2ecf20Sopenharmony_ci#define ANA_SG_GCL_TI_CONFIG_RSZ 0x4 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ci#define ANA_SG_STATUS_REG_3_CFG_CHG_TIME_SEC_MSB(x) ((x) & GENMASK(15, 0)) 2698c2ecf20Sopenharmony_ci#define ANA_SG_STATUS_REG_3_CFG_CHG_TIME_SEC_MSB_M GENMASK(15, 0) 2708c2ecf20Sopenharmony_ci#define ANA_SG_STATUS_REG_3_GATE_STATE BIT(16) 2718c2ecf20Sopenharmony_ci#define ANA_SG_STATUS_REG_3_IPS(x) (((x) << 20) & GENMASK(23, 20)) 2728c2ecf20Sopenharmony_ci#define ANA_SG_STATUS_REG_3_IPS_M GENMASK(23, 20) 2738c2ecf20Sopenharmony_ci#define ANA_SG_STATUS_REG_3_IPS_X(x) (((x) & GENMASK(23, 20)) >> 20) 2748c2ecf20Sopenharmony_ci#define ANA_SG_STATUS_REG_3_CONFIG_PENDING BIT(24) 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_GSZ 0x100 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_VID_AS_ISDX BIT(21) 2798c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_AWARE_ENA BIT(20) 2808c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_POP_CNT(x) (((x) << 18) & GENMASK(19, 18)) 2818c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_POP_CNT_M GENMASK(19, 18) 2828c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_POP_CNT_X(x) (((x) & GENMASK(19, 18)) >> 18) 2838c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_INNER_TAG_ENA BIT(17) 2848c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_TAG_TYPE BIT(16) 2858c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_DEI BIT(15) 2868c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_PCP(x) (((x) << 12) & GENMASK(14, 12)) 2878c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_PCP_M GENMASK(14, 12) 2888c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_PCP_X(x) (((x) & GENMASK(14, 12)) >> 12) 2898c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_VID(x) ((x) & GENMASK(11, 0)) 2908c2ecf20Sopenharmony_ci#define ANA_PORT_VLAN_CFG_VLAN_VID_M GENMASK(11, 0) 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci#define ANA_PORT_DROP_CFG_GSZ 0x100 2938c2ecf20Sopenharmony_ci 2948c2ecf20Sopenharmony_ci#define ANA_PORT_DROP_CFG_DROP_UNTAGGED_ENA BIT(6) 2958c2ecf20Sopenharmony_ci#define ANA_PORT_DROP_CFG_DROP_S_TAGGED_ENA BIT(5) 2968c2ecf20Sopenharmony_ci#define ANA_PORT_DROP_CFG_DROP_C_TAGGED_ENA BIT(4) 2978c2ecf20Sopenharmony_ci#define ANA_PORT_DROP_CFG_DROP_PRIO_S_TAGGED_ENA BIT(3) 2988c2ecf20Sopenharmony_ci#define ANA_PORT_DROP_CFG_DROP_PRIO_C_TAGGED_ENA BIT(2) 2998c2ecf20Sopenharmony_ci#define ANA_PORT_DROP_CFG_DROP_NULL_MAC_ENA BIT(1) 3008c2ecf20Sopenharmony_ci#define ANA_PORT_DROP_CFG_DROP_MC_SMAC_ENA BIT(0) 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_GSZ 0x100 3038c2ecf20Sopenharmony_ci 3048c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_DP_DEFAULT_VAL BIT(8) 3058c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_QOS_DEFAULT_VAL(x) (((x) << 5) & GENMASK(7, 5)) 3068c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_QOS_DEFAULT_VAL_M GENMASK(7, 5) 3078c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_QOS_DEFAULT_VAL_X(x) (((x) & GENMASK(7, 5)) >> 5) 3088c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_QOS_DSCP_ENA BIT(4) 3098c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_QOS_PCP_ENA BIT(3) 3108c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_DSCP_TRANSLATE_ENA BIT(2) 3118c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_DSCP_REWR_CFG(x) ((x) & GENMASK(1, 0)) 3128c2ecf20Sopenharmony_ci#define ANA_PORT_QOS_CFG_DSCP_REWR_CFG_M GENMASK(1, 0) 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_GSZ 0x100 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_S1_ENA BIT(14) 3178c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_S1_DMAC_DIP_ENA(x) (((x) << 11) & GENMASK(13, 11)) 3188c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_S1_DMAC_DIP_ENA_M GENMASK(13, 11) 3198c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_S1_DMAC_DIP_ENA_X(x) (((x) & GENMASK(13, 11)) >> 11) 3208c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_S1_VLAN_INNER_TAG_ENA(x) (((x) << 8) & GENMASK(10, 8)) 3218c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_S1_VLAN_INNER_TAG_ENA_M GENMASK(10, 8) 3228c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_S1_VLAN_INNER_TAG_ENA_X(x) (((x) & GENMASK(10, 8)) >> 8) 3238c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_PAG_VAL(x) ((x) & GENMASK(7, 0)) 3248c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_CFG_PAG_VAL_M GENMASK(7, 0) 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_GSZ 0x100 3278c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_RSZ 0x4 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP6_CFG(x) (((x) << 4) & GENMASK(6, 4)) 3308c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP6_CFG_M GENMASK(6, 4) 3318c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP6_CFG_X(x) (((x) & GENMASK(6, 4)) >> 4) 3328c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP4_CFG(x) (((x) << 2) & GENMASK(3, 2)) 3338c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP4_CFG_M GENMASK(3, 2) 3348c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_IP4_CFG_X(x) (((x) & GENMASK(3, 2)) >> 2) 3358c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_OTHER_CFG(x) ((x) & GENMASK(1, 0)) 3368c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S1_KEY_CFG_S1_KEY_OTHER_CFG_M GENMASK(1, 0) 3378c2ecf20Sopenharmony_ci 3388c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_GSZ 0x100 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_UDP_PAYLOAD_ENA(x) (((x) << 17) & GENMASK(18, 17)) 3418c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_UDP_PAYLOAD_ENA_M GENMASK(18, 17) 3428c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_UDP_PAYLOAD_ENA_X(x) (((x) & GENMASK(18, 17)) >> 17) 3438c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_ETYPE_PAYLOAD_ENA(x) (((x) << 15) & GENMASK(16, 15)) 3448c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_ETYPE_PAYLOAD_ENA_M GENMASK(16, 15) 3458c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_ETYPE_PAYLOAD_ENA_X(x) (((x) & GENMASK(16, 15)) >> 15) 3468c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_ENA BIT(14) 3478c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_SNAP_DIS(x) (((x) << 12) & GENMASK(13, 12)) 3488c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_SNAP_DIS_M GENMASK(13, 12) 3498c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_SNAP_DIS_X(x) (((x) & GENMASK(13, 12)) >> 12) 3508c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_ARP_DIS(x) (((x) << 10) & GENMASK(11, 10)) 3518c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_ARP_DIS_M GENMASK(11, 10) 3528c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_ARP_DIS_X(x) (((x) & GENMASK(11, 10)) >> 10) 3538c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_IP_TCPUDP_DIS(x) (((x) << 8) & GENMASK(9, 8)) 3548c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_IP_TCPUDP_DIS_M GENMASK(9, 8) 3558c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_IP_TCPUDP_DIS_X(x) (((x) & GENMASK(9, 8)) >> 8) 3568c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_IP_OTHER_DIS(x) (((x) << 6) & GENMASK(7, 6)) 3578c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_IP_OTHER_DIS_M GENMASK(7, 6) 3588c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_IP_OTHER_DIS_X(x) (((x) & GENMASK(7, 6)) >> 6) 3598c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_IP6_CFG(x) (((x) << 2) & GENMASK(5, 2)) 3608c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_IP6_CFG_M GENMASK(5, 2) 3618c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_IP6_CFG_X(x) (((x) & GENMASK(5, 2)) >> 2) 3628c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_OAM_DIS(x) ((x) & GENMASK(1, 0)) 3638c2ecf20Sopenharmony_ci#define ANA_PORT_VCAP_S2_CFG_S2_OAM_DIS_M GENMASK(1, 0) 3648c2ecf20Sopenharmony_ci 3658c2ecf20Sopenharmony_ci#define ANA_PORT_PCP_DEI_MAP_GSZ 0x100 3668c2ecf20Sopenharmony_ci#define ANA_PORT_PCP_DEI_MAP_RSZ 0x4 3678c2ecf20Sopenharmony_ci 3688c2ecf20Sopenharmony_ci#define ANA_PORT_PCP_DEI_MAP_DP_PCP_DEI_VAL BIT(3) 3698c2ecf20Sopenharmony_ci#define ANA_PORT_PCP_DEI_MAP_QOS_PCP_DEI_VAL(x) ((x) & GENMASK(2, 0)) 3708c2ecf20Sopenharmony_ci#define ANA_PORT_PCP_DEI_MAP_QOS_PCP_DEI_VAL_M GENMASK(2, 0) 3718c2ecf20Sopenharmony_ci 3728c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CFG_GSZ 0x100 3738c2ecf20Sopenharmony_ci 3748c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CFG_CPU_VRAP_REDIR_ENA BIT(7) 3758c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CFG_CPU_MLD_REDIR_ENA BIT(6) 3768c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CFG_CPU_IGMP_REDIR_ENA BIT(5) 3778c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CFG_CPU_IPMC_CTRL_COPY_ENA BIT(4) 3788c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CFG_CPU_SRC_COPY_ENA BIT(3) 3798c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CFG_CPU_ALLBRIDGE_DROP_ENA BIT(2) 3808c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CFG_CPU_ALLBRIDGE_REDIR_ENA BIT(1) 3818c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CFG_CPU_OAM_ENA BIT(0) 3828c2ecf20Sopenharmony_ci 3838c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_BPDU_CFG_GSZ 0x100 3848c2ecf20Sopenharmony_ci 3858c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_DROP_ENA(x) (((x) << 16) & GENMASK(31, 16)) 3868c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_DROP_ENA_M GENMASK(31, 16) 3878c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_DROP_ENA_X(x) (((x) & GENMASK(31, 16)) >> 16) 3888c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_REDIR_ENA(x) ((x) & GENMASK(15, 0)) 3898c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_BPDU_CFG_BPDU_REDIR_ENA_M GENMASK(15, 0) 3908c2ecf20Sopenharmony_ci 3918c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_GARP_CFG_GSZ 0x100 3928c2ecf20Sopenharmony_ci 3938c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_GARP_CFG_GARP_DROP_ENA(x) (((x) << 16) & GENMASK(31, 16)) 3948c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_GARP_CFG_GARP_DROP_ENA_M GENMASK(31, 16) 3958c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_GARP_CFG_GARP_DROP_ENA_X(x) (((x) & GENMASK(31, 16)) >> 16) 3968c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_GARP_CFG_GARP_REDIR_ENA(x) ((x) & GENMASK(15, 0)) 3978c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_GARP_CFG_GARP_REDIR_ENA_M GENMASK(15, 0) 3988c2ecf20Sopenharmony_ci 3998c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CCM_CFG_GSZ 0x100 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CCM_CFG_CCM_DROP_ENA(x) (((x) << 16) & GENMASK(31, 16)) 4028c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CCM_CFG_CCM_DROP_ENA_M GENMASK(31, 16) 4038c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CCM_CFG_CCM_DROP_ENA_X(x) (((x) & GENMASK(31, 16)) >> 16) 4048c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CCM_CFG_CCM_REDIR_ENA(x) ((x) & GENMASK(15, 0)) 4058c2ecf20Sopenharmony_ci#define ANA_PORT_CPU_FWD_CCM_CFG_CCM_REDIR_ENA_M GENMASK(15, 0) 4068c2ecf20Sopenharmony_ci 4078c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_GSZ 0x100 4088c2ecf20Sopenharmony_ci 4098c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_SRC_MIRROR_ENA BIT(15) 4108c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_LIMIT_DROP BIT(14) 4118c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_LIMIT_CPU BIT(13) 4128c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_LOCKED_PORTMOVE_DROP BIT(12) 4138c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_LOCKED_PORTMOVE_CPU BIT(11) 4148c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_LEARNDROP BIT(10) 4158c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_LEARNCPU BIT(9) 4168c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_LEARNAUTO BIT(8) 4178c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_LEARN_ENA BIT(7) 4188c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_RECV_ENA BIT(6) 4198c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_PORTID_VAL(x) (((x) << 2) & GENMASK(5, 2)) 4208c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_PORTID_VAL_M GENMASK(5, 2) 4218c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_PORTID_VAL_X(x) (((x) & GENMASK(5, 2)) >> 2) 4228c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_USE_B_DOM_TBL BIT(1) 4238c2ecf20Sopenharmony_ci#define ANA_PORT_PORT_CFG_LSR_MODE BIT(0) 4248c2ecf20Sopenharmony_ci 4258c2ecf20Sopenharmony_ci#define ANA_PORT_POL_CFG_GSZ 0x100 4268c2ecf20Sopenharmony_ci 4278c2ecf20Sopenharmony_ci#define ANA_PORT_POL_CFG_POL_CPU_REDIR_8021 BIT(19) 4288c2ecf20Sopenharmony_ci#define ANA_PORT_POL_CFG_POL_CPU_REDIR_IP BIT(18) 4298c2ecf20Sopenharmony_ci#define ANA_PORT_POL_CFG_PORT_POL_ENA BIT(17) 4308c2ecf20Sopenharmony_ci#define ANA_PORT_POL_CFG_QUEUE_POL_ENA(x) (((x) << 9) & GENMASK(16, 9)) 4318c2ecf20Sopenharmony_ci#define ANA_PORT_POL_CFG_QUEUE_POL_ENA_M GENMASK(16, 9) 4328c2ecf20Sopenharmony_ci#define ANA_PORT_POL_CFG_QUEUE_POL_ENA_X(x) (((x) & GENMASK(16, 9)) >> 9) 4338c2ecf20Sopenharmony_ci#define ANA_PORT_POL_CFG_POL_ORDER(x) ((x) & GENMASK(8, 0)) 4348c2ecf20Sopenharmony_ci#define ANA_PORT_POL_CFG_POL_ORDER_M GENMASK(8, 0) 4358c2ecf20Sopenharmony_ci 4368c2ecf20Sopenharmony_ci#define ANA_PORT_PTP_CFG_GSZ 0x100 4378c2ecf20Sopenharmony_ci 4388c2ecf20Sopenharmony_ci#define ANA_PORT_PTP_CFG_PTP_BACKPLANE_MODE BIT(0) 4398c2ecf20Sopenharmony_ci 4408c2ecf20Sopenharmony_ci#define ANA_PORT_PTP_DLY1_CFG_GSZ 0x100 4418c2ecf20Sopenharmony_ci 4428c2ecf20Sopenharmony_ci#define ANA_PORT_PTP_DLY2_CFG_GSZ 0x100 4438c2ecf20Sopenharmony_ci 4448c2ecf20Sopenharmony_ci#define ANA_PORT_SFID_CFG_GSZ 0x100 4458c2ecf20Sopenharmony_ci#define ANA_PORT_SFID_CFG_RSZ 0x4 4468c2ecf20Sopenharmony_ci 4478c2ecf20Sopenharmony_ci#define ANA_PORT_SFID_CFG_SFID_VALID BIT(8) 4488c2ecf20Sopenharmony_ci#define ANA_PORT_SFID_CFG_SFID(x) ((x) & GENMASK(7, 0)) 4498c2ecf20Sopenharmony_ci#define ANA_PORT_SFID_CFG_SFID_M GENMASK(7, 0) 4508c2ecf20Sopenharmony_ci 4518c2ecf20Sopenharmony_ci#define ANA_PFC_PFC_CFG_GSZ 0x40 4528c2ecf20Sopenharmony_ci 4538c2ecf20Sopenharmony_ci#define ANA_PFC_PFC_CFG_RX_PFC_ENA(x) (((x) << 2) & GENMASK(9, 2)) 4548c2ecf20Sopenharmony_ci#define ANA_PFC_PFC_CFG_RX_PFC_ENA_M GENMASK(9, 2) 4558c2ecf20Sopenharmony_ci#define ANA_PFC_PFC_CFG_RX_PFC_ENA_X(x) (((x) & GENMASK(9, 2)) >> 2) 4568c2ecf20Sopenharmony_ci#define ANA_PFC_PFC_CFG_FC_LINK_SPEED(x) ((x) & GENMASK(1, 0)) 4578c2ecf20Sopenharmony_ci#define ANA_PFC_PFC_CFG_FC_LINK_SPEED_M GENMASK(1, 0) 4588c2ecf20Sopenharmony_ci 4598c2ecf20Sopenharmony_ci#define ANA_PFC_PFC_TIMER_GSZ 0x40 4608c2ecf20Sopenharmony_ci#define ANA_PFC_PFC_TIMER_RSZ 0x4 4618c2ecf20Sopenharmony_ci 4628c2ecf20Sopenharmony_ci#define ANA_IPT_OAM_MEP_CFG_GSZ 0x8 4638c2ecf20Sopenharmony_ci 4648c2ecf20Sopenharmony_ci#define ANA_IPT_OAM_MEP_CFG_MEP_IDX_P(x) (((x) << 6) & GENMASK(10, 6)) 4658c2ecf20Sopenharmony_ci#define ANA_IPT_OAM_MEP_CFG_MEP_IDX_P_M GENMASK(10, 6) 4668c2ecf20Sopenharmony_ci#define ANA_IPT_OAM_MEP_CFG_MEP_IDX_P_X(x) (((x) & GENMASK(10, 6)) >> 6) 4678c2ecf20Sopenharmony_ci#define ANA_IPT_OAM_MEP_CFG_MEP_IDX(x) (((x) << 1) & GENMASK(5, 1)) 4688c2ecf20Sopenharmony_ci#define ANA_IPT_OAM_MEP_CFG_MEP_IDX_M GENMASK(5, 1) 4698c2ecf20Sopenharmony_ci#define ANA_IPT_OAM_MEP_CFG_MEP_IDX_X(x) (((x) & GENMASK(5, 1)) >> 1) 4708c2ecf20Sopenharmony_ci#define ANA_IPT_OAM_MEP_CFG_MEP_IDX_ENA BIT(0) 4718c2ecf20Sopenharmony_ci 4728c2ecf20Sopenharmony_ci#define ANA_IPT_IPT_GSZ 0x8 4738c2ecf20Sopenharmony_ci 4748c2ecf20Sopenharmony_ci#define ANA_IPT_IPT_IPT_CFG(x) (((x) << 15) & GENMASK(16, 15)) 4758c2ecf20Sopenharmony_ci#define ANA_IPT_IPT_IPT_CFG_M GENMASK(16, 15) 4768c2ecf20Sopenharmony_ci#define ANA_IPT_IPT_IPT_CFG_X(x) (((x) & GENMASK(16, 15)) >> 15) 4778c2ecf20Sopenharmony_ci#define ANA_IPT_IPT_ISDX_P(x) (((x) << 7) & GENMASK(14, 7)) 4788c2ecf20Sopenharmony_ci#define ANA_IPT_IPT_ISDX_P_M GENMASK(14, 7) 4798c2ecf20Sopenharmony_ci#define ANA_IPT_IPT_ISDX_P_X(x) (((x) & GENMASK(14, 7)) >> 7) 4808c2ecf20Sopenharmony_ci#define ANA_IPT_IPT_PPT_IDX(x) ((x) & GENMASK(6, 0)) 4818c2ecf20Sopenharmony_ci#define ANA_IPT_IPT_PPT_IDX_M GENMASK(6, 0) 4828c2ecf20Sopenharmony_ci 4838c2ecf20Sopenharmony_ci#define ANA_PPT_PPT_RSZ 0x4 4848c2ecf20Sopenharmony_ci 4858c2ecf20Sopenharmony_ci#define ANA_FID_MAP_FID_MAP_RSZ 0x4 4868c2ecf20Sopenharmony_ci 4878c2ecf20Sopenharmony_ci#define ANA_FID_MAP_FID_MAP_FID_C_VAL(x) (((x) << 6) & GENMASK(11, 6)) 4888c2ecf20Sopenharmony_ci#define ANA_FID_MAP_FID_MAP_FID_C_VAL_M GENMASK(11, 6) 4898c2ecf20Sopenharmony_ci#define ANA_FID_MAP_FID_MAP_FID_C_VAL_X(x) (((x) & GENMASK(11, 6)) >> 6) 4908c2ecf20Sopenharmony_ci#define ANA_FID_MAP_FID_MAP_FID_B_VAL(x) ((x) & GENMASK(5, 0)) 4918c2ecf20Sopenharmony_ci#define ANA_FID_MAP_FID_MAP_FID_B_VAL_M GENMASK(5, 0) 4928c2ecf20Sopenharmony_ci 4938c2ecf20Sopenharmony_ci#define ANA_AGGR_CFG_AC_RND_ENA BIT(7) 4948c2ecf20Sopenharmony_ci#define ANA_AGGR_CFG_AC_DMAC_ENA BIT(6) 4958c2ecf20Sopenharmony_ci#define ANA_AGGR_CFG_AC_SMAC_ENA BIT(5) 4968c2ecf20Sopenharmony_ci#define ANA_AGGR_CFG_AC_IP6_FLOW_LBL_ENA BIT(4) 4978c2ecf20Sopenharmony_ci#define ANA_AGGR_CFG_AC_IP6_TCPUDP_ENA BIT(3) 4988c2ecf20Sopenharmony_ci#define ANA_AGGR_CFG_AC_IP4_SIPDIP_ENA BIT(2) 4998c2ecf20Sopenharmony_ci#define ANA_AGGR_CFG_AC_IP4_TCPUDP_ENA BIT(1) 5008c2ecf20Sopenharmony_ci#define ANA_AGGR_CFG_AC_ISDX_ENA BIT(0) 5018c2ecf20Sopenharmony_ci 5028c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_MLD(x) (((x) << 27) & GENMASK(29, 27)) 5038c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_MLD_M GENMASK(29, 27) 5048c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_MLD_X(x) (((x) & GENMASK(29, 27)) >> 27) 5058c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_IGMP(x) (((x) << 24) & GENMASK(26, 24)) 5068c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_IGMP_M GENMASK(26, 24) 5078c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_IGMP_X(x) (((x) & GENMASK(26, 24)) >> 24) 5088c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_IPMC_CTRL(x) (((x) << 21) & GENMASK(23, 21)) 5098c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_IPMC_CTRL_M GENMASK(23, 21) 5108c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_IPMC_CTRL_X(x) (((x) & GENMASK(23, 21)) >> 21) 5118c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_ALLBRIDGE(x) (((x) << 18) & GENMASK(20, 18)) 5128c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_ALLBRIDGE_M GENMASK(20, 18) 5138c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_ALLBRIDGE_X(x) (((x) & GENMASK(20, 18)) >> 18) 5148c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_LOCKED_PORTMOVE(x) (((x) << 15) & GENMASK(17, 15)) 5158c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_LOCKED_PORTMOVE_M GENMASK(17, 15) 5168c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_LOCKED_PORTMOVE_X(x) (((x) & GENMASK(17, 15)) >> 15) 5178c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_SRC_COPY(x) (((x) << 12) & GENMASK(14, 12)) 5188c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_SRC_COPY_M GENMASK(14, 12) 5198c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_SRC_COPY_X(x) (((x) & GENMASK(14, 12)) >> 12) 5208c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_MAC_COPY(x) (((x) << 9) & GENMASK(11, 9)) 5218c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_MAC_COPY_M GENMASK(11, 9) 5228c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_MAC_COPY_X(x) (((x) & GENMASK(11, 9)) >> 9) 5238c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_LRN(x) (((x) << 6) & GENMASK(8, 6)) 5248c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_LRN_M GENMASK(8, 6) 5258c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_LRN_X(x) (((x) & GENMASK(8, 6)) >> 6) 5268c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_MIRROR(x) (((x) << 3) & GENMASK(5, 3)) 5278c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_MIRROR_M GENMASK(5, 3) 5288c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_MIRROR_X(x) (((x) & GENMASK(5, 3)) >> 3) 5298c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_SFLOW(x) ((x) & GENMASK(2, 0)) 5308c2ecf20Sopenharmony_ci#define ANA_CPUQ_CFG_CPUQ_SFLOW_M GENMASK(2, 0) 5318c2ecf20Sopenharmony_ci 5328c2ecf20Sopenharmony_ci#define ANA_CPUQ_8021_CFG_RSZ 0x4 5338c2ecf20Sopenharmony_ci 5348c2ecf20Sopenharmony_ci#define ANA_CPUQ_8021_CFG_CPUQ_BPDU_VAL(x) (((x) << 6) & GENMASK(8, 6)) 5358c2ecf20Sopenharmony_ci#define ANA_CPUQ_8021_CFG_CPUQ_BPDU_VAL_M GENMASK(8, 6) 5368c2ecf20Sopenharmony_ci#define ANA_CPUQ_8021_CFG_CPUQ_BPDU_VAL_X(x) (((x) & GENMASK(8, 6)) >> 6) 5378c2ecf20Sopenharmony_ci#define ANA_CPUQ_8021_CFG_CPUQ_GARP_VAL(x) (((x) << 3) & GENMASK(5, 3)) 5388c2ecf20Sopenharmony_ci#define ANA_CPUQ_8021_CFG_CPUQ_GARP_VAL_M GENMASK(5, 3) 5398c2ecf20Sopenharmony_ci#define ANA_CPUQ_8021_CFG_CPUQ_GARP_VAL_X(x) (((x) & GENMASK(5, 3)) >> 3) 5408c2ecf20Sopenharmony_ci#define ANA_CPUQ_8021_CFG_CPUQ_CCM_VAL(x) ((x) & GENMASK(2, 0)) 5418c2ecf20Sopenharmony_ci#define ANA_CPUQ_8021_CFG_CPUQ_CCM_VAL_M GENMASK(2, 0) 5428c2ecf20Sopenharmony_ci 5438c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_RSZ 0x4 5448c2ecf20Sopenharmony_ci 5458c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_DP_DSCP_VAL BIT(11) 5468c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_QOS_DSCP_VAL(x) (((x) << 8) & GENMASK(10, 8)) 5478c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_QOS_DSCP_VAL_M GENMASK(10, 8) 5488c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_QOS_DSCP_VAL_X(x) (((x) & GENMASK(10, 8)) >> 8) 5498c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_DSCP_TRANSLATE_VAL(x) (((x) << 2) & GENMASK(7, 2)) 5508c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_DSCP_TRANSLATE_VAL_M GENMASK(7, 2) 5518c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_DSCP_TRANSLATE_VAL_X(x) (((x) & GENMASK(7, 2)) >> 2) 5528c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_DSCP_TRUST_ENA BIT(1) 5538c2ecf20Sopenharmony_ci#define ANA_DSCP_CFG_DSCP_REWR_ENA BIT(0) 5548c2ecf20Sopenharmony_ci 5558c2ecf20Sopenharmony_ci#define ANA_DSCP_REWR_CFG_RSZ 0x4 5568c2ecf20Sopenharmony_ci 5578c2ecf20Sopenharmony_ci#define ANA_VCAP_RNG_TYPE_CFG_RSZ 0x4 5588c2ecf20Sopenharmony_ci 5598c2ecf20Sopenharmony_ci#define ANA_VCAP_RNG_VAL_CFG_RSZ 0x4 5608c2ecf20Sopenharmony_ci 5618c2ecf20Sopenharmony_ci#define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MIN_VAL(x) (((x) << 16) & GENMASK(31, 16)) 5628c2ecf20Sopenharmony_ci#define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MIN_VAL_M GENMASK(31, 16) 5638c2ecf20Sopenharmony_ci#define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MIN_VAL_X(x) (((x) & GENMASK(31, 16)) >> 16) 5648c2ecf20Sopenharmony_ci#define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MAX_VAL(x) ((x) & GENMASK(15, 0)) 5658c2ecf20Sopenharmony_ci#define ANA_VCAP_RNG_VAL_CFG_VCAP_RNG_MAX_VAL_M GENMASK(15, 0) 5668c2ecf20Sopenharmony_ci 5678c2ecf20Sopenharmony_ci#define ANA_VRAP_CFG_VRAP_VLAN_AWARE_ENA BIT(12) 5688c2ecf20Sopenharmony_ci#define ANA_VRAP_CFG_VRAP_VID(x) ((x) & GENMASK(11, 0)) 5698c2ecf20Sopenharmony_ci#define ANA_VRAP_CFG_VRAP_VID_M GENMASK(11, 0) 5708c2ecf20Sopenharmony_ci 5718c2ecf20Sopenharmony_ci#define ANA_DISCARD_CFG_DROP_TAGGING_ISDX0 BIT(3) 5728c2ecf20Sopenharmony_ci#define ANA_DISCARD_CFG_DROP_CTRLPROT_ISDX0 BIT(2) 5738c2ecf20Sopenharmony_ci#define ANA_DISCARD_CFG_DROP_TAGGING_S2_ENA BIT(1) 5748c2ecf20Sopenharmony_ci#define ANA_DISCARD_CFG_DROP_CTRLPROT_S2_ENA BIT(0) 5758c2ecf20Sopenharmony_ci 5768c2ecf20Sopenharmony_ci#define ANA_FID_CFG_VID_MC_ENA BIT(0) 5778c2ecf20Sopenharmony_ci 5788c2ecf20Sopenharmony_ci#define ANA_POL_PIR_CFG_GSZ 0x20 5798c2ecf20Sopenharmony_ci 5808c2ecf20Sopenharmony_ci#define ANA_POL_PIR_CFG_PIR_RATE(x) (((x) << 6) & GENMASK(20, 6)) 5818c2ecf20Sopenharmony_ci#define ANA_POL_PIR_CFG_PIR_RATE_M GENMASK(20, 6) 5828c2ecf20Sopenharmony_ci#define ANA_POL_PIR_CFG_PIR_RATE_X(x) (((x) & GENMASK(20, 6)) >> 6) 5838c2ecf20Sopenharmony_ci#define ANA_POL_PIR_CFG_PIR_BURST(x) ((x) & GENMASK(5, 0)) 5848c2ecf20Sopenharmony_ci#define ANA_POL_PIR_CFG_PIR_BURST_M GENMASK(5, 0) 5858c2ecf20Sopenharmony_ci 5868c2ecf20Sopenharmony_ci#define ANA_POL_CIR_CFG_GSZ 0x20 5878c2ecf20Sopenharmony_ci 5888c2ecf20Sopenharmony_ci#define ANA_POL_CIR_CFG_CIR_RATE(x) (((x) << 6) & GENMASK(20, 6)) 5898c2ecf20Sopenharmony_ci#define ANA_POL_CIR_CFG_CIR_RATE_M GENMASK(20, 6) 5908c2ecf20Sopenharmony_ci#define ANA_POL_CIR_CFG_CIR_RATE_X(x) (((x) & GENMASK(20, 6)) >> 6) 5918c2ecf20Sopenharmony_ci#define ANA_POL_CIR_CFG_CIR_BURST(x) ((x) & GENMASK(5, 0)) 5928c2ecf20Sopenharmony_ci#define ANA_POL_CIR_CFG_CIR_BURST_M GENMASK(5, 0) 5938c2ecf20Sopenharmony_ci 5948c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_GSZ 0x20 5958c2ecf20Sopenharmony_ci 5968c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_IPG_SIZE(x) (((x) << 5) & GENMASK(9, 5)) 5978c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_IPG_SIZE_M GENMASK(9, 5) 5988c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_IPG_SIZE_X(x) (((x) & GENMASK(9, 5)) >> 5) 5998c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_FRM_MODE(x) (((x) << 3) & GENMASK(4, 3)) 6008c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_FRM_MODE_M GENMASK(4, 3) 6018c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_FRM_MODE_X(x) (((x) & GENMASK(4, 3)) >> 3) 6028c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_DLB_COUPLED BIT(2) 6038c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_CIR_ENA BIT(1) 6048c2ecf20Sopenharmony_ci#define ANA_POL_MODE_CFG_OVERSHOOT_ENA BIT(0) 6058c2ecf20Sopenharmony_ci 6068c2ecf20Sopenharmony_ci#define ANA_POL_PIR_STATE_GSZ 0x20 6078c2ecf20Sopenharmony_ci 6088c2ecf20Sopenharmony_ci#define ANA_POL_CIR_STATE_GSZ 0x20 6098c2ecf20Sopenharmony_ci 6108c2ecf20Sopenharmony_ci#define ANA_POL_STATE_GSZ 0x20 6118c2ecf20Sopenharmony_ci 6128c2ecf20Sopenharmony_ci#define ANA_POL_FLOWC_RSZ 0x4 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ci#define ANA_POL_FLOWC_POL_FLOWC BIT(0) 6158c2ecf20Sopenharmony_ci 6168c2ecf20Sopenharmony_ci#define ANA_POL_HYST_POL_FC_HYST(x) (((x) << 4) & GENMASK(9, 4)) 6178c2ecf20Sopenharmony_ci#define ANA_POL_HYST_POL_FC_HYST_M GENMASK(9, 4) 6188c2ecf20Sopenharmony_ci#define ANA_POL_HYST_POL_FC_HYST_X(x) (((x) & GENMASK(9, 4)) >> 4) 6198c2ecf20Sopenharmony_ci#define ANA_POL_HYST_POL_STOP_HYST(x) ((x) & GENMASK(3, 0)) 6208c2ecf20Sopenharmony_ci#define ANA_POL_HYST_POL_STOP_HYST_M GENMASK(3, 0) 6218c2ecf20Sopenharmony_ci 6228c2ecf20Sopenharmony_ci#define ANA_POL_MISC_CFG_POL_CLOSE_ALL BIT(1) 6238c2ecf20Sopenharmony_ci#define ANA_POL_MISC_CFG_POL_LEAK_DIS BIT(0) 6248c2ecf20Sopenharmony_ci 6258c2ecf20Sopenharmony_ci#endif 626