162306a36Sopenharmony_ci/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Microsemi Ocelot Switch driver 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2017 Microsemi Corporation 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef _MSCC_OCELOT_QSYS_H_ 962306a36Sopenharmony_ci#define _MSCC_OCELOT_QSYS_H_ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define QSYS_PORT_MODE_RSZ 0x4 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#define QSYS_PORT_MODE_DEQUEUE_DIS BIT(1) 1462306a36Sopenharmony_ci#define QSYS_PORT_MODE_DEQUEUE_LATE BIT(0) 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#define QSYS_STAT_CNT_CFG_TX_GREEN_CNT_MODE BIT(5) 1762306a36Sopenharmony_ci#define QSYS_STAT_CNT_CFG_TX_YELLOW_CNT_MODE BIT(4) 1862306a36Sopenharmony_ci#define QSYS_STAT_CNT_CFG_DROP_GREEN_CNT_MODE BIT(3) 1962306a36Sopenharmony_ci#define QSYS_STAT_CNT_CFG_DROP_YELLOW_CNT_MODE BIT(2) 2062306a36Sopenharmony_ci#define QSYS_STAT_CNT_CFG_DROP_COUNT_ONCE BIT(1) 2162306a36Sopenharmony_ci#define QSYS_STAT_CNT_CFG_DROP_COUNT_EGRESS BIT(0) 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci#define QSYS_EEE_CFG_RSZ 0x4 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define QSYS_EEE_THRES_EEE_HIGH_BYTES(x) (((x) << 8) & GENMASK(15, 8)) 2662306a36Sopenharmony_ci#define QSYS_EEE_THRES_EEE_HIGH_BYTES_M GENMASK(15, 8) 2762306a36Sopenharmony_ci#define QSYS_EEE_THRES_EEE_HIGH_BYTES_X(x) (((x) & GENMASK(15, 8)) >> 8) 2862306a36Sopenharmony_ci#define QSYS_EEE_THRES_EEE_HIGH_FRAMES(x) ((x) & GENMASK(7, 0)) 2962306a36Sopenharmony_ci#define QSYS_EEE_THRES_EEE_HIGH_FRAMES_M GENMASK(7, 0) 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#define QSYS_SW_STATUS_RSZ 0x4 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#define QSYS_EXT_CPU_CFG_EXT_CPU_PORT(x) (((x) << 8) & GENMASK(12, 8)) 3462306a36Sopenharmony_ci#define QSYS_EXT_CPU_CFG_EXT_CPU_PORT_M GENMASK(12, 8) 3562306a36Sopenharmony_ci#define QSYS_EXT_CPU_CFG_EXT_CPU_PORT_X(x) (((x) & GENMASK(12, 8)) >> 8) 3662306a36Sopenharmony_ci#define QSYS_EXT_CPU_CFG_EXT_CPUQ_MSK(x) ((x) & GENMASK(7, 0)) 3762306a36Sopenharmony_ci#define QSYS_EXT_CPU_CFG_EXT_CPUQ_MSK_M GENMASK(7, 0) 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#define QSYS_QMAP_GSZ 0x4 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci#define QSYS_QMAP_SE_BASE(x) (((x) << 5) & GENMASK(12, 5)) 4262306a36Sopenharmony_ci#define QSYS_QMAP_SE_BASE_M GENMASK(12, 5) 4362306a36Sopenharmony_ci#define QSYS_QMAP_SE_BASE_X(x) (((x) & GENMASK(12, 5)) >> 5) 4462306a36Sopenharmony_ci#define QSYS_QMAP_SE_IDX_SEL(x) (((x) << 2) & GENMASK(4, 2)) 4562306a36Sopenharmony_ci#define QSYS_QMAP_SE_IDX_SEL_M GENMASK(4, 2) 4662306a36Sopenharmony_ci#define QSYS_QMAP_SE_IDX_SEL_X(x) (((x) & GENMASK(4, 2)) >> 2) 4762306a36Sopenharmony_ci#define QSYS_QMAP_SE_INP_SEL(x) ((x) & GENMASK(1, 0)) 4862306a36Sopenharmony_ci#define QSYS_QMAP_SE_INP_SEL_M GENMASK(1, 0) 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci#define QSYS_ISDX_SGRP_GSZ 0x4 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci#define QSYS_TIMED_FRAME_ENTRY_GSZ 0x4 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci#define QSYS_TFRM_MISC_TIMED_CANCEL_SLOT(x) (((x) << 9) & GENMASK(18, 9)) 5562306a36Sopenharmony_ci#define QSYS_TFRM_MISC_TIMED_CANCEL_SLOT_M GENMASK(18, 9) 5662306a36Sopenharmony_ci#define QSYS_TFRM_MISC_TIMED_CANCEL_SLOT_X(x) (((x) & GENMASK(18, 9)) >> 9) 5762306a36Sopenharmony_ci#define QSYS_TFRM_MISC_TIMED_CANCEL_1SHOT BIT(8) 5862306a36Sopenharmony_ci#define QSYS_TFRM_MISC_TIMED_SLOT_MODE_MC BIT(7) 5962306a36Sopenharmony_ci#define QSYS_TFRM_MISC_TIMED_ENTRY_FAST_CNT(x) ((x) & GENMASK(6, 0)) 6062306a36Sopenharmony_ci#define QSYS_TFRM_MISC_TIMED_ENTRY_FAST_CNT_M GENMASK(6, 0) 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#define QSYS_RED_PROFILE_RSZ 0x4 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#define QSYS_RED_PROFILE_WM_RED_LOW(x) (((x) << 8) & GENMASK(15, 8)) 6562306a36Sopenharmony_ci#define QSYS_RED_PROFILE_WM_RED_LOW_M GENMASK(15, 8) 6662306a36Sopenharmony_ci#define QSYS_RED_PROFILE_WM_RED_LOW_X(x) (((x) & GENMASK(15, 8)) >> 8) 6762306a36Sopenharmony_ci#define QSYS_RED_PROFILE_WM_RED_HIGH(x) ((x) & GENMASK(7, 0)) 6862306a36Sopenharmony_ci#define QSYS_RED_PROFILE_WM_RED_HIGH_M GENMASK(7, 0) 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci#define QSYS_RES_CFG_GSZ 0x8 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci#define QSYS_RES_STAT_GSZ 0x8 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci#define QSYS_MMGT_EQ_CTRL_FP_FREE_CNT(x) ((x) & GENMASK(15, 0)) 7562306a36Sopenharmony_ci#define QSYS_MMGT_EQ_CTRL_FP_FREE_CNT_M GENMASK(15, 0) 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci#define QSYS_EVENTS_CORE_EV_FDC(x) (((x) << 2) & GENMASK(4, 2)) 7862306a36Sopenharmony_ci#define QSYS_EVENTS_CORE_EV_FDC_M GENMASK(4, 2) 7962306a36Sopenharmony_ci#define QSYS_EVENTS_CORE_EV_FDC_X(x) (((x) & GENMASK(4, 2)) >> 2) 8062306a36Sopenharmony_ci#define QSYS_EVENTS_CORE_EV_FRD(x) ((x) & GENMASK(1, 0)) 8162306a36Sopenharmony_ci#define QSYS_EVENTS_CORE_EV_FRD_M GENMASK(1, 0) 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_ci#define QSYS_QMAXSDU_CFG_0_RSZ 0x4 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci#define QSYS_QMAXSDU_CFG_1_RSZ 0x4 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci#define QSYS_QMAXSDU_CFG_2_RSZ 0x4 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci#define QSYS_QMAXSDU_CFG_3_RSZ 0x4 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci#define QSYS_QMAXSDU_CFG_4_RSZ 0x4 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci#define QSYS_QMAXSDU_CFG_5_RSZ 0x4 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci#define QSYS_QMAXSDU_CFG_6_RSZ 0x4 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci#define QSYS_QMAXSDU_CFG_7_RSZ 0x4 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_RSZ 0x4 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_P_QUEUES(x) ((x) & GENMASK(7, 0)) 10262306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_P_QUEUES_M GENMASK(7, 0) 10362306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_MM_ADD_FRAG_SIZE(x) (((x) << 8) & GENMASK(9, 8)) 10462306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_MM_ADD_FRAG_SIZE_M GENMASK(9, 8) 10562306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_MM_ADD_FRAG_SIZE_X(x) (((x) & GENMASK(9, 8)) >> 8) 10662306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_STRICT_IPG(x) (((x) << 12) & GENMASK(13, 12)) 10762306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_STRICT_IPG_M GENMASK(13, 12) 10862306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_STRICT_IPG_X(x) (((x) & GENMASK(13, 12)) >> 12) 10962306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_HOLD_ADVANCE(x) (((x) << 16) & GENMASK(31, 16)) 11062306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_HOLD_ADVANCE_M GENMASK(31, 16) 11162306a36Sopenharmony_ci#define QSYS_PREEMPTION_CFG_HOLD_ADVANCE_X(x) (((x) & GENMASK(31, 16)) >> 16) 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci#define QSYS_CIR_CFG_GSZ 0x80 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_ci#define QSYS_CIR_CFG_CIR_RATE(x) (((x) << 6) & GENMASK(20, 6)) 11662306a36Sopenharmony_ci#define QSYS_CIR_CFG_CIR_RATE_M GENMASK(20, 6) 11762306a36Sopenharmony_ci#define QSYS_CIR_CFG_CIR_RATE_X(x) (((x) & GENMASK(20, 6)) >> 6) 11862306a36Sopenharmony_ci#define QSYS_CIR_CFG_CIR_BURST(x) ((x) & GENMASK(5, 0)) 11962306a36Sopenharmony_ci#define QSYS_CIR_CFG_CIR_BURST_M GENMASK(5, 0) 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci#define QSYS_EIR_CFG_GSZ 0x80 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#define QSYS_EIR_CFG_EIR_RATE(x) (((x) << 7) & GENMASK(21, 7)) 12462306a36Sopenharmony_ci#define QSYS_EIR_CFG_EIR_RATE_M GENMASK(21, 7) 12562306a36Sopenharmony_ci#define QSYS_EIR_CFG_EIR_RATE_X(x) (((x) & GENMASK(21, 7)) >> 7) 12662306a36Sopenharmony_ci#define QSYS_EIR_CFG_EIR_BURST(x) (((x) << 1) & GENMASK(6, 1)) 12762306a36Sopenharmony_ci#define QSYS_EIR_CFG_EIR_BURST_M GENMASK(6, 1) 12862306a36Sopenharmony_ci#define QSYS_EIR_CFG_EIR_BURST_X(x) (((x) & GENMASK(6, 1)) >> 1) 12962306a36Sopenharmony_ci#define QSYS_EIR_CFG_EIR_MARK_ENA BIT(0) 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci#define QSYS_SE_CFG_GSZ 0x80 13262306a36Sopenharmony_ci 13362306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_DWRR_CNT(x) (((x) << 6) & GENMASK(9, 6)) 13462306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_DWRR_CNT_M GENMASK(9, 6) 13562306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_DWRR_CNT_X(x) (((x) & GENMASK(9, 6)) >> 6) 13662306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_RR_ENA BIT(5) 13762306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_AVB_ENA BIT(4) 13862306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_FRM_MODE(x) (((x) << 2) & GENMASK(3, 2)) 13962306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_FRM_MODE_M GENMASK(3, 2) 14062306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_FRM_MODE_X(x) (((x) & GENMASK(3, 2)) >> 2) 14162306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_EXC_ENA BIT(1) 14262306a36Sopenharmony_ci#define QSYS_SE_CFG_SE_EXC_FWD BIT(0) 14362306a36Sopenharmony_ci 14462306a36Sopenharmony_ci#define QSYS_SE_DWRR_CFG_GSZ 0x80 14562306a36Sopenharmony_ci#define QSYS_SE_DWRR_CFG_RSZ 0x4 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci#define QSYS_SE_CONNECT_GSZ 0x80 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_OUTP_IDX(x) (((x) << 17) & GENMASK(24, 17)) 15062306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_OUTP_IDX_M GENMASK(24, 17) 15162306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_OUTP_IDX_X(x) (((x) & GENMASK(24, 17)) >> 17) 15262306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_INP_IDX(x) (((x) << 9) & GENMASK(16, 9)) 15362306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_INP_IDX_M GENMASK(16, 9) 15462306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_INP_IDX_X(x) (((x) & GENMASK(16, 9)) >> 9) 15562306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_OUTP_CON(x) (((x) << 5) & GENMASK(8, 5)) 15662306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_OUTP_CON_M GENMASK(8, 5) 15762306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_OUTP_CON_X(x) (((x) & GENMASK(8, 5)) >> 5) 15862306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_INP_CNT(x) (((x) << 1) & GENMASK(4, 1)) 15962306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_INP_CNT_M GENMASK(4, 1) 16062306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_INP_CNT_X(x) (((x) & GENMASK(4, 1)) >> 1) 16162306a36Sopenharmony_ci#define QSYS_SE_CONNECT_SE_TERMINAL BIT(0) 16262306a36Sopenharmony_ci 16362306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_GSZ 0x80 16462306a36Sopenharmony_ci 16562306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_PRIO(x) (((x) << 11) & GENMASK(13, 11)) 16662306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_PRIO_M GENMASK(13, 11) 16762306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_PRIO_X(x) (((x) & GENMASK(13, 11)) >> 11) 16862306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_SPORT(x) (((x) << 7) & GENMASK(10, 7)) 16962306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_SPORT_M GENMASK(10, 7) 17062306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_SPORT_X(x) (((x) & GENMASK(10, 7)) >> 7) 17162306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_DPORT(x) (((x) << 3) & GENMASK(6, 3)) 17262306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_DPORT_M GENMASK(6, 3) 17362306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_DPORT_X(x) (((x) & GENMASK(6, 3)) >> 3) 17462306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_PRIO_ENA BIT(2) 17562306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_SPORT_ENA BIT(1) 17662306a36Sopenharmony_ci#define QSYS_SE_DLB_SENSE_SE_DLB_DPORT_ENA BIT(0) 17762306a36Sopenharmony_ci 17862306a36Sopenharmony_ci#define QSYS_CIR_STATE_GSZ 0x80 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_ci#define QSYS_CIR_STATE_CIR_LVL(x) (((x) << 4) & GENMASK(25, 4)) 18162306a36Sopenharmony_ci#define QSYS_CIR_STATE_CIR_LVL_M GENMASK(25, 4) 18262306a36Sopenharmony_ci#define QSYS_CIR_STATE_CIR_LVL_X(x) (((x) & GENMASK(25, 4)) >> 4) 18362306a36Sopenharmony_ci#define QSYS_CIR_STATE_SHP_TIME(x) ((x) & GENMASK(3, 0)) 18462306a36Sopenharmony_ci#define QSYS_CIR_STATE_SHP_TIME_M GENMASK(3, 0) 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_ci#define QSYS_EIR_STATE_GSZ 0x80 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_ci#define QSYS_SE_STATE_GSZ 0x80 18962306a36Sopenharmony_ci 19062306a36Sopenharmony_ci#define QSYS_SE_STATE_SE_OUTP_LVL(x) (((x) << 1) & GENMASK(2, 1)) 19162306a36Sopenharmony_ci#define QSYS_SE_STATE_SE_OUTP_LVL_M GENMASK(2, 1) 19262306a36Sopenharmony_ci#define QSYS_SE_STATE_SE_OUTP_LVL_X(x) (((x) & GENMASK(2, 1)) >> 1) 19362306a36Sopenharmony_ci#define QSYS_SE_STATE_SE_WAS_YEL BIT(0) 19462306a36Sopenharmony_ci 19562306a36Sopenharmony_ci#define QSYS_HSCH_MISC_CFG_SE_CONNECT_VLD BIT(8) 19662306a36Sopenharmony_ci#define QSYS_HSCH_MISC_CFG_FRM_ADJ(x) (((x) << 3) & GENMASK(7, 3)) 19762306a36Sopenharmony_ci#define QSYS_HSCH_MISC_CFG_FRM_ADJ_M GENMASK(7, 3) 19862306a36Sopenharmony_ci#define QSYS_HSCH_MISC_CFG_FRM_ADJ_X(x) (((x) & GENMASK(7, 3)) >> 3) 19962306a36Sopenharmony_ci#define QSYS_HSCH_MISC_CFG_LEAK_DIS BIT(2) 20062306a36Sopenharmony_ci#define QSYS_HSCH_MISC_CFG_QSHP_EXC_ENA BIT(1) 20162306a36Sopenharmony_ci#define QSYS_HSCH_MISC_CFG_PFC_BYP_UPD BIT(0) 20262306a36Sopenharmony_ci 20362306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_RSZ 0x4 20462306a36Sopenharmony_ci 20562306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_ENABLE BIT(0) 20662306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_LINK_SPEED(x) (((x) << 4) & GENMASK(5, 4)) 20762306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_LINK_SPEED_M GENMASK(5, 4) 20862306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_LINK_SPEED_X(x) (((x) & GENMASK(5, 4)) >> 4) 20962306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_INIT_GATE_STATE(x) (((x) << 8) & GENMASK(15, 8)) 21062306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_INIT_GATE_STATE_M GENMASK(15, 8) 21162306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_INIT_GATE_STATE_X(x) (((x) & GENMASK(15, 8)) >> 8) 21262306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_SCH_TRAFFIC_QUEUES(x) (((x) << 16) & GENMASK(23, 16)) 21362306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_SCH_TRAFFIC_QUEUES_M GENMASK(23, 16) 21462306a36Sopenharmony_ci#define QSYS_TAG_CONFIG_SCH_TRAFFIC_QUEUES_X(x) (((x) & GENMASK(23, 16)) >> 16) 21562306a36Sopenharmony_ci 21662306a36Sopenharmony_ci#define QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM(x) ((x) & GENMASK(7, 0)) 21762306a36Sopenharmony_ci#define QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM_M GENMASK(7, 0) 21862306a36Sopenharmony_ci#define QSYS_TAS_PARAM_CFG_CTRL_ALWAYS_GUARD_BAND_SCH_Q BIT(8) 21962306a36Sopenharmony_ci#define QSYS_TAS_PARAM_CFG_CTRL_CONFIG_CHANGE BIT(16) 22062306a36Sopenharmony_ci 22162306a36Sopenharmony_ci#define QSYS_PORT_MAX_SDU_RSZ 0x4 22262306a36Sopenharmony_ci 22362306a36Sopenharmony_ci#define QSYS_PARAM_CFG_REG_3_BASE_TIME_SEC_MSB(x) ((x) & GENMASK(15, 0)) 22462306a36Sopenharmony_ci#define QSYS_PARAM_CFG_REG_3_BASE_TIME_SEC_MSB_M GENMASK(15, 0) 22562306a36Sopenharmony_ci#define QSYS_PARAM_CFG_REG_3_LIST_LENGTH(x) (((x) << 16) & GENMASK(31, 16)) 22662306a36Sopenharmony_ci#define QSYS_PARAM_CFG_REG_3_LIST_LENGTH_M GENMASK(31, 16) 22762306a36Sopenharmony_ci#define QSYS_PARAM_CFG_REG_3_LIST_LENGTH_X(x) (((x) & GENMASK(31, 16)) >> 16) 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_ci#define QSYS_GCL_CFG_REG_1_GCL_ENTRY_NUM(x) ((x) & GENMASK(5, 0)) 23062306a36Sopenharmony_ci#define QSYS_GCL_CFG_REG_1_GCL_ENTRY_NUM_M GENMASK(5, 0) 23162306a36Sopenharmony_ci#define QSYS_GCL_CFG_REG_1_GATE_STATE(x) (((x) << 8) & GENMASK(15, 8)) 23262306a36Sopenharmony_ci#define QSYS_GCL_CFG_REG_1_GATE_STATE_M GENMASK(15, 8) 23362306a36Sopenharmony_ci#define QSYS_GCL_CFG_REG_1_GATE_STATE_X(x) (((x) & GENMASK(15, 8)) >> 8) 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_3_BASE_TIME_SEC_MSB(x) ((x) & GENMASK(15, 0)) 23662306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_3_BASE_TIME_SEC_MSB_M GENMASK(15, 0) 23762306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_3_LIST_LENGTH(x) (((x) << 16) & GENMASK(31, 16)) 23862306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_3_LIST_LENGTH_M GENMASK(31, 16) 23962306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_3_LIST_LENGTH_X(x) (((x) & GENMASK(31, 16)) >> 16) 24062306a36Sopenharmony_ci 24162306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_8_CFG_CHG_TIME_SEC_MSB(x) ((x) & GENMASK(15, 0)) 24262306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_8_CFG_CHG_TIME_SEC_MSB_M GENMASK(15, 0) 24362306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_8_OPER_GATE_STATE(x) (((x) << 16) & GENMASK(23, 16)) 24462306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_8_OPER_GATE_STATE_M GENMASK(23, 16) 24562306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_8_OPER_GATE_STATE_X(x) (((x) & GENMASK(23, 16)) >> 16) 24662306a36Sopenharmony_ci#define QSYS_PARAM_STATUS_REG_8_CONFIG_PENDING BIT(24) 24762306a36Sopenharmony_ci 24862306a36Sopenharmony_ci#define QSYS_GCL_STATUS_REG_1_GCL_ENTRY_NUM(x) ((x) & GENMASK(5, 0)) 24962306a36Sopenharmony_ci#define QSYS_GCL_STATUS_REG_1_GCL_ENTRY_NUM_M GENMASK(5, 0) 25062306a36Sopenharmony_ci#define QSYS_GCL_STATUS_REG_1_GATE_STATE(x) (((x) << 8) & GENMASK(15, 8)) 25162306a36Sopenharmony_ci#define QSYS_GCL_STATUS_REG_1_GATE_STATE_M GENMASK(15, 8) 25262306a36Sopenharmony_ci#define QSYS_GCL_STATUS_REG_1_GATE_STATE_X(x) (((x) & GENMASK(15, 8)) >> 8) 25362306a36Sopenharmony_ci 25462306a36Sopenharmony_ci#endif 255