xref: /linux/drivers/crypto/cavium/nitrox/nitrox_csr.h (revision 976e3645923bdd2fe7893aae33fd7a21098bfb28)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
214fa93cdSSrikanth Jampala #ifndef __NITROX_CSR_H
314fa93cdSSrikanth Jampala #define __NITROX_CSR_H
414fa93cdSSrikanth Jampala 
514fa93cdSSrikanth Jampala #include <asm/byteorder.h>
614fa93cdSSrikanth Jampala #include <linux/types.h>
714fa93cdSSrikanth Jampala 
814fa93cdSSrikanth Jampala /* EMU clusters */
914fa93cdSSrikanth Jampala #define NR_CLUSTERS		4
1048e10548SSrikanth Jampala /* Maximum cores per cluster,
1148e10548SSrikanth Jampala  * varies based on partname
1248e10548SSrikanth Jampala  */
1314fa93cdSSrikanth Jampala #define AE_CORES_PER_CLUSTER	20
1414fa93cdSSrikanth Jampala #define SE_CORES_PER_CLUSTER	16
1514fa93cdSSrikanth Jampala 
1648e10548SSrikanth Jampala #define AE_MAX_CORES	(AE_CORES_PER_CLUSTER * NR_CLUSTERS)
1748e10548SSrikanth Jampala #define SE_MAX_CORES	(SE_CORES_PER_CLUSTER * NR_CLUSTERS)
1848e10548SSrikanth Jampala #define ZIP_MAX_CORES	5
1948e10548SSrikanth Jampala 
2014fa93cdSSrikanth Jampala /* BIST registers */
2114fa93cdSSrikanth Jampala #define EMU_BIST_STATUSX(_i)	(0x1402700 + ((_i) * 0x40000))
2214fa93cdSSrikanth Jampala #define UCD_BIST_STATUS		0x12C0070
2314fa93cdSSrikanth Jampala #define NPS_CORE_BIST_REG	0x10000E8
2414fa93cdSSrikanth Jampala #define NPS_CORE_NPC_BIST_REG	0x1000128
2514fa93cdSSrikanth Jampala #define NPS_PKT_SLC_BIST_REG	0x1040088
2614fa93cdSSrikanth Jampala #define NPS_PKT_IN_BIST_REG	0x1040100
2714fa93cdSSrikanth Jampala #define POM_BIST_REG		0x11C0100
2814fa93cdSSrikanth Jampala #define BMI_BIST_REG		0x1140080
2914fa93cdSSrikanth Jampala #define EFL_CORE_BIST_REGX(_i)	(0x1240100 + ((_i) * 0x400))
3014fa93cdSSrikanth Jampala #define EFL_TOP_BIST_STAT	0x1241090
3114fa93cdSSrikanth Jampala #define BMO_BIST_REG		0x1180080
3214fa93cdSSrikanth Jampala #define LBC_BIST_STATUS		0x1200020
3314fa93cdSSrikanth Jampala #define PEM_BIST_STATUSX(_i)	(0x1080468 | ((_i) << 18))
3414fa93cdSSrikanth Jampala 
3514fa93cdSSrikanth Jampala /* EMU registers */
3614fa93cdSSrikanth Jampala #define EMU_SE_ENABLEX(_i)	(0x1400000 + ((_i) * 0x40000))
3714fa93cdSSrikanth Jampala #define EMU_AE_ENABLEX(_i)	(0x1400008 + ((_i) * 0x40000))
3814fa93cdSSrikanth Jampala #define EMU_WD_INT_ENA_W1SX(_i)	(0x1402318 + ((_i) * 0x40000))
3914fa93cdSSrikanth Jampala #define EMU_GE_INT_ENA_W1SX(_i)	(0x1402518 + ((_i) * 0x40000))
4014fa93cdSSrikanth Jampala #define EMU_FUSE_MAPX(_i)	(0x1402708 + ((_i) * 0x40000))
4114fa93cdSSrikanth Jampala 
4214fa93cdSSrikanth Jampala /* UCD registers */
43a7268c4dSPhani Kiran Hemadri #define UCD_SE_EID_UCODE_BLOCK_NUMX(_i)	(0x12C0000 + ((_i) * 0x1000))
44a7268c4dSPhani Kiran Hemadri #define UCD_AE_EID_UCODE_BLOCK_NUMX(_i)	(0x12C0008 + ((_i) * 0x800))
4514fa93cdSSrikanth Jampala #define UCD_UCODE_LOAD_BLOCK_NUM	0x12C0010
4614fa93cdSSrikanth Jampala #define UCD_UCODE_LOAD_IDX_DATAX(_i)	(0x12C0018 + ((_i) * 0x20))
47a7268c4dSPhani Kiran Hemadri #define UCD_SE_CNTX(_i)			(0x12C0040 + ((_i) * 0x1000))
48a7268c4dSPhani Kiran Hemadri #define UCD_AE_CNTX(_i)			(0x12C0048 + ((_i) * 0x800))
49a7268c4dSPhani Kiran Hemadri 
50a7268c4dSPhani Kiran Hemadri /* AQM registers */
51a7268c4dSPhani Kiran Hemadri #define AQM_CTL                         0x1300000
52a7268c4dSPhani Kiran Hemadri #define AQM_INT                         0x1300008
53a7268c4dSPhani Kiran Hemadri #define AQM_DBELL_OVF_LO                0x1300010
54a7268c4dSPhani Kiran Hemadri #define AQM_DBELL_OVF_HI                0x1300018
55a7268c4dSPhani Kiran Hemadri #define AQM_DBELL_OVF_LO_W1S            0x1300020
56a7268c4dSPhani Kiran Hemadri #define AQM_DBELL_OVF_LO_ENA_W1C        0x1300028
57a7268c4dSPhani Kiran Hemadri #define AQM_DBELL_OVF_LO_ENA_W1S        0x1300030
58a7268c4dSPhani Kiran Hemadri #define AQM_DBELL_OVF_HI_W1S            0x1300038
59a7268c4dSPhani Kiran Hemadri #define AQM_DBELL_OVF_HI_ENA_W1C        0x1300040
60a7268c4dSPhani Kiran Hemadri #define AQM_DBELL_OVF_HI_ENA_W1S        0x1300048
61a7268c4dSPhani Kiran Hemadri #define AQM_DMA_RD_ERR_LO               0x1300050
62a7268c4dSPhani Kiran Hemadri #define AQM_DMA_RD_ERR_HI               0x1300058
63a7268c4dSPhani Kiran Hemadri #define AQM_DMA_RD_ERR_LO_W1S           0x1300060
64a7268c4dSPhani Kiran Hemadri #define AQM_DMA_RD_ERR_LO_ENA_W1C       0x1300068
65a7268c4dSPhani Kiran Hemadri #define AQM_DMA_RD_ERR_LO_ENA_W1S       0x1300070
66a7268c4dSPhani Kiran Hemadri #define AQM_DMA_RD_ERR_HI_W1S           0x1300078
67a7268c4dSPhani Kiran Hemadri #define AQM_DMA_RD_ERR_HI_ENA_W1C       0x1300080
68a7268c4dSPhani Kiran Hemadri #define AQM_DMA_RD_ERR_HI_ENA_W1S       0x1300088
69a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_NA_LO                  0x1300090
70a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_NA_HI                  0x1300098
71a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_NA_LO_W1S              0x13000A0
72a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_NA_LO_ENA_W1C          0x13000A8
73a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_NA_LO_ENA_W1S          0x13000B0
74a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_NA_HI_W1S              0x13000B8
75a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_NA_HI_ENA_W1C          0x13000C0
76a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_NA_HI_ENA_W1S          0x13000C8
77a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_ERR_LO                 0x13000D0
78a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_ERR_HI                 0x13000D8
79a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_ERR_LO_W1S             0x13000E0
80a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_ERR_LO_ENA_W1C         0x13000E8
81a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_ERR_LO_ENA_W1S         0x13000F0
82a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_ERR_HI_W1S             0x13000F8
83a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_ERR_HI_ENA_W1C         0x1300100
84a7268c4dSPhani Kiran Hemadri #define AQM_EXEC_ERR_HI_ENA_W1S         0x1300108
85a7268c4dSPhani Kiran Hemadri #define AQM_ECC_INT                     0x1300110
86a7268c4dSPhani Kiran Hemadri #define AQM_ECC_INT_W1S                 0x1300118
87a7268c4dSPhani Kiran Hemadri #define AQM_ECC_INT_ENA_W1C             0x1300120
88a7268c4dSPhani Kiran Hemadri #define AQM_ECC_INT_ENA_W1S             0x1300128
89a7268c4dSPhani Kiran Hemadri #define AQM_ECC_CTL                     0x1300130
90a7268c4dSPhani Kiran Hemadri #define AQM_BIST_STATUS                 0x1300138
91a7268c4dSPhani Kiran Hemadri #define AQM_CMD_INF_THRX(x)             (0x1300400 + ((x) * 0x8))
92a7268c4dSPhani Kiran Hemadri #define AQM_CMD_INFX(x)                 (0x1300800 + ((x) * 0x8))
93a7268c4dSPhani Kiran Hemadri #define AQM_GRP_EXECMSK_LOX(x)          (0x1300C00 + ((x) * 0x10))
94a7268c4dSPhani Kiran Hemadri #define AQM_GRP_EXECMSK_HIX(x)          (0x1300C08 + ((x) * 0x10))
95a7268c4dSPhani Kiran Hemadri #define AQM_ACTIVITY_STAT_LO            0x1300C80
96a7268c4dSPhani Kiran Hemadri #define AQM_ACTIVITY_STAT_HI            0x1300C88
97a7268c4dSPhani Kiran Hemadri #define AQM_Q_CMD_PROCX(x)              (0x1301000 + ((x) * 0x8))
98a7268c4dSPhani Kiran Hemadri #define AQM_PERF_CTL_LO                 0x1301400
99a7268c4dSPhani Kiran Hemadri #define AQM_PERF_CTL_HI                 0x1301408
100a7268c4dSPhani Kiran Hemadri #define AQM_PERF_CNT                    0x1301410
101a7268c4dSPhani Kiran Hemadri 
102a7268c4dSPhani Kiran Hemadri #define AQMQ_DRBLX(x)                   (0x20000 + ((x) * 0x40000))
103a7268c4dSPhani Kiran Hemadri #define AQMQ_QSZX(x)                    (0x20008 + ((x) * 0x40000))
104a7268c4dSPhani Kiran Hemadri #define AQMQ_BADRX(x)                   (0x20010 + ((x) * 0x40000))
105a7268c4dSPhani Kiran Hemadri #define AQMQ_NXT_CMDX(x)                (0x20018 + ((x) * 0x40000))
106a7268c4dSPhani Kiran Hemadri #define AQMQ_CMD_CNTX(x)                (0x20020 + ((x) * 0x40000))
107a7268c4dSPhani Kiran Hemadri #define AQMQ_CMP_THRX(x)                (0x20028 + ((x) * 0x40000))
108a7268c4dSPhani Kiran Hemadri #define AQMQ_CMP_CNTX(x)                (0x20030 + ((x) * 0x40000))
109a7268c4dSPhani Kiran Hemadri #define AQMQ_TIM_LDX(x)                 (0x20038 + ((x) * 0x40000))
110a7268c4dSPhani Kiran Hemadri #define AQMQ_TIMERX(x)                  (0x20040 + ((x) * 0x40000))
111a7268c4dSPhani Kiran Hemadri #define AQMQ_ENX(x)                     (0x20048 + ((x) * 0x40000))
112a7268c4dSPhani Kiran Hemadri #define AQMQ_ACTIVITY_STATX(x)          (0x20050 + ((x) * 0x40000))
113a7268c4dSPhani Kiran Hemadri #define AQM_VF_CMP_STATX(x)             (0x28000 + ((x) * 0x40000))
11414fa93cdSSrikanth Jampala 
11514fa93cdSSrikanth Jampala /* NPS core registers */
11614fa93cdSSrikanth Jampala #define NPS_CORE_GBL_VFCFG	0x1000000
11714fa93cdSSrikanth Jampala #define NPS_CORE_CONTROL	0x1000008
11814fa93cdSSrikanth Jampala #define NPS_CORE_INT_ACTIVE	0x1000080
11914fa93cdSSrikanth Jampala #define NPS_CORE_INT		0x10000A0
12014fa93cdSSrikanth Jampala #define NPS_CORE_INT_ENA_W1S	0x10000B8
121086eac9eSSrikanth Jampala #define NPS_STATS_PKT_DMA_RD_CNT	0x1000180
122086eac9eSSrikanth Jampala #define NPS_STATS_PKT_DMA_WR_CNT	0x1000190
12314fa93cdSSrikanth Jampala 
12414fa93cdSSrikanth Jampala /* NPS packet registers */
12514fa93cdSSrikanth Jampala #define NPS_PKT_INT			0x1040018
126cf718eaaSSrikanth, Jampala #define NPS_PKT_MBOX_INT_LO		0x1040020
127cf718eaaSSrikanth, Jampala #define NPS_PKT_MBOX_INT_LO_ENA_W1C	0x1040030
128cf718eaaSSrikanth, Jampala #define NPS_PKT_MBOX_INT_LO_ENA_W1S	0x1040038
129cf718eaaSSrikanth, Jampala #define NPS_PKT_MBOX_INT_HI		0x1040040
130cf718eaaSSrikanth, Jampala #define NPS_PKT_MBOX_INT_HI_ENA_W1C	0x1040050
131cf718eaaSSrikanth, Jampala #define NPS_PKT_MBOX_INT_HI_ENA_W1S	0x1040058
13214fa93cdSSrikanth Jampala #define NPS_PKT_IN_RERR_HI		0x1040108
13314fa93cdSSrikanth Jampala #define NPS_PKT_IN_RERR_HI_ENA_W1S	0x1040120
13414fa93cdSSrikanth Jampala #define NPS_PKT_IN_RERR_LO		0x1040128
13514fa93cdSSrikanth Jampala #define NPS_PKT_IN_RERR_LO_ENA_W1S	0x1040140
13614fa93cdSSrikanth Jampala #define NPS_PKT_IN_ERR_TYPE		0x1040148
13714fa93cdSSrikanth Jampala #define NPS_PKT_IN_ERR_TYPE_ENA_W1S	0x1040160
13814fa93cdSSrikanth Jampala #define NPS_PKT_IN_INSTR_CTLX(_i)	(0x10060 + ((_i) * 0x40000))
13914fa93cdSSrikanth Jampala #define NPS_PKT_IN_INSTR_BADDRX(_i)	(0x10068 + ((_i) * 0x40000))
14014fa93cdSSrikanth Jampala #define NPS_PKT_IN_INSTR_RSIZEX(_i)	(0x10070 + ((_i) * 0x40000))
14114fa93cdSSrikanth Jampala #define NPS_PKT_IN_DONE_CNTSX(_i)	(0x10080 + ((_i) * 0x40000))
14214fa93cdSSrikanth Jampala #define NPS_PKT_IN_INSTR_BAOFF_DBELLX(_i)	(0x10078 + ((_i) * 0x40000))
14314fa93cdSSrikanth Jampala #define NPS_PKT_IN_INT_LEVELSX(_i)		(0x10088 + ((_i) * 0x40000))
14414fa93cdSSrikanth Jampala 
14514fa93cdSSrikanth Jampala #define NPS_PKT_SLC_RERR_HI		0x1040208
14614fa93cdSSrikanth Jampala #define NPS_PKT_SLC_RERR_HI_ENA_W1S	0x1040220
14714fa93cdSSrikanth Jampala #define NPS_PKT_SLC_RERR_LO		0x1040228
14814fa93cdSSrikanth Jampala #define NPS_PKT_SLC_RERR_LO_ENA_W1S	0x1040240
14914fa93cdSSrikanth Jampala #define NPS_PKT_SLC_ERR_TYPE		0x1040248
15014fa93cdSSrikanth Jampala #define NPS_PKT_SLC_ERR_TYPE_ENA_W1S	0x1040260
151cf718eaaSSrikanth, Jampala /* Mailbox PF->VF PF Accessible Data registers */
152cf718eaaSSrikanth, Jampala #define NPS_PKT_MBOX_PF_VF_PFDATAX(_i)	(0x1040800 + ((_i) * 0x8))
153cf718eaaSSrikanth, Jampala #define NPS_PKT_MBOX_VF_PF_PFDATAX(_i)	(0x1040C00 + ((_i) * 0x8))
154cf718eaaSSrikanth, Jampala 
15514fa93cdSSrikanth Jampala #define NPS_PKT_SLC_CTLX(_i)		(0x10000 + ((_i) * 0x40000))
15614fa93cdSSrikanth Jampala #define NPS_PKT_SLC_CNTSX(_i)		(0x10008 + ((_i) * 0x40000))
15714fa93cdSSrikanth Jampala #define NPS_PKT_SLC_INT_LEVELSX(_i)	(0x10010 + ((_i) * 0x40000))
15814fa93cdSSrikanth Jampala 
15914fa93cdSSrikanth Jampala /* POM registers */
16014fa93cdSSrikanth Jampala #define POM_INT_ENA_W1S		0x11C0018
16114fa93cdSSrikanth Jampala #define POM_GRP_EXECMASKX(_i)	(0x11C1100 | ((_i) * 8))
16214fa93cdSSrikanth Jampala #define POM_INT		0x11C0000
16314fa93cdSSrikanth Jampala #define POM_PERF_CTL	0x11CC400
16414fa93cdSSrikanth Jampala 
16514fa93cdSSrikanth Jampala /* BMI registers */
16614fa93cdSSrikanth Jampala #define BMI_INT		0x1140000
16714fa93cdSSrikanth Jampala #define BMI_CTL		0x1140020
16814fa93cdSSrikanth Jampala #define BMI_INT_ENA_W1S	0x1140018
169086eac9eSSrikanth Jampala #define BMI_NPS_PKT_CNT	0x1140070
17014fa93cdSSrikanth Jampala 
17114fa93cdSSrikanth Jampala /* EFL registers */
17214fa93cdSSrikanth Jampala #define EFL_CORE_INT_ENA_W1SX(_i)		(0x1240018 + ((_i) * 0x400))
17314fa93cdSSrikanth Jampala #define EFL_CORE_VF_ERR_INT0X(_i)		(0x1240050 + ((_i) * 0x400))
17414fa93cdSSrikanth Jampala #define EFL_CORE_VF_ERR_INT0_ENA_W1SX(_i)	(0x1240068 + ((_i) * 0x400))
17514fa93cdSSrikanth Jampala #define EFL_CORE_VF_ERR_INT1X(_i)		(0x1240070 + ((_i) * 0x400))
17614fa93cdSSrikanth Jampala #define EFL_CORE_VF_ERR_INT1_ENA_W1SX(_i)	(0x1240088 + ((_i) * 0x400))
17714fa93cdSSrikanth Jampala #define EFL_CORE_SE_ERR_INTX(_i)		(0x12400A0 + ((_i) * 0x400))
17814fa93cdSSrikanth Jampala #define EFL_RNM_CTL_STATUS			0x1241800
17914fa93cdSSrikanth Jampala #define EFL_CORE_INTX(_i)			(0x1240000 + ((_i) * 0x400))
18014fa93cdSSrikanth Jampala 
18114fa93cdSSrikanth Jampala /* BMO registers */
18214fa93cdSSrikanth Jampala #define BMO_CTL2		0x1180028
183086eac9eSSrikanth Jampala #define BMO_NPS_SLC_PKT_CNT	0x1180078
18414fa93cdSSrikanth Jampala 
18514fa93cdSSrikanth Jampala /* LBC registers */
18614fa93cdSSrikanth Jampala #define LBC_INT			0x1200000
18714fa93cdSSrikanth Jampala #define LBC_INVAL_CTL		0x1201010
18814fa93cdSSrikanth Jampala #define LBC_PLM_VF1_64_INT	0x1202008
18914fa93cdSSrikanth Jampala #define LBC_INVAL_STATUS	0x1202010
19014fa93cdSSrikanth Jampala #define LBC_INT_ENA_W1S		0x1203000
19114fa93cdSSrikanth Jampala #define LBC_PLM_VF1_64_INT_ENA_W1S	0x1205008
19214fa93cdSSrikanth Jampala #define LBC_PLM_VF65_128_INT		0x1206008
19314fa93cdSSrikanth Jampala #define LBC_ELM_VF1_64_INT		0x1208000
19414fa93cdSSrikanth Jampala #define LBC_PLM_VF65_128_INT_ENA_W1S	0x1209008
19514fa93cdSSrikanth Jampala #define LBC_ELM_VF1_64_INT_ENA_W1S	0x120B000
19614fa93cdSSrikanth Jampala #define LBC_ELM_VF65_128_INT		0x120C000
19714fa93cdSSrikanth Jampala #define LBC_ELM_VF65_128_INT_ENA_W1S	0x120F000
19814fa93cdSSrikanth Jampala 
19948e10548SSrikanth Jampala #define RST_BOOT	0x10C1600
20048e10548SSrikanth Jampala #define FUS_DAT1	0x10C1408
20148e10548SSrikanth Jampala 
20214fa93cdSSrikanth Jampala /* PEM registers */
20314fa93cdSSrikanth Jampala #define PEM0_INT 0x1080428
20414fa93cdSSrikanth Jampala 
20514fa93cdSSrikanth Jampala /**
206a7268c4dSPhani Kiran Hemadri  * struct ucd_core_eid_ucode_block_num - Core Eid to Ucode Blk Mapping Registers
207a7268c4dSPhani Kiran Hemadri  * @ucode_len: Ucode length identifier 32KB or 64KB
208a7268c4dSPhani Kiran Hemadri  * @ucode_blk: Ucode Block Number
209a7268c4dSPhani Kiran Hemadri  */
210a7268c4dSPhani Kiran Hemadri union ucd_core_eid_ucode_block_num {
211a7268c4dSPhani Kiran Hemadri 	u64 value;
212a7268c4dSPhani Kiran Hemadri 	struct {
213a7268c4dSPhani Kiran Hemadri #if (defined(__BIG_ENDIAN_BITFIELD))
214a7268c4dSPhani Kiran Hemadri 		u64 raz_4_63 : 60;
215a7268c4dSPhani Kiran Hemadri 		u64 ucode_len : 1;
216a7268c4dSPhani Kiran Hemadri 		u64 ucode_blk : 3;
217a7268c4dSPhani Kiran Hemadri #else
218a7268c4dSPhani Kiran Hemadri 		u64 ucode_blk : 3;
219a7268c4dSPhani Kiran Hemadri 		u64 ucode_len : 1;
220a7268c4dSPhani Kiran Hemadri 		u64 raz_4_63 : 60;
221a7268c4dSPhani Kiran Hemadri #endif
222a7268c4dSPhani Kiran Hemadri 	};
223a7268c4dSPhani Kiran Hemadri };
224a7268c4dSPhani Kiran Hemadri 
225a7268c4dSPhani Kiran Hemadri /**
226a7268c4dSPhani Kiran Hemadri  * struct aqm_grp_execmsk_lo - Available AE engines for the group
227a7268c4dSPhani Kiran Hemadri  * @exec_0_to_39: AE engines 0 to 39 status
228a7268c4dSPhani Kiran Hemadri  */
229a7268c4dSPhani Kiran Hemadri union aqm_grp_execmsk_lo {
230a7268c4dSPhani Kiran Hemadri 	u64 value;
231a7268c4dSPhani Kiran Hemadri 	struct {
232a7268c4dSPhani Kiran Hemadri #if (defined(__BIG_ENDIAN_BITFIELD))
233a7268c4dSPhani Kiran Hemadri 		u64 raz_40_63 : 24;
234a7268c4dSPhani Kiran Hemadri 		u64 exec_0_to_39 : 40;
235a7268c4dSPhani Kiran Hemadri #else
236a7268c4dSPhani Kiran Hemadri 		u64 exec_0_to_39 : 40;
237a7268c4dSPhani Kiran Hemadri 		u64 raz_40_63 : 24;
238a7268c4dSPhani Kiran Hemadri #endif
239a7268c4dSPhani Kiran Hemadri 	};
240a7268c4dSPhani Kiran Hemadri };
241a7268c4dSPhani Kiran Hemadri 
242a7268c4dSPhani Kiran Hemadri /**
243a7268c4dSPhani Kiran Hemadri  * struct aqm_grp_execmsk_hi - Available AE engines for the group
244a7268c4dSPhani Kiran Hemadri  * @exec_40_to_79: AE engines 40 to 79 status
245a7268c4dSPhani Kiran Hemadri  */
246a7268c4dSPhani Kiran Hemadri union aqm_grp_execmsk_hi {
247a7268c4dSPhani Kiran Hemadri 	u64 value;
248a7268c4dSPhani Kiran Hemadri 	struct {
249a7268c4dSPhani Kiran Hemadri #if (defined(__BIG_ENDIAN_BITFIELD))
250a7268c4dSPhani Kiran Hemadri 		u64 raz_40_63 : 24;
251a7268c4dSPhani Kiran Hemadri 		u64 exec_40_to_79 : 40;
252a7268c4dSPhani Kiran Hemadri #else
253a7268c4dSPhani Kiran Hemadri 		u64 exec_40_to_79 : 40;
254a7268c4dSPhani Kiran Hemadri 		u64 raz_40_63 : 24;
255a7268c4dSPhani Kiran Hemadri #endif
256a7268c4dSPhani Kiran Hemadri 	};
257a7268c4dSPhani Kiran Hemadri };
258a7268c4dSPhani Kiran Hemadri 
259a7268c4dSPhani Kiran Hemadri /**
260*5f05cdcaSPhani Kiran Hemadri  * struct aqmq_drbl - AQM Queue Doorbell Counter Registers
261*5f05cdcaSPhani Kiran Hemadri  * @dbell_count: Doorbell Counter
262*5f05cdcaSPhani Kiran Hemadri  */
263*5f05cdcaSPhani Kiran Hemadri union aqmq_drbl {
264*5f05cdcaSPhani Kiran Hemadri 	u64 value;
265*5f05cdcaSPhani Kiran Hemadri 	struct {
266*5f05cdcaSPhani Kiran Hemadri #if (defined(__BIG_ENDIAN_BITFIELD))
267*5f05cdcaSPhani Kiran Hemadri 		u64 raz_32_63 : 32;
268*5f05cdcaSPhani Kiran Hemadri 		u64 dbell_count : 32;
269*5f05cdcaSPhani Kiran Hemadri #else
270*5f05cdcaSPhani Kiran Hemadri 		u64 dbell_count : 32;
271*5f05cdcaSPhani Kiran Hemadri 		u64 raz_32_63 : 32;
272*5f05cdcaSPhani Kiran Hemadri #endif
273*5f05cdcaSPhani Kiran Hemadri 	};
274*5f05cdcaSPhani Kiran Hemadri };
275*5f05cdcaSPhani Kiran Hemadri 
276*5f05cdcaSPhani Kiran Hemadri /**
277*5f05cdcaSPhani Kiran Hemadri  * struct aqmq_qsz - AQM Queue Host Queue Size Registers
278*5f05cdcaSPhani Kiran Hemadri  * @host_queue_size: Size, in numbers of 'aqmq_command_s' command
279*5f05cdcaSPhani Kiran Hemadri  * of the Host Ring.
280*5f05cdcaSPhani Kiran Hemadri  */
281*5f05cdcaSPhani Kiran Hemadri union aqmq_qsz {
282*5f05cdcaSPhani Kiran Hemadri 	u64 value;
283*5f05cdcaSPhani Kiran Hemadri 	struct {
284*5f05cdcaSPhani Kiran Hemadri #if (defined(__BIG_ENDIAN_BITFIELD))
285*5f05cdcaSPhani Kiran Hemadri 		u64 raz_32_63 : 32;
286*5f05cdcaSPhani Kiran Hemadri 		u64 host_queue_size : 32;
287*5f05cdcaSPhani Kiran Hemadri #else
288*5f05cdcaSPhani Kiran Hemadri 		u64 host_queue_size : 32;
289*5f05cdcaSPhani Kiran Hemadri 		u64 raz_32_63 : 32;
290*5f05cdcaSPhani Kiran Hemadri #endif
291*5f05cdcaSPhani Kiran Hemadri 	};
292*5f05cdcaSPhani Kiran Hemadri };
293*5f05cdcaSPhani Kiran Hemadri 
294*5f05cdcaSPhani Kiran Hemadri /**
295*5f05cdcaSPhani Kiran Hemadri  * struct aqmq_cmp_thr - AQM Queue Commands Completed Threshold Registers
296*5f05cdcaSPhani Kiran Hemadri  * @commands_completed_threshold: Count of 'aqmq_command_s' commands executed
297*5f05cdcaSPhani Kiran Hemadri  * by AE engines for which completion interrupt is asserted.
298*5f05cdcaSPhani Kiran Hemadri  */
299*5f05cdcaSPhani Kiran Hemadri union aqmq_cmp_thr {
300*5f05cdcaSPhani Kiran Hemadri 	u64 value;
301*5f05cdcaSPhani Kiran Hemadri 	struct {
302*5f05cdcaSPhani Kiran Hemadri #if (defined(__BIG_ENDIAN_BITFIELD))
303*5f05cdcaSPhani Kiran Hemadri 		u64 raz_32_63 : 32;
304*5f05cdcaSPhani Kiran Hemadri 		u64 commands_completed_threshold : 32;
305*5f05cdcaSPhani Kiran Hemadri #else
306*5f05cdcaSPhani Kiran Hemadri 		u64 commands_completed_threshold : 32;
307*5f05cdcaSPhani Kiran Hemadri 		u64 raz_32_63 : 32;
308*5f05cdcaSPhani Kiran Hemadri #endif
309*5f05cdcaSPhani Kiran Hemadri 	};
310*5f05cdcaSPhani Kiran Hemadri };
311*5f05cdcaSPhani Kiran Hemadri 
312*5f05cdcaSPhani Kiran Hemadri /**
313*5f05cdcaSPhani Kiran Hemadri  * struct aqmq_cmp_cnt - AQM Queue Commands Completed Count Registers
314*5f05cdcaSPhani Kiran Hemadri  * @resend: Bit to request completion interrupt Resend.
315*5f05cdcaSPhani Kiran Hemadri  * @completion_status: Command completion status of the ring.
316*5f05cdcaSPhani Kiran Hemadri  * @commands_completed_count: Count of 'aqmq_command_s' commands executed by
317*5f05cdcaSPhani Kiran Hemadri  * AE engines.
318*5f05cdcaSPhani Kiran Hemadri  */
319*5f05cdcaSPhani Kiran Hemadri union aqmq_cmp_cnt {
320*5f05cdcaSPhani Kiran Hemadri 	u64 value;
321*5f05cdcaSPhani Kiran Hemadri 	struct {
322*5f05cdcaSPhani Kiran Hemadri #if (defined(__BIG_ENDIAN_BITFIELD))
323*5f05cdcaSPhani Kiran Hemadri 		u64 raz_34_63 : 30;
324*5f05cdcaSPhani Kiran Hemadri 		u64 resend : 1;
325*5f05cdcaSPhani Kiran Hemadri 		u64 completion_status : 1;
326*5f05cdcaSPhani Kiran Hemadri 		u64 commands_completed_count : 32;
327*5f05cdcaSPhani Kiran Hemadri #else
328*5f05cdcaSPhani Kiran Hemadri 		u64 commands_completed_count : 32;
329*5f05cdcaSPhani Kiran Hemadri 		u64 completion_status : 1;
330*5f05cdcaSPhani Kiran Hemadri 		u64 resend : 1;
331*5f05cdcaSPhani Kiran Hemadri 		u64 raz_34_63 : 30;
332*5f05cdcaSPhani Kiran Hemadri #endif
333*5f05cdcaSPhani Kiran Hemadri 	};
334*5f05cdcaSPhani Kiran Hemadri };
335*5f05cdcaSPhani Kiran Hemadri 
336*5f05cdcaSPhani Kiran Hemadri /**
337*5f05cdcaSPhani Kiran Hemadri  * struct aqmq_en - AQM Queue Enable Registers
338*5f05cdcaSPhani Kiran Hemadri  * @queue_status: 1 = AQMQ is enabled, 0 = AQMQ is disabled
339*5f05cdcaSPhani Kiran Hemadri  */
340*5f05cdcaSPhani Kiran Hemadri union aqmq_en {
341*5f05cdcaSPhani Kiran Hemadri 	u64 value;
342*5f05cdcaSPhani Kiran Hemadri 	struct {
343*5f05cdcaSPhani Kiran Hemadri #if (defined(__BIG_ENDIAN_BITFIELD))
344*5f05cdcaSPhani Kiran Hemadri 		u64 raz_1_63 : 63;
345*5f05cdcaSPhani Kiran Hemadri 		u64 queue_enable : 1;
346*5f05cdcaSPhani Kiran Hemadri #else
347*5f05cdcaSPhani Kiran Hemadri 		u64 queue_enable : 1;
348*5f05cdcaSPhani Kiran Hemadri 		u64 raz_1_63 : 63;
349*5f05cdcaSPhani Kiran Hemadri #endif
350*5f05cdcaSPhani Kiran Hemadri 	};
351*5f05cdcaSPhani Kiran Hemadri };
352*5f05cdcaSPhani Kiran Hemadri 
353*5f05cdcaSPhani Kiran Hemadri /**
354*5f05cdcaSPhani Kiran Hemadri  * struct aqmq_activity_stat - AQM Queue Activity Status Registers
355*5f05cdcaSPhani Kiran Hemadri  * @queue_active: 1 = AQMQ is active, 0 = AQMQ is quiescent
356*5f05cdcaSPhani Kiran Hemadri  */
357*5f05cdcaSPhani Kiran Hemadri union aqmq_activity_stat {
358*5f05cdcaSPhani Kiran Hemadri 	u64 value;
359*5f05cdcaSPhani Kiran Hemadri 	struct {
360*5f05cdcaSPhani Kiran Hemadri #if (defined(__BIG_ENDIAN_BITFIELD))
361*5f05cdcaSPhani Kiran Hemadri 		u64 raz_1_63 : 63;
362*5f05cdcaSPhani Kiran Hemadri 		u64 queue_active : 1;
363*5f05cdcaSPhani Kiran Hemadri #else
364*5f05cdcaSPhani Kiran Hemadri 		u64 queue_active : 1;
365*5f05cdcaSPhani Kiran Hemadri 		u64 raz_1_63 : 63;
366*5f05cdcaSPhani Kiran Hemadri #endif
367*5f05cdcaSPhani Kiran Hemadri 	};
368*5f05cdcaSPhani Kiran Hemadri };
369*5f05cdcaSPhani Kiran Hemadri 
370*5f05cdcaSPhani Kiran Hemadri /**
37114fa93cdSSrikanth Jampala  * struct emu_fuse_map - EMU Fuse Map Registers
37214fa93cdSSrikanth Jampala  * @ae_fuse: Fuse settings for AE 19..0
37314fa93cdSSrikanth Jampala  * @se_fuse: Fuse settings for SE 15..0
37414fa93cdSSrikanth Jampala  *
37514fa93cdSSrikanth Jampala  * A set bit indicates the unit is fuse disabled.
37614fa93cdSSrikanth Jampala  */
37714fa93cdSSrikanth Jampala union emu_fuse_map {
37814fa93cdSSrikanth Jampala 	u64 value;
37914fa93cdSSrikanth Jampala 	struct {
38014fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
38114fa93cdSSrikanth Jampala 		u64 valid : 1;
38214fa93cdSSrikanth Jampala 		u64 raz_52_62 : 11;
38314fa93cdSSrikanth Jampala 		u64 ae_fuse : 20;
38414fa93cdSSrikanth Jampala 		u64 raz_16_31 : 16;
38514fa93cdSSrikanth Jampala 		u64 se_fuse : 16;
38614fa93cdSSrikanth Jampala #else
38714fa93cdSSrikanth Jampala 		u64 se_fuse : 16;
38814fa93cdSSrikanth Jampala 		u64 raz_16_31 : 16;
38914fa93cdSSrikanth Jampala 		u64 ae_fuse : 20;
39014fa93cdSSrikanth Jampala 		u64 raz_52_62 : 11;
39114fa93cdSSrikanth Jampala 		u64 valid : 1;
39214fa93cdSSrikanth Jampala #endif
39314fa93cdSSrikanth Jampala 	} s;
39414fa93cdSSrikanth Jampala };
39514fa93cdSSrikanth Jampala 
39614fa93cdSSrikanth Jampala /**
39714fa93cdSSrikanth Jampala  * struct emu_se_enable - Symmetric Engine Enable Registers
39814fa93cdSSrikanth Jampala  * @enable: Individual enables for each of the clusters
39914fa93cdSSrikanth Jampala  *   16 symmetric engines.
40014fa93cdSSrikanth Jampala  */
40114fa93cdSSrikanth Jampala union emu_se_enable {
40214fa93cdSSrikanth Jampala 	u64 value;
40314fa93cdSSrikanth Jampala 	struct {
40414fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
40514fa93cdSSrikanth Jampala 		u64 raz	: 48;
40614fa93cdSSrikanth Jampala 		u64 enable : 16;
40714fa93cdSSrikanth Jampala #else
40814fa93cdSSrikanth Jampala 		u64 enable : 16;
40914fa93cdSSrikanth Jampala 		u64 raz	: 48;
41014fa93cdSSrikanth Jampala #endif
41114fa93cdSSrikanth Jampala 	} s;
41214fa93cdSSrikanth Jampala };
41314fa93cdSSrikanth Jampala 
41414fa93cdSSrikanth Jampala /**
41514fa93cdSSrikanth Jampala  * struct emu_ae_enable - EMU Asymmetric engines.
41614fa93cdSSrikanth Jampala  * @enable: Individual enables for each of the cluster's
41714fa93cdSSrikanth Jampala  *   20 Asymmetric Engines.
41814fa93cdSSrikanth Jampala  */
41914fa93cdSSrikanth Jampala union emu_ae_enable {
42014fa93cdSSrikanth Jampala 	u64 value;
42114fa93cdSSrikanth Jampala 	struct {
42214fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
42314fa93cdSSrikanth Jampala 		u64 raz	: 44;
42414fa93cdSSrikanth Jampala 		u64 enable : 20;
42514fa93cdSSrikanth Jampala #else
42614fa93cdSSrikanth Jampala 		u64 enable : 20;
42714fa93cdSSrikanth Jampala 		u64 raz	: 44;
42814fa93cdSSrikanth Jampala #endif
42914fa93cdSSrikanth Jampala 	} s;
43014fa93cdSSrikanth Jampala };
43114fa93cdSSrikanth Jampala 
43214fa93cdSSrikanth Jampala /**
43314fa93cdSSrikanth Jampala  * struct emu_wd_int_ena_w1s - EMU Interrupt Enable Registers
43414fa93cdSSrikanth Jampala  * @ae_wd: Reads or sets enable for EMU(0..3)_WD_INT[AE_WD]
43514fa93cdSSrikanth Jampala  * @se_wd: Reads or sets enable for EMU(0..3)_WD_INT[SE_WD]
43614fa93cdSSrikanth Jampala  */
43714fa93cdSSrikanth Jampala union emu_wd_int_ena_w1s {
43814fa93cdSSrikanth Jampala 	u64 value;
43914fa93cdSSrikanth Jampala 	struct {
44014fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
44114fa93cdSSrikanth Jampala 		u64 raz2 : 12;
44214fa93cdSSrikanth Jampala 		u64 ae_wd : 20;
44314fa93cdSSrikanth Jampala 		u64 raz1 : 16;
44414fa93cdSSrikanth Jampala 		u64 se_wd : 16;
44514fa93cdSSrikanth Jampala #else
44614fa93cdSSrikanth Jampala 		u64 se_wd : 16;
44714fa93cdSSrikanth Jampala 		u64 raz1 : 16;
44814fa93cdSSrikanth Jampala 		u64 ae_wd : 20;
44914fa93cdSSrikanth Jampala 		u64 raz2 : 12;
45014fa93cdSSrikanth Jampala #endif
45114fa93cdSSrikanth Jampala 	} s;
45214fa93cdSSrikanth Jampala };
45314fa93cdSSrikanth Jampala 
45414fa93cdSSrikanth Jampala /**
45514fa93cdSSrikanth Jampala  * struct emu_ge_int_ena_w1s - EMU Interrupt Enable set registers
45614fa93cdSSrikanth Jampala  * @ae_ge: Reads or sets enable for EMU(0..3)_GE_INT[AE_GE]
45714fa93cdSSrikanth Jampala  * @se_ge: Reads or sets enable for EMU(0..3)_GE_INT[SE_GE]
45814fa93cdSSrikanth Jampala  */
45914fa93cdSSrikanth Jampala union emu_ge_int_ena_w1s {
46014fa93cdSSrikanth Jampala 	u64 value;
46114fa93cdSSrikanth Jampala 	struct {
46214fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
46314fa93cdSSrikanth Jampala 		u64 raz_52_63 : 12;
46414fa93cdSSrikanth Jampala 		u64 ae_ge : 20;
46514fa93cdSSrikanth Jampala 		u64 raz_16_31: 16;
46614fa93cdSSrikanth Jampala 		u64 se_ge : 16;
46714fa93cdSSrikanth Jampala #else
46814fa93cdSSrikanth Jampala 		u64 se_ge : 16;
46914fa93cdSSrikanth Jampala 		u64 raz_16_31: 16;
47014fa93cdSSrikanth Jampala 		u64 ae_ge : 20;
47114fa93cdSSrikanth Jampala 		u64 raz_52_63 : 12;
47214fa93cdSSrikanth Jampala #endif
47314fa93cdSSrikanth Jampala 	} s;
47414fa93cdSSrikanth Jampala };
47514fa93cdSSrikanth Jampala 
47614fa93cdSSrikanth Jampala /**
47714fa93cdSSrikanth Jampala  * struct nps_pkt_slc_ctl - Solicited Packet Out Control Registers
47814fa93cdSSrikanth Jampala  * @rh: Indicates whether to remove or include the response header
47914fa93cdSSrikanth Jampala  *   1 = Include, 0 = Remove
48014fa93cdSSrikanth Jampala  * @z: If set, 8 trailing 0x00 bytes will be added to the end of the
48114fa93cdSSrikanth Jampala  *   outgoing packet.
48214fa93cdSSrikanth Jampala  * @enb: Enable for this port.
48314fa93cdSSrikanth Jampala  */
48414fa93cdSSrikanth Jampala union nps_pkt_slc_ctl {
48514fa93cdSSrikanth Jampala 	u64 value;
48614fa93cdSSrikanth Jampala 	struct {
48714fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD)
48814fa93cdSSrikanth Jampala 		u64 raz : 61;
48914fa93cdSSrikanth Jampala 		u64 rh : 1;
49014fa93cdSSrikanth Jampala 		u64 z : 1;
49114fa93cdSSrikanth Jampala 		u64 enb : 1;
49214fa93cdSSrikanth Jampala #else
49314fa93cdSSrikanth Jampala 		u64 enb : 1;
49414fa93cdSSrikanth Jampala 		u64 z : 1;
49514fa93cdSSrikanth Jampala 		u64 rh : 1;
49614fa93cdSSrikanth Jampala 		u64 raz : 61;
49714fa93cdSSrikanth Jampala #endif
49814fa93cdSSrikanth Jampala 	} s;
49914fa93cdSSrikanth Jampala };
50014fa93cdSSrikanth Jampala 
50114fa93cdSSrikanth Jampala /**
50214fa93cdSSrikanth Jampala  * struct nps_pkt_slc_cnts - Solicited Packet Out Count Registers
50314fa93cdSSrikanth Jampala  * @slc_int: Returns a 1 when:
50414fa93cdSSrikanth Jampala  *   NPS_PKT_SLC(i)_CNTS[CNT] > NPS_PKT_SLC(i)_INT_LEVELS[CNT], or
50514fa93cdSSrikanth Jampala  *   NPS_PKT_SLC(i)_CNTS[TIMER] > NPS_PKT_SLC(i)_INT_LEVELS[TIMET].
50614fa93cdSSrikanth Jampala  *   To clear the bit, the CNTS register must be written to clear.
50714fa93cdSSrikanth Jampala  * @in_int: Returns a 1 when:
50814fa93cdSSrikanth Jampala  *   NPS_PKT_IN(i)_DONE_CNTS[CNT] > NPS_PKT_IN(i)_INT_LEVELS[CNT].
50914fa93cdSSrikanth Jampala  *   To clear the bit, the DONE_CNTS register must be written to clear.
51014fa93cdSSrikanth Jampala  * @mbox_int: Returns a 1 when:
51114fa93cdSSrikanth Jampala  *   NPS_PKT_MBOX_PF_VF(i)_INT[INTR] is set. To clear the bit,
51214fa93cdSSrikanth Jampala  *   write NPS_PKT_MBOX_PF_VF(i)_INT[INTR] with 1.
51314fa93cdSSrikanth Jampala  * @timer: Timer, incremented every 2048 coprocessor clock cycles
51414fa93cdSSrikanth Jampala  *   when [CNT] is not zero. The hardware clears both [TIMER] and
51514fa93cdSSrikanth Jampala  *   [INT] when [CNT] goes to 0.
51614fa93cdSSrikanth Jampala  * @cnt: Packet counter. Hardware adds to [CNT] as it sends packets out.
51714fa93cdSSrikanth Jampala  *   On a write to this CSR, hardware subtracts the amount written to the
51814fa93cdSSrikanth Jampala  *   [CNT] field from [CNT].
51914fa93cdSSrikanth Jampala  */
52014fa93cdSSrikanth Jampala union nps_pkt_slc_cnts {
52114fa93cdSSrikanth Jampala 	u64 value;
52214fa93cdSSrikanth Jampala 	struct {
52314fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD)
52414fa93cdSSrikanth Jampala 		u64 slc_int : 1;
52514fa93cdSSrikanth Jampala 		u64 uns_int : 1;
52614fa93cdSSrikanth Jampala 		u64 in_int : 1;
52714fa93cdSSrikanth Jampala 		u64 mbox_int : 1;
52814fa93cdSSrikanth Jampala 		u64 resend : 1;
52914fa93cdSSrikanth Jampala 		u64 raz : 5;
53014fa93cdSSrikanth Jampala 		u64 timer : 22;
53114fa93cdSSrikanth Jampala 		u64 cnt : 32;
53214fa93cdSSrikanth Jampala #else
53314fa93cdSSrikanth Jampala 		u64 cnt	: 32;
53414fa93cdSSrikanth Jampala 		u64 timer : 22;
53514fa93cdSSrikanth Jampala 		u64 raz	: 5;
53614fa93cdSSrikanth Jampala 		u64 resend : 1;
53714fa93cdSSrikanth Jampala 		u64 mbox_int : 1;
53814fa93cdSSrikanth Jampala 		u64 in_int : 1;
53914fa93cdSSrikanth Jampala 		u64 uns_int : 1;
54014fa93cdSSrikanth Jampala 		u64 slc_int : 1;
54114fa93cdSSrikanth Jampala #endif
54214fa93cdSSrikanth Jampala 	} s;
54314fa93cdSSrikanth Jampala };
54414fa93cdSSrikanth Jampala 
54514fa93cdSSrikanth Jampala /**
54614fa93cdSSrikanth Jampala  * struct nps_pkt_slc_int_levels - Solicited Packet Out Interrupt Levels
54714fa93cdSSrikanth Jampala  *   Registers.
54814fa93cdSSrikanth Jampala  * @bmode: Determines whether NPS_PKT_SLC_CNTS[CNT] is a byte or
54914fa93cdSSrikanth Jampala  *   packet counter.
55014fa93cdSSrikanth Jampala  * @timet: Output port counter time interrupt threshold.
55114fa93cdSSrikanth Jampala  * @cnt: Output port counter interrupt threshold.
55214fa93cdSSrikanth Jampala  */
55314fa93cdSSrikanth Jampala union nps_pkt_slc_int_levels {
55414fa93cdSSrikanth Jampala 	u64 value;
55514fa93cdSSrikanth Jampala 	struct {
55614fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD)
55714fa93cdSSrikanth Jampala 		u64 bmode : 1;
55814fa93cdSSrikanth Jampala 		u64 raz	: 9;
55914fa93cdSSrikanth Jampala 		u64 timet : 22;
56014fa93cdSSrikanth Jampala 		u64 cnt	: 32;
56114fa93cdSSrikanth Jampala #else
56214fa93cdSSrikanth Jampala 		u64 cnt : 32;
56314fa93cdSSrikanth Jampala 		u64 timet : 22;
56414fa93cdSSrikanth Jampala 		u64 raz : 9;
56514fa93cdSSrikanth Jampala 		u64 bmode : 1;
56614fa93cdSSrikanth Jampala #endif
56714fa93cdSSrikanth Jampala 	} s;
56814fa93cdSSrikanth Jampala };
56914fa93cdSSrikanth Jampala 
57014fa93cdSSrikanth Jampala /**
57114fa93cdSSrikanth Jampala  * struct nps_pkt_inst - NPS Packet Interrupt Register
57214fa93cdSSrikanth Jampala  * @in_err: Set when any NPS_PKT_IN_RERR_HI/LO bit and
57314fa93cdSSrikanth Jampala  *    corresponding NPS_PKT_IN_RERR_*_ENA_* bit are bot set.
57414fa93cdSSrikanth Jampala  * @uns_err: Set when any NSP_PKT_UNS_RERR_HI/LO bit and
57514fa93cdSSrikanth Jampala  *    corresponding NPS_PKT_UNS_RERR_*_ENA_* bit are both set.
57614fa93cdSSrikanth Jampala  * @slc_er: Set when any NSP_PKT_SLC_RERR_HI/LO bit and
57714fa93cdSSrikanth Jampala  *    corresponding NPS_PKT_SLC_RERR_*_ENA_* bit are both set.
57814fa93cdSSrikanth Jampala  */
57914fa93cdSSrikanth Jampala union nps_pkt_int {
58014fa93cdSSrikanth Jampala 	u64 value;
58114fa93cdSSrikanth Jampala 	struct {
58214fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD)
58314fa93cdSSrikanth Jampala 		u64 raz	: 54;
58414fa93cdSSrikanth Jampala 		u64 uns_wto : 1;
58514fa93cdSSrikanth Jampala 		u64 in_err : 1;
58614fa93cdSSrikanth Jampala 		u64 uns_err : 1;
58714fa93cdSSrikanth Jampala 		u64 slc_err : 1;
58814fa93cdSSrikanth Jampala 		u64 in_dbe : 1;
58914fa93cdSSrikanth Jampala 		u64 in_sbe : 1;
59014fa93cdSSrikanth Jampala 		u64 uns_dbe : 1;
59114fa93cdSSrikanth Jampala 		u64 uns_sbe : 1;
59214fa93cdSSrikanth Jampala 		u64 slc_dbe : 1;
59314fa93cdSSrikanth Jampala 		u64 slc_sbe : 1;
59414fa93cdSSrikanth Jampala #else
59514fa93cdSSrikanth Jampala 		u64 slc_sbe : 1;
59614fa93cdSSrikanth Jampala 		u64 slc_dbe : 1;
59714fa93cdSSrikanth Jampala 		u64 uns_sbe : 1;
59814fa93cdSSrikanth Jampala 		u64 uns_dbe : 1;
59914fa93cdSSrikanth Jampala 		u64 in_sbe : 1;
60014fa93cdSSrikanth Jampala 		u64 in_dbe : 1;
60114fa93cdSSrikanth Jampala 		u64 slc_err : 1;
60214fa93cdSSrikanth Jampala 		u64 uns_err : 1;
60314fa93cdSSrikanth Jampala 		u64 in_err : 1;
60414fa93cdSSrikanth Jampala 		u64 uns_wto : 1;
60514fa93cdSSrikanth Jampala 		u64 raz	: 54;
60614fa93cdSSrikanth Jampala #endif
60714fa93cdSSrikanth Jampala 	} s;
60814fa93cdSSrikanth Jampala };
60914fa93cdSSrikanth Jampala 
61014fa93cdSSrikanth Jampala /**
61114fa93cdSSrikanth Jampala  * struct nps_pkt_in_done_cnts - Input instruction ring counts registers
61214fa93cdSSrikanth Jampala  * @slc_cnt: Returns a 1 when:
61314fa93cdSSrikanth Jampala  *    NPS_PKT_SLC(i)_CNTS[CNT] > NPS_PKT_SLC(i)_INT_LEVELS[CNT], or
61414fa93cdSSrikanth Jampala  *    NPS_PKT_SLC(i)_CNTS[TIMER] > NPS_PKT_SCL(i)_INT_LEVELS[TIMET]
61514fa93cdSSrikanth Jampala  *    To clear the bit, the CNTS register must be
61614fa93cdSSrikanth Jampala  *    written to clear the underlying condition
61714fa93cdSSrikanth Jampala  * @uns_int: Return a 1 when:
61814fa93cdSSrikanth Jampala  *    NPS_PKT_UNS(i)_CNTS[CNT] > NPS_PKT_UNS(i)_INT_LEVELS[CNT], or
61914fa93cdSSrikanth Jampala  *    NPS_PKT_UNS(i)_CNTS[TIMER] > NPS_PKT_UNS(i)_INT_LEVELS[TIMET]
62014fa93cdSSrikanth Jampala  *    To clear the bit, the CNTS register must be
62114fa93cdSSrikanth Jampala  *    written to clear the underlying condition
62214fa93cdSSrikanth Jampala  * @in_int: Returns a 1 when:
62314fa93cdSSrikanth Jampala  *    NPS_PKT_IN(i)_DONE_CNTS[CNT] > NPS_PKT_IN(i)_INT_LEVELS[CNT]
62414fa93cdSSrikanth Jampala  *    To clear the bit, the DONE_CNTS register
62514fa93cdSSrikanth Jampala  *    must be written to clear the underlying condition
62614fa93cdSSrikanth Jampala  * @mbox_int: Returns a 1 when:
62714fa93cdSSrikanth Jampala  *    NPS_PKT_MBOX_PF_VF(i)_INT[INTR] is set.
62814fa93cdSSrikanth Jampala  *    To clear the bit, write NPS_PKT_MBOX_PF_VF(i)_INT[INTR]
62914fa93cdSSrikanth Jampala  *    with 1.
63014fa93cdSSrikanth Jampala  * @resend: A write of 1 will resend an MSI-X interrupt message if any
63114fa93cdSSrikanth Jampala  *    of the following conditions are true for this ring "i".
63214fa93cdSSrikanth Jampala  *    NPS_PKT_SLC(i)_CNTS[CNT] > NPS_PKT_SLC(i)_INT_LEVELS[CNT]
63314fa93cdSSrikanth Jampala  *    NPS_PKT_SLC(i)_CNTS[TIMER] > NPS_PKT_SLC(i)_INT_LEVELS[TIMET]
63414fa93cdSSrikanth Jampala  *    NPS_PKT_UNS(i)_CNTS[CNT] > NPS_PKT_UNS(i)_INT_LEVELS[CNT]
63514fa93cdSSrikanth Jampala  *    NPS_PKT_UNS(i)_CNTS[TIMER] > NPS_PKT_UNS(i)_INT_LEVELS[TIMET]
63614fa93cdSSrikanth Jampala  *    NPS_PKT_IN(i)_DONE_CNTS[CNT] > NPS_PKT_IN(i)_INT_LEVELS[CNT]
63714fa93cdSSrikanth Jampala  *    NPS_PKT_MBOX_PF_VF(i)_INT[INTR] is set
63814fa93cdSSrikanth Jampala  * @cnt: Packet counter. Hardware adds to [CNT] as it reads
63914fa93cdSSrikanth Jampala  *    packets. On a write to this CSR, hardware substracts the
64014fa93cdSSrikanth Jampala  *    amount written to the [CNT] field from [CNT], which will
64114fa93cdSSrikanth Jampala  *    clear PKT_IN(i)_INT_STATUS[INTR] if [CNT] becomes <=
64214fa93cdSSrikanth Jampala  *    NPS_PKT_IN(i)_INT_LEVELS[CNT]. This register should be
64314fa93cdSSrikanth Jampala  *    cleared before enabling a ring by reading the current
64414fa93cdSSrikanth Jampala  *    value and writing it back.
64514fa93cdSSrikanth Jampala  */
64614fa93cdSSrikanth Jampala union nps_pkt_in_done_cnts {
64714fa93cdSSrikanth Jampala 	u64 value;
64814fa93cdSSrikanth Jampala 	struct {
64914fa93cdSSrikanth Jampala #if defined(__BIG_ENDIAN_BITFIELD)
65014fa93cdSSrikanth Jampala 		u64 slc_int : 1;
65114fa93cdSSrikanth Jampala 		u64 uns_int : 1;
65214fa93cdSSrikanth Jampala 		u64 in_int : 1;
65314fa93cdSSrikanth Jampala 		u64 mbox_int : 1;
65414fa93cdSSrikanth Jampala 		u64 resend : 1;
65514fa93cdSSrikanth Jampala 		u64 raz : 27;
65614fa93cdSSrikanth Jampala 		u64 cnt	: 32;
65714fa93cdSSrikanth Jampala #else
65814fa93cdSSrikanth Jampala 		u64 cnt	: 32;
65914fa93cdSSrikanth Jampala 		u64 raz	: 27;
66014fa93cdSSrikanth Jampala 		u64 resend : 1;
66114fa93cdSSrikanth Jampala 		u64 mbox_int : 1;
66214fa93cdSSrikanth Jampala 		u64 in_int : 1;
66314fa93cdSSrikanth Jampala 		u64 uns_int : 1;
66414fa93cdSSrikanth Jampala 		u64 slc_int : 1;
66514fa93cdSSrikanth Jampala #endif
66614fa93cdSSrikanth Jampala 	} s;
66714fa93cdSSrikanth Jampala };
66814fa93cdSSrikanth Jampala 
66914fa93cdSSrikanth Jampala /**
67014fa93cdSSrikanth Jampala  * struct nps_pkt_in_instr_ctl - Input Instruction Ring Control Registers.
67114fa93cdSSrikanth Jampala  * @is64b: If 1, the ring uses 64-byte instructions. If 0, the
67214fa93cdSSrikanth Jampala  *   ring uses 32-byte instructions.
67314fa93cdSSrikanth Jampala  * @enb: Enable for the input ring.
67414fa93cdSSrikanth Jampala  */
67514fa93cdSSrikanth Jampala union nps_pkt_in_instr_ctl {
67614fa93cdSSrikanth Jampala 	u64 value;
67714fa93cdSSrikanth Jampala 	struct {
67814fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
67914fa93cdSSrikanth Jampala 		u64 raz	: 62;
68014fa93cdSSrikanth Jampala 		u64 is64b : 1;
68114fa93cdSSrikanth Jampala 		u64 enb	: 1;
68214fa93cdSSrikanth Jampala #else
68314fa93cdSSrikanth Jampala 		u64 enb	: 1;
68414fa93cdSSrikanth Jampala 		u64 is64b : 1;
68514fa93cdSSrikanth Jampala 		u64 raz : 62;
68614fa93cdSSrikanth Jampala #endif
68714fa93cdSSrikanth Jampala 	} s;
68814fa93cdSSrikanth Jampala };
68914fa93cdSSrikanth Jampala 
69014fa93cdSSrikanth Jampala /**
69114fa93cdSSrikanth Jampala  * struct nps_pkt_in_instr_rsize - Input instruction ring size registers
69214fa93cdSSrikanth Jampala  * @rsize: Ring size (number of instructions)
69314fa93cdSSrikanth Jampala  */
69414fa93cdSSrikanth Jampala union nps_pkt_in_instr_rsize {
69514fa93cdSSrikanth Jampala 	u64 value;
69614fa93cdSSrikanth Jampala 	struct {
69714fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
69814fa93cdSSrikanth Jampala 		u64 raz	: 32;
69914fa93cdSSrikanth Jampala 		u64 rsize : 32;
70014fa93cdSSrikanth Jampala #else
70114fa93cdSSrikanth Jampala 		u64 rsize : 32;
70214fa93cdSSrikanth Jampala 		u64 raz	: 32;
70314fa93cdSSrikanth Jampala #endif
70414fa93cdSSrikanth Jampala 	} s;
70514fa93cdSSrikanth Jampala };
70614fa93cdSSrikanth Jampala 
70714fa93cdSSrikanth Jampala /**
70814fa93cdSSrikanth Jampala  * struct nps_pkt_in_instr_baoff_dbell - Input instruction ring
70914fa93cdSSrikanth Jampala  *   base address offset and doorbell registers
71014fa93cdSSrikanth Jampala  * @aoff: Address offset. The offset from the NPS_PKT_IN_INSTR_BADDR
71114fa93cdSSrikanth Jampala  *   where the next pointer is read.
71214fa93cdSSrikanth Jampala  * @dbell: Pointer list doorbell count. Write operations to this field
71314fa93cdSSrikanth Jampala  *   increments the present value here. Read operations return the
71414fa93cdSSrikanth Jampala  *   present value.
71514fa93cdSSrikanth Jampala  */
71614fa93cdSSrikanth Jampala union nps_pkt_in_instr_baoff_dbell {
71714fa93cdSSrikanth Jampala 	u64 value;
71814fa93cdSSrikanth Jampala 	struct {
71914fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
72014fa93cdSSrikanth Jampala 		u64 aoff : 32;
72114fa93cdSSrikanth Jampala 		u64 dbell : 32;
72214fa93cdSSrikanth Jampala #else
72314fa93cdSSrikanth Jampala 		u64 dbell : 32;
72414fa93cdSSrikanth Jampala 		u64 aoff : 32;
72514fa93cdSSrikanth Jampala #endif
72614fa93cdSSrikanth Jampala 	} s;
72714fa93cdSSrikanth Jampala };
72814fa93cdSSrikanth Jampala 
72914fa93cdSSrikanth Jampala /**
73014fa93cdSSrikanth Jampala  * struct nps_core_int_ena_w1s - NPS core interrupt enable set register
73114fa93cdSSrikanth Jampala  * @host_nps_wr_err: Reads or sets enable for
73214fa93cdSSrikanth Jampala  *   NPS_CORE_INT[HOST_NPS_WR_ERR].
73314fa93cdSSrikanth Jampala  * @npco_dma_malform: Reads or sets enable for
73414fa93cdSSrikanth Jampala  *   NPS_CORE_INT[NPCO_DMA_MALFORM].
73514fa93cdSSrikanth Jampala  * @exec_wr_timeout: Reads or sets enable for
73614fa93cdSSrikanth Jampala  *   NPS_CORE_INT[EXEC_WR_TIMEOUT].
73714fa93cdSSrikanth Jampala  * @host_wr_timeout: Reads or sets enable for
73814fa93cdSSrikanth Jampala  *   NPS_CORE_INT[HOST_WR_TIMEOUT].
73914fa93cdSSrikanth Jampala  * @host_wr_err: Reads or sets enable for
74014fa93cdSSrikanth Jampala  *   NPS_CORE_INT[HOST_WR_ERR]
74114fa93cdSSrikanth Jampala  */
74214fa93cdSSrikanth Jampala union nps_core_int_ena_w1s {
74314fa93cdSSrikanth Jampala 	u64 value;
74414fa93cdSSrikanth Jampala 	struct {
74514fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
74614fa93cdSSrikanth Jampala 		u64 raz4 : 55;
74714fa93cdSSrikanth Jampala 		u64 host_nps_wr_err : 1;
74814fa93cdSSrikanth Jampala 		u64 npco_dma_malform : 1;
74914fa93cdSSrikanth Jampala 		u64 exec_wr_timeout : 1;
75014fa93cdSSrikanth Jampala 		u64 host_wr_timeout : 1;
75114fa93cdSSrikanth Jampala 		u64 host_wr_err : 1;
75214fa93cdSSrikanth Jampala 		u64 raz3 : 1;
75314fa93cdSSrikanth Jampala 		u64 raz2 : 1;
75414fa93cdSSrikanth Jampala 		u64 raz1 : 1;
75514fa93cdSSrikanth Jampala 		u64 raz0 : 1;
75614fa93cdSSrikanth Jampala #else
75714fa93cdSSrikanth Jampala 		u64 raz0 : 1;
75814fa93cdSSrikanth Jampala 		u64 raz1 : 1;
75914fa93cdSSrikanth Jampala 		u64 raz2 : 1;
76014fa93cdSSrikanth Jampala 		u64 raz3 : 1;
76114fa93cdSSrikanth Jampala 		u64 host_wr_err	: 1;
76214fa93cdSSrikanth Jampala 		u64 host_wr_timeout : 1;
76314fa93cdSSrikanth Jampala 		u64 exec_wr_timeout : 1;
76414fa93cdSSrikanth Jampala 		u64 npco_dma_malform : 1;
76514fa93cdSSrikanth Jampala 		u64 host_nps_wr_err : 1;
76614fa93cdSSrikanth Jampala 		u64 raz4 : 55;
76714fa93cdSSrikanth Jampala #endif
76814fa93cdSSrikanth Jampala 	} s;
76914fa93cdSSrikanth Jampala };
77014fa93cdSSrikanth Jampala 
77114fa93cdSSrikanth Jampala /**
77214fa93cdSSrikanth Jampala  * struct nps_core_gbl_vfcfg - Global VF Configuration Register.
77314fa93cdSSrikanth Jampala  * @ilk_disable: When set, this bit indicates that the ILK interface has
77414fa93cdSSrikanth Jampala  *    been disabled.
77514fa93cdSSrikanth Jampala  * @obaf: BMO allocation control
77614fa93cdSSrikanth Jampala  *    0 = allocate per queue
77714fa93cdSSrikanth Jampala  *    1 = allocate per VF
77814fa93cdSSrikanth Jampala  * @ibaf: BMI allocation control
77914fa93cdSSrikanth Jampala  *    0 = allocate per queue
78014fa93cdSSrikanth Jampala  *    1 = allocate per VF
78114fa93cdSSrikanth Jampala  * @zaf: ZIP allocation control
78214fa93cdSSrikanth Jampala  *    0 = allocate per queue
78314fa93cdSSrikanth Jampala  *    1 = allocate per VF
78414fa93cdSSrikanth Jampala  * @aeaf: AE allocation control
78514fa93cdSSrikanth Jampala  *    0 = allocate per queue
78614fa93cdSSrikanth Jampala  *    1 = allocate per VF
78714fa93cdSSrikanth Jampala  * @seaf: SE allocation control
78814fa93cdSSrikanth Jampala  *    0 = allocation per queue
78914fa93cdSSrikanth Jampala  *    1 = allocate per VF
79014fa93cdSSrikanth Jampala  * @cfg: VF/PF mode.
79114fa93cdSSrikanth Jampala  */
79214fa93cdSSrikanth Jampala union nps_core_gbl_vfcfg {
79314fa93cdSSrikanth Jampala 	u64 value;
79414fa93cdSSrikanth Jampala 	struct {
79514fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
79614fa93cdSSrikanth Jampala 		u64  raz :55;
79714fa93cdSSrikanth Jampala 		u64  ilk_disable :1;
79814fa93cdSSrikanth Jampala 		u64  obaf :1;
79914fa93cdSSrikanth Jampala 		u64  ibaf :1;
80014fa93cdSSrikanth Jampala 		u64  zaf :1;
80114fa93cdSSrikanth Jampala 		u64  aeaf :1;
80214fa93cdSSrikanth Jampala 		u64  seaf :1;
80314fa93cdSSrikanth Jampala 		u64  cfg :3;
80414fa93cdSSrikanth Jampala #else
80514fa93cdSSrikanth Jampala 		u64  cfg :3;
80614fa93cdSSrikanth Jampala 		u64  seaf :1;
80714fa93cdSSrikanth Jampala 		u64  aeaf :1;
80814fa93cdSSrikanth Jampala 		u64  zaf :1;
80914fa93cdSSrikanth Jampala 		u64  ibaf :1;
81014fa93cdSSrikanth Jampala 		u64  obaf :1;
81114fa93cdSSrikanth Jampala 		u64  ilk_disable :1;
81214fa93cdSSrikanth Jampala 		u64  raz :55;
81314fa93cdSSrikanth Jampala #endif
81414fa93cdSSrikanth Jampala 	} s;
81514fa93cdSSrikanth Jampala };
81614fa93cdSSrikanth Jampala 
81714fa93cdSSrikanth Jampala /**
81814fa93cdSSrikanth Jampala  * struct nps_core_int_active - NPS Core Interrupt Active Register
81914fa93cdSSrikanth Jampala  * @resend: Resend MSI-X interrupt if needs to handle interrupts
82014fa93cdSSrikanth Jampala  *    Sofware can set this bit and then exit the ISR.
82114fa93cdSSrikanth Jampala  * @ocla: Set when any OCLA(0)_INT and corresponding OCLA(0_INT_ENA_W1C
82214fa93cdSSrikanth Jampala  *    bit are set
82314fa93cdSSrikanth Jampala  * @mbox: Set when any NPS_PKT_MBOX_INT_LO/HI and corresponding
82414fa93cdSSrikanth Jampala  *    NPS_PKT_MBOX_INT_LO_ENA_W1C/HI_ENA_W1C bits are set
82514fa93cdSSrikanth Jampala  * @emu: bit i is set in [EMU] when any EMU(i)_INT bit is set
82614fa93cdSSrikanth Jampala  * @bmo: Set when any BMO_INT bit is set
82714fa93cdSSrikanth Jampala  * @bmi: Set when any BMI_INT bit is set or when any non-RO
82814fa93cdSSrikanth Jampala  *    BMI_INT and corresponding BMI_INT_ENA_W1C bits are both set
82914fa93cdSSrikanth Jampala  * @aqm: Set when any AQM_INT bit is set
83014fa93cdSSrikanth Jampala  * @zqm: Set when any ZQM_INT bit is set
83114fa93cdSSrikanth Jampala  * @efl: Set when any EFL_INT RO bit is set or when any non-RO EFL_INT
83214fa93cdSSrikanth Jampala  *    and corresponding EFL_INT_ENA_W1C bits are both set
83314fa93cdSSrikanth Jampala  * @ilk: Set when any ILK_INT bit is set
83414fa93cdSSrikanth Jampala  * @lbc: Set when any LBC_INT RO bit is set or when any non-RO LBC_INT
83514fa93cdSSrikanth Jampala  *    and corresponding LBC_INT_ENA_W1C bits are bot set
83614fa93cdSSrikanth Jampala  * @pem: Set when any PEM(0)_INT RO bit is set or when any non-RO
83714fa93cdSSrikanth Jampala  *    PEM(0)_INT and corresponding PEM(0)_INT_ENA_W1C bit are both set
83814fa93cdSSrikanth Jampala  * @ucd: Set when any UCD_INT bit is set
83914fa93cdSSrikanth Jampala  * @zctl: Set when any ZIP_INT RO bit is set or when any non-RO ZIP_INT
84014fa93cdSSrikanth Jampala  *    and corresponding ZIP_INT_ENA_W1C bits are both set
84114fa93cdSSrikanth Jampala  * @lbm: Set when any LBM_INT bit is set
84214fa93cdSSrikanth Jampala  * @nps_pkt: Set when any NPS_PKT_INT bit is set
84314fa93cdSSrikanth Jampala  * @nps_core: Set when any NPS_CORE_INT RO bit is set or when non-RO
84414fa93cdSSrikanth Jampala  *    NPS_CORE_INT and corresponding NSP_CORE_INT_ENA_W1C bits are both set
84514fa93cdSSrikanth Jampala  */
84614fa93cdSSrikanth Jampala union nps_core_int_active {
84714fa93cdSSrikanth Jampala 	u64 value;
84814fa93cdSSrikanth Jampala 	struct {
84914fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
85014fa93cdSSrikanth Jampala 		u64 resend : 1;
85114fa93cdSSrikanth Jampala 		u64 raz	: 43;
85214fa93cdSSrikanth Jampala 		u64 ocla : 1;
85314fa93cdSSrikanth Jampala 		u64 mbox : 1;
85414fa93cdSSrikanth Jampala 		u64 emu	: 4;
85514fa93cdSSrikanth Jampala 		u64 bmo	: 1;
85614fa93cdSSrikanth Jampala 		u64 bmi	: 1;
85714fa93cdSSrikanth Jampala 		u64 aqm	: 1;
85814fa93cdSSrikanth Jampala 		u64 zqm	: 1;
85914fa93cdSSrikanth Jampala 		u64 efl	: 1;
86014fa93cdSSrikanth Jampala 		u64 ilk	: 1;
86114fa93cdSSrikanth Jampala 		u64 lbc	: 1;
86214fa93cdSSrikanth Jampala 		u64 pem	: 1;
86314fa93cdSSrikanth Jampala 		u64 pom	: 1;
86414fa93cdSSrikanth Jampala 		u64 ucd	: 1;
86514fa93cdSSrikanth Jampala 		u64 zctl : 1;
86614fa93cdSSrikanth Jampala 		u64 lbm	: 1;
86714fa93cdSSrikanth Jampala 		u64 nps_pkt : 1;
86814fa93cdSSrikanth Jampala 		u64 nps_core : 1;
86914fa93cdSSrikanth Jampala #else
87014fa93cdSSrikanth Jampala 		u64 nps_core : 1;
87114fa93cdSSrikanth Jampala 		u64 nps_pkt : 1;
87214fa93cdSSrikanth Jampala 		u64 lbm	: 1;
87314fa93cdSSrikanth Jampala 		u64 zctl: 1;
87414fa93cdSSrikanth Jampala 		u64 ucd	: 1;
87514fa93cdSSrikanth Jampala 		u64 pom	: 1;
87614fa93cdSSrikanth Jampala 		u64 pem	: 1;
87714fa93cdSSrikanth Jampala 		u64 lbc	: 1;
87814fa93cdSSrikanth Jampala 		u64 ilk	: 1;
87914fa93cdSSrikanth Jampala 		u64 efl	: 1;
88014fa93cdSSrikanth Jampala 		u64 zqm	: 1;
88114fa93cdSSrikanth Jampala 		u64 aqm	: 1;
88214fa93cdSSrikanth Jampala 		u64 bmi	: 1;
88314fa93cdSSrikanth Jampala 		u64 bmo	: 1;
88414fa93cdSSrikanth Jampala 		u64 emu	: 4;
88514fa93cdSSrikanth Jampala 		u64 mbox : 1;
88614fa93cdSSrikanth Jampala 		u64 ocla : 1;
88714fa93cdSSrikanth Jampala 		u64 raz	: 43;
88814fa93cdSSrikanth Jampala 		u64 resend : 1;
88914fa93cdSSrikanth Jampala #endif
89014fa93cdSSrikanth Jampala 	} s;
89114fa93cdSSrikanth Jampala };
89214fa93cdSSrikanth Jampala 
89314fa93cdSSrikanth Jampala /**
89414fa93cdSSrikanth Jampala  * struct efl_core_int - EFL Interrupt Registers
89514fa93cdSSrikanth Jampala  * @epci_decode_err: EPCI decoded a transacation that was unknown
89614fa93cdSSrikanth Jampala  *    This error should only occurred when there is a micrcode/SE error
89714fa93cdSSrikanth Jampala  *    and should be considered fatal
89814fa93cdSSrikanth Jampala  * @ae_err: An AE uncorrectable error occurred.
89914fa93cdSSrikanth Jampala  *    See EFL_CORE(0..3)_AE_ERR_INT
90014fa93cdSSrikanth Jampala  * @se_err: An SE uncorrectable error occurred.
90114fa93cdSSrikanth Jampala  *    See EFL_CORE(0..3)_SE_ERR_INT
90214fa93cdSSrikanth Jampala  * @dbe: Double-bit error occurred in EFL
90314fa93cdSSrikanth Jampala  * @sbe: Single-bit error occurred in EFL
90414fa93cdSSrikanth Jampala  * @d_left: Asserted when new POM-Header-BMI-data is
90514fa93cdSSrikanth Jampala  *    being sent to an Exec, and that Exec has Not read all BMI
90614fa93cdSSrikanth Jampala  *    data associated with the previous POM header
90714fa93cdSSrikanth Jampala  * @len_ovr: Asserted when an Exec-Read is issued that is more than
90814fa93cdSSrikanth Jampala  *    14 greater in length that the BMI data left to be read
90914fa93cdSSrikanth Jampala  */
91014fa93cdSSrikanth Jampala union efl_core_int {
91114fa93cdSSrikanth Jampala 	u64 value;
91214fa93cdSSrikanth Jampala 	struct {
91314fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
91414fa93cdSSrikanth Jampala 		u64 raz	: 57;
91514fa93cdSSrikanth Jampala 		u64 epci_decode_err : 1;
91614fa93cdSSrikanth Jampala 		u64 ae_err : 1;
91714fa93cdSSrikanth Jampala 		u64 se_err : 1;
91814fa93cdSSrikanth Jampala 		u64 dbe	: 1;
91914fa93cdSSrikanth Jampala 		u64 sbe	: 1;
92014fa93cdSSrikanth Jampala 		u64 d_left : 1;
92114fa93cdSSrikanth Jampala 		u64 len_ovr : 1;
92214fa93cdSSrikanth Jampala #else
92314fa93cdSSrikanth Jampala 		u64 len_ovr : 1;
92414fa93cdSSrikanth Jampala 		u64 d_left : 1;
92514fa93cdSSrikanth Jampala 		u64 sbe	: 1;
92614fa93cdSSrikanth Jampala 		u64 dbe	: 1;
92714fa93cdSSrikanth Jampala 		u64 se_err : 1;
92814fa93cdSSrikanth Jampala 		u64 ae_err : 1;
92914fa93cdSSrikanth Jampala 		u64 epci_decode_err  : 1;
93014fa93cdSSrikanth Jampala 		u64 raz	: 57;
93114fa93cdSSrikanth Jampala #endif
93214fa93cdSSrikanth Jampala 	} s;
93314fa93cdSSrikanth Jampala };
93414fa93cdSSrikanth Jampala 
93514fa93cdSSrikanth Jampala /**
93614fa93cdSSrikanth Jampala  * struct efl_core_int_ena_w1s - EFL core interrupt enable set register
93714fa93cdSSrikanth Jampala  * @epci_decode_err: Reads or sets enable for
93814fa93cdSSrikanth Jampala  *   EFL_CORE(0..3)_INT[EPCI_DECODE_ERR].
93914fa93cdSSrikanth Jampala  * @d_left: Reads or sets enable for
94014fa93cdSSrikanth Jampala  *   EFL_CORE(0..3)_INT[D_LEFT].
94114fa93cdSSrikanth Jampala  * @len_ovr: Reads or sets enable for
94214fa93cdSSrikanth Jampala  *   EFL_CORE(0..3)_INT[LEN_OVR].
94314fa93cdSSrikanth Jampala  */
94414fa93cdSSrikanth Jampala union efl_core_int_ena_w1s {
94514fa93cdSSrikanth Jampala 	u64 value;
94614fa93cdSSrikanth Jampala 	struct {
94714fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
94814fa93cdSSrikanth Jampala 		u64 raz_7_63 : 57;
94914fa93cdSSrikanth Jampala 		u64 epci_decode_err : 1;
95014fa93cdSSrikanth Jampala 		u64 raz_2_5 : 4;
95114fa93cdSSrikanth Jampala 		u64 d_left : 1;
95214fa93cdSSrikanth Jampala 		u64 len_ovr : 1;
95314fa93cdSSrikanth Jampala #else
95414fa93cdSSrikanth Jampala 		u64 len_ovr : 1;
95514fa93cdSSrikanth Jampala 		u64 d_left : 1;
95614fa93cdSSrikanth Jampala 		u64 raz_2_5 : 4;
95714fa93cdSSrikanth Jampala 		u64 epci_decode_err : 1;
95814fa93cdSSrikanth Jampala 		u64 raz_7_63 : 57;
95914fa93cdSSrikanth Jampala #endif
96014fa93cdSSrikanth Jampala 	} s;
96114fa93cdSSrikanth Jampala };
96214fa93cdSSrikanth Jampala 
96314fa93cdSSrikanth Jampala /**
96414fa93cdSSrikanth Jampala  * struct efl_rnm_ctl_status - RNM Control and Status Register
96514fa93cdSSrikanth Jampala  * @ent_sel: Select input to RNM FIFO
96614fa93cdSSrikanth Jampala  * @exp_ent: Exported entropy enable for random number generator
96714fa93cdSSrikanth Jampala  * @rng_rst: Reset to RNG. Setting this bit to 1 cancels the generation
96814fa93cdSSrikanth Jampala  *    of the current random number.
96914fa93cdSSrikanth Jampala  * @rnm_rst: Reset the RNM. Setting this bit to 1 clears all sorted numbers
97014fa93cdSSrikanth Jampala  *    in the random number memory.
97114fa93cdSSrikanth Jampala  * @rng_en: Enabled the output of the RNG.
97214fa93cdSSrikanth Jampala  * @ent_en: Entropy enable for random number generator.
97314fa93cdSSrikanth Jampala  */
97414fa93cdSSrikanth Jampala union efl_rnm_ctl_status {
97514fa93cdSSrikanth Jampala 	u64 value;
97614fa93cdSSrikanth Jampala 	struct {
97714fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
97814fa93cdSSrikanth Jampala 		u64 raz_9_63 : 55;
97914fa93cdSSrikanth Jampala 		u64 ent_sel : 4;
98014fa93cdSSrikanth Jampala 		u64 exp_ent : 1;
98114fa93cdSSrikanth Jampala 		u64 rng_rst : 1;
98214fa93cdSSrikanth Jampala 		u64 rnm_rst : 1;
98314fa93cdSSrikanth Jampala 		u64 rng_en : 1;
98414fa93cdSSrikanth Jampala 		u64 ent_en : 1;
98514fa93cdSSrikanth Jampala #else
98614fa93cdSSrikanth Jampala 		u64 ent_en : 1;
98714fa93cdSSrikanth Jampala 		u64 rng_en : 1;
98814fa93cdSSrikanth Jampala 		u64 rnm_rst : 1;
98914fa93cdSSrikanth Jampala 		u64 rng_rst : 1;
99014fa93cdSSrikanth Jampala 		u64 exp_ent : 1;
99114fa93cdSSrikanth Jampala 		u64 ent_sel : 4;
99214fa93cdSSrikanth Jampala 		u64 raz_9_63 : 55;
99314fa93cdSSrikanth Jampala #endif
99414fa93cdSSrikanth Jampala 	} s;
99514fa93cdSSrikanth Jampala };
99614fa93cdSSrikanth Jampala 
99714fa93cdSSrikanth Jampala /**
99814fa93cdSSrikanth Jampala  * struct bmi_ctl - BMI control register
99914fa93cdSSrikanth Jampala  * @ilk_hdrq_thrsh: Maximum number of header queue locations
100014fa93cdSSrikanth Jampala  *   that ILK packets may consume. When the threshold is
100114fa93cdSSrikanth Jampala  *   exceeded ILK_XOFF is sent to the BMI_X2P_ARB.
100214fa93cdSSrikanth Jampala  * @nps_hdrq_thrsh: Maximum number of header queue locations
100314fa93cdSSrikanth Jampala  *   that NPS packets may consume. When the threshold is
100414fa93cdSSrikanth Jampala  *   exceeded NPS_XOFF is sent to the BMI_X2P_ARB.
100514fa93cdSSrikanth Jampala  * @totl_hdrq_thrsh: Maximum number of header queue locations
100614fa93cdSSrikanth Jampala  *   that the sum of ILK and NPS packets may consume.
100714fa93cdSSrikanth Jampala  * @ilk_free_thrsh: Maximum number of buffers that ILK packet
100814fa93cdSSrikanth Jampala  *   flows may consume before ILK_XOFF is sent to the BMI_X2P_ARB.
100914fa93cdSSrikanth Jampala  * @nps_free_thrsh: Maximum number of buffers that NPS packet
101014fa93cdSSrikanth Jampala  *   flows may consume before NPS XOFF is sent to the BMI_X2p_ARB.
101114fa93cdSSrikanth Jampala  * @totl_free_thrsh: Maximum number of buffers that bot ILK and NPS
101214fa93cdSSrikanth Jampala  *   packet flows may consume before both NPS_XOFF and ILK_XOFF
101314fa93cdSSrikanth Jampala  *   are asserted to the BMI_X2P_ARB.
101414fa93cdSSrikanth Jampala  * @max_pkt_len: Maximum packet length, integral number of 256B
101514fa93cdSSrikanth Jampala  *   buffers.
101614fa93cdSSrikanth Jampala  */
101714fa93cdSSrikanth Jampala union bmi_ctl {
101814fa93cdSSrikanth Jampala 	u64 value;
101914fa93cdSSrikanth Jampala 	struct {
102014fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
102114fa93cdSSrikanth Jampala 		u64 raz_56_63 : 8;
102214fa93cdSSrikanth Jampala 		u64 ilk_hdrq_thrsh : 8;
102314fa93cdSSrikanth Jampala 		u64 nps_hdrq_thrsh : 8;
102414fa93cdSSrikanth Jampala 		u64 totl_hdrq_thrsh : 8;
102514fa93cdSSrikanth Jampala 		u64 ilk_free_thrsh : 8;
102614fa93cdSSrikanth Jampala 		u64 nps_free_thrsh : 8;
102714fa93cdSSrikanth Jampala 		u64 totl_free_thrsh : 8;
102814fa93cdSSrikanth Jampala 		u64 max_pkt_len : 8;
102914fa93cdSSrikanth Jampala #else
103014fa93cdSSrikanth Jampala 		u64 max_pkt_len : 8;
103114fa93cdSSrikanth Jampala 		u64 totl_free_thrsh : 8;
103214fa93cdSSrikanth Jampala 		u64 nps_free_thrsh : 8;
103314fa93cdSSrikanth Jampala 		u64 ilk_free_thrsh : 8;
103414fa93cdSSrikanth Jampala 		u64 totl_hdrq_thrsh : 8;
103514fa93cdSSrikanth Jampala 		u64 nps_hdrq_thrsh : 8;
103614fa93cdSSrikanth Jampala 		u64 ilk_hdrq_thrsh : 8;
103714fa93cdSSrikanth Jampala 		u64 raz_56_63 : 8;
103814fa93cdSSrikanth Jampala #endif
103914fa93cdSSrikanth Jampala 	} s;
104014fa93cdSSrikanth Jampala };
104114fa93cdSSrikanth Jampala 
104214fa93cdSSrikanth Jampala /**
104314fa93cdSSrikanth Jampala  * struct bmi_int_ena_w1s - BMI interrupt enable set register
104414fa93cdSSrikanth Jampala  * @ilk_req_oflw: Reads or sets enable for
104514fa93cdSSrikanth Jampala  *   BMI_INT[ILK_REQ_OFLW].
104614fa93cdSSrikanth Jampala  * @nps_req_oflw: Reads or sets enable for
104714fa93cdSSrikanth Jampala  *   BMI_INT[NPS_REQ_OFLW].
104814fa93cdSSrikanth Jampala  * @fpf_undrrn: Reads or sets enable for
104914fa93cdSSrikanth Jampala  *   BMI_INT[FPF_UNDRRN].
105014fa93cdSSrikanth Jampala  * @eop_err_ilk: Reads or sets enable for
105114fa93cdSSrikanth Jampala  *   BMI_INT[EOP_ERR_ILK].
105214fa93cdSSrikanth Jampala  * @eop_err_nps: Reads or sets enable for
105314fa93cdSSrikanth Jampala  *   BMI_INT[EOP_ERR_NPS].
105414fa93cdSSrikanth Jampala  * @sop_err_ilk: Reads or sets enable for
105514fa93cdSSrikanth Jampala  *   BMI_INT[SOP_ERR_ILK].
105614fa93cdSSrikanth Jampala  * @sop_err_nps: Reads or sets enable for
105714fa93cdSSrikanth Jampala  *   BMI_INT[SOP_ERR_NPS].
105814fa93cdSSrikanth Jampala  * @pkt_rcv_err_ilk: Reads or sets enable for
105914fa93cdSSrikanth Jampala  *   BMI_INT[PKT_RCV_ERR_ILK].
106014fa93cdSSrikanth Jampala  * @pkt_rcv_err_nps: Reads or sets enable for
106114fa93cdSSrikanth Jampala  *   BMI_INT[PKT_RCV_ERR_NPS].
106214fa93cdSSrikanth Jampala  * @max_len_err_ilk: Reads or sets enable for
106314fa93cdSSrikanth Jampala  *   BMI_INT[MAX_LEN_ERR_ILK].
106414fa93cdSSrikanth Jampala  * @max_len_err_nps: Reads or sets enable for
106514fa93cdSSrikanth Jampala  *   BMI_INT[MAX_LEN_ERR_NPS].
106614fa93cdSSrikanth Jampala  */
106714fa93cdSSrikanth Jampala union bmi_int_ena_w1s {
106814fa93cdSSrikanth Jampala 	u64 value;
106914fa93cdSSrikanth Jampala 	struct {
107014fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
107114fa93cdSSrikanth Jampala 		u64 raz_13_63	: 51;
107214fa93cdSSrikanth Jampala 		u64 ilk_req_oflw : 1;
107314fa93cdSSrikanth Jampala 		u64 nps_req_oflw : 1;
107414fa93cdSSrikanth Jampala 		u64 raz_10 : 1;
107514fa93cdSSrikanth Jampala 		u64 raz_9 : 1;
107614fa93cdSSrikanth Jampala 		u64 fpf_undrrn	: 1;
107714fa93cdSSrikanth Jampala 		u64 eop_err_ilk	: 1;
107814fa93cdSSrikanth Jampala 		u64 eop_err_nps	: 1;
107914fa93cdSSrikanth Jampala 		u64 sop_err_ilk	: 1;
108014fa93cdSSrikanth Jampala 		u64 sop_err_nps	: 1;
108114fa93cdSSrikanth Jampala 		u64 pkt_rcv_err_ilk : 1;
108214fa93cdSSrikanth Jampala 		u64 pkt_rcv_err_nps : 1;
108314fa93cdSSrikanth Jampala 		u64 max_len_err_ilk : 1;
108414fa93cdSSrikanth Jampala 		u64 max_len_err_nps : 1;
108514fa93cdSSrikanth Jampala #else
108614fa93cdSSrikanth Jampala 		u64 max_len_err_nps : 1;
108714fa93cdSSrikanth Jampala 		u64 max_len_err_ilk : 1;
108814fa93cdSSrikanth Jampala 		u64 pkt_rcv_err_nps : 1;
108914fa93cdSSrikanth Jampala 		u64 pkt_rcv_err_ilk : 1;
109014fa93cdSSrikanth Jampala 		u64 sop_err_nps	: 1;
109114fa93cdSSrikanth Jampala 		u64 sop_err_ilk	: 1;
109214fa93cdSSrikanth Jampala 		u64 eop_err_nps	: 1;
109314fa93cdSSrikanth Jampala 		u64 eop_err_ilk	: 1;
109414fa93cdSSrikanth Jampala 		u64 fpf_undrrn	: 1;
109514fa93cdSSrikanth Jampala 		u64 raz_9 : 1;
109614fa93cdSSrikanth Jampala 		u64 raz_10 : 1;
109714fa93cdSSrikanth Jampala 		u64 nps_req_oflw : 1;
109814fa93cdSSrikanth Jampala 		u64 ilk_req_oflw : 1;
109914fa93cdSSrikanth Jampala 		u64 raz_13_63 : 51;
110014fa93cdSSrikanth Jampala #endif
110114fa93cdSSrikanth Jampala 	} s;
110214fa93cdSSrikanth Jampala };
110314fa93cdSSrikanth Jampala 
110414fa93cdSSrikanth Jampala /**
110514fa93cdSSrikanth Jampala  * struct bmo_ctl2 - BMO Control2 Register
110614fa93cdSSrikanth Jampala  * @arb_sel: Determines P2X Arbitration
110714fa93cdSSrikanth Jampala  * @ilk_buf_thrsh: Maximum number of buffers that the
110814fa93cdSSrikanth Jampala  *    ILK packet flows may consume before ILK XOFF is
110914fa93cdSSrikanth Jampala  *    asserted to the POM.
111014fa93cdSSrikanth Jampala  * @nps_slc_buf_thrsh: Maximum number of buffers that the
111114fa93cdSSrikanth Jampala  *    NPS_SLC packet flow may consume before NPS_SLC XOFF is
111214fa93cdSSrikanth Jampala  *    asserted to the POM.
111314fa93cdSSrikanth Jampala  * @nps_uns_buf_thrsh: Maximum number of buffers that the
111414fa93cdSSrikanth Jampala  *    NPS_UNS packet flow may consume before NPS_UNS XOFF is
111514fa93cdSSrikanth Jampala  *    asserted to the POM.
111614fa93cdSSrikanth Jampala  * @totl_buf_thrsh: Maximum number of buffers that ILK, NPS_UNS and
111714fa93cdSSrikanth Jampala  *    NPS_SLC packet flows may consume before NPS_UNS XOFF, NSP_SLC and
111814fa93cdSSrikanth Jampala  *    ILK_XOFF are all asserted POM.
111914fa93cdSSrikanth Jampala  */
112014fa93cdSSrikanth Jampala union bmo_ctl2 {
112114fa93cdSSrikanth Jampala 	u64 value;
112214fa93cdSSrikanth Jampala 	struct {
112314fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
112414fa93cdSSrikanth Jampala 		u64 arb_sel : 1;
112514fa93cdSSrikanth Jampala 		u64 raz_32_62 : 31;
112614fa93cdSSrikanth Jampala 		u64 ilk_buf_thrsh : 8;
112714fa93cdSSrikanth Jampala 		u64 nps_slc_buf_thrsh : 8;
112814fa93cdSSrikanth Jampala 		u64 nps_uns_buf_thrsh : 8;
112914fa93cdSSrikanth Jampala 		u64 totl_buf_thrsh : 8;
113014fa93cdSSrikanth Jampala #else
113114fa93cdSSrikanth Jampala 		u64 totl_buf_thrsh : 8;
113214fa93cdSSrikanth Jampala 		u64 nps_uns_buf_thrsh : 8;
113314fa93cdSSrikanth Jampala 		u64 nps_slc_buf_thrsh : 8;
113414fa93cdSSrikanth Jampala 		u64 ilk_buf_thrsh : 8;
113514fa93cdSSrikanth Jampala 		u64 raz_32_62 : 31;
113614fa93cdSSrikanth Jampala 		u64 arb_sel : 1;
113714fa93cdSSrikanth Jampala #endif
113814fa93cdSSrikanth Jampala 	} s;
113914fa93cdSSrikanth Jampala };
114014fa93cdSSrikanth Jampala 
114114fa93cdSSrikanth Jampala /**
114214fa93cdSSrikanth Jampala  * struct pom_int_ena_w1s - POM interrupt enable set register
114314fa93cdSSrikanth Jampala  * @illegal_intf: Reads or sets enable for POM_INT[ILLEGAL_INTF].
114414fa93cdSSrikanth Jampala  * @illegal_dport: Reads or sets enable for POM_INT[ILLEGAL_DPORT].
114514fa93cdSSrikanth Jampala  */
114614fa93cdSSrikanth Jampala union pom_int_ena_w1s {
114714fa93cdSSrikanth Jampala 	u64 value;
114814fa93cdSSrikanth Jampala 	struct {
114914fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
115014fa93cdSSrikanth Jampala 		u64 raz2 : 60;
115114fa93cdSSrikanth Jampala 		u64 illegal_intf : 1;
115214fa93cdSSrikanth Jampala 		u64 illegal_dport : 1;
115314fa93cdSSrikanth Jampala 		u64 raz1 : 1;
115414fa93cdSSrikanth Jampala 		u64 raz0 : 1;
115514fa93cdSSrikanth Jampala #else
115614fa93cdSSrikanth Jampala 		u64 raz0 : 1;
115714fa93cdSSrikanth Jampala 		u64 raz1 : 1;
115814fa93cdSSrikanth Jampala 		u64 illegal_dport : 1;
115914fa93cdSSrikanth Jampala 		u64 illegal_intf : 1;
116014fa93cdSSrikanth Jampala 		u64 raz2 : 60;
116114fa93cdSSrikanth Jampala #endif
116214fa93cdSSrikanth Jampala 	} s;
116314fa93cdSSrikanth Jampala };
116414fa93cdSSrikanth Jampala 
116514fa93cdSSrikanth Jampala /**
116614fa93cdSSrikanth Jampala  * struct lbc_inval_ctl - LBC invalidation control register
116714fa93cdSSrikanth Jampala  * @wait_timer: Wait timer for wait state. [WAIT_TIMER] must
116814fa93cdSSrikanth Jampala  *   always be written with its reset value.
116914fa93cdSSrikanth Jampala  * @cam_inval_start: Software should write [CAM_INVAL_START]=1
117014fa93cdSSrikanth Jampala  *   to initiate an LBC cache invalidation. After this, software
117114fa93cdSSrikanth Jampala  *   should read LBC_INVAL_STATUS until LBC_INVAL_STATUS[DONE] is set.
117214fa93cdSSrikanth Jampala  *   LBC hardware clears [CAVM_INVAL_START] before software can
117314fa93cdSSrikanth Jampala  *   observed LBC_INVAL_STATUS[DONE] to be set
117414fa93cdSSrikanth Jampala  */
117514fa93cdSSrikanth Jampala union lbc_inval_ctl {
117614fa93cdSSrikanth Jampala 	u64 value;
117714fa93cdSSrikanth Jampala 	struct {
117814fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
117914fa93cdSSrikanth Jampala 		u64 raz2 : 48;
118014fa93cdSSrikanth Jampala 		u64 wait_timer : 8;
118114fa93cdSSrikanth Jampala 		u64 raz1 : 6;
118214fa93cdSSrikanth Jampala 		u64 cam_inval_start : 1;
118314fa93cdSSrikanth Jampala 		u64 raz0 : 1;
118414fa93cdSSrikanth Jampala #else
118514fa93cdSSrikanth Jampala 		u64 raz0 : 1;
118614fa93cdSSrikanth Jampala 		u64 cam_inval_start : 1;
118714fa93cdSSrikanth Jampala 		u64 raz1 : 6;
118814fa93cdSSrikanth Jampala 		u64 wait_timer : 8;
118914fa93cdSSrikanth Jampala 		u64 raz2 : 48;
119014fa93cdSSrikanth Jampala #endif
119114fa93cdSSrikanth Jampala 	} s;
119214fa93cdSSrikanth Jampala };
119314fa93cdSSrikanth Jampala 
119414fa93cdSSrikanth Jampala /**
119514fa93cdSSrikanth Jampala  * struct lbc_int_ena_w1s - LBC interrupt enable set register
119614fa93cdSSrikanth Jampala  * @cam_hard_err: Reads or sets enable for LBC_INT[CAM_HARD_ERR].
119714fa93cdSSrikanth Jampala  * @cam_inval_abort: Reads or sets enable for LBC_INT[CAM_INVAL_ABORT].
119814fa93cdSSrikanth Jampala  * @over_fetch_err: Reads or sets enable for LBC_INT[OVER_FETCH_ERR].
119914fa93cdSSrikanth Jampala  * @cache_line_to_err: Reads or sets enable for
120014fa93cdSSrikanth Jampala  *   LBC_INT[CACHE_LINE_TO_ERR].
120114fa93cdSSrikanth Jampala  * @cam_soft_err: Reads or sets enable for
120214fa93cdSSrikanth Jampala  *   LBC_INT[CAM_SOFT_ERR].
120314fa93cdSSrikanth Jampala  * @dma_rd_err: Reads or sets enable for
120414fa93cdSSrikanth Jampala  *   LBC_INT[DMA_RD_ERR].
120514fa93cdSSrikanth Jampala  */
120614fa93cdSSrikanth Jampala union lbc_int_ena_w1s {
120714fa93cdSSrikanth Jampala 	u64 value;
120814fa93cdSSrikanth Jampala 	struct {
120914fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
121014fa93cdSSrikanth Jampala 		u64 raz_10_63 : 54;
121114fa93cdSSrikanth Jampala 		u64 cam_hard_err : 1;
121214fa93cdSSrikanth Jampala 		u64 cam_inval_abort : 1;
121314fa93cdSSrikanth Jampala 		u64 over_fetch_err : 1;
121414fa93cdSSrikanth Jampala 		u64 cache_line_to_err : 1;
121514fa93cdSSrikanth Jampala 		u64 raz_2_5 : 4;
121614fa93cdSSrikanth Jampala 		u64 cam_soft_err : 1;
121714fa93cdSSrikanth Jampala 		u64 dma_rd_err : 1;
121814fa93cdSSrikanth Jampala #else
121914fa93cdSSrikanth Jampala 		u64 dma_rd_err : 1;
122014fa93cdSSrikanth Jampala 		u64 cam_soft_err : 1;
122114fa93cdSSrikanth Jampala 		u64 raz_2_5 : 4;
122214fa93cdSSrikanth Jampala 		u64 cache_line_to_err : 1;
122314fa93cdSSrikanth Jampala 		u64 over_fetch_err : 1;
122414fa93cdSSrikanth Jampala 		u64 cam_inval_abort : 1;
122514fa93cdSSrikanth Jampala 		u64 cam_hard_err : 1;
122614fa93cdSSrikanth Jampala 		u64 raz_10_63 : 54;
122714fa93cdSSrikanth Jampala #endif
122814fa93cdSSrikanth Jampala 	} s;
122914fa93cdSSrikanth Jampala };
123014fa93cdSSrikanth Jampala 
123114fa93cdSSrikanth Jampala /**
123214fa93cdSSrikanth Jampala  * struct lbc_int - LBC interrupt summary register
123314fa93cdSSrikanth Jampala  * @cam_hard_err: indicates a fatal hardware error.
123414fa93cdSSrikanth Jampala  *   It requires system reset.
123514fa93cdSSrikanth Jampala  *   When [CAM_HARD_ERR] is set, LBC stops logging any new information in
123614fa93cdSSrikanth Jampala  *   LBC_POM_MISS_INFO_LOG,
123714fa93cdSSrikanth Jampala  *   LBC_POM_MISS_ADDR_LOG,
123814fa93cdSSrikanth Jampala  *   LBC_EFL_MISS_INFO_LOG, and
123914fa93cdSSrikanth Jampala  *   LBC_EFL_MISS_ADDR_LOG.
124014fa93cdSSrikanth Jampala  *   Software should sample them.
124114fa93cdSSrikanth Jampala  * @cam_inval_abort: indicates a fatal hardware error.
124214fa93cdSSrikanth Jampala  *   System reset is required.
124314fa93cdSSrikanth Jampala  * @over_fetch_err: indicates a fatal hardware error
124414fa93cdSSrikanth Jampala  *   System reset is required
124514fa93cdSSrikanth Jampala  * @cache_line_to_err: is a debug feature.
124614fa93cdSSrikanth Jampala  *   This timeout interrupt bit tells the software that
124714fa93cdSSrikanth Jampala  *   a cacheline in LBC has non-zero usage and the context
124814fa93cdSSrikanth Jampala  *   has not been used for greater than the
124914fa93cdSSrikanth Jampala  *   LBC_TO_CNT[TO_CNT] time interval.
125014fa93cdSSrikanth Jampala  * @sbe: Memory SBE error. This is recoverable via ECC.
125114fa93cdSSrikanth Jampala  *   See LBC_ECC_INT for more details.
125214fa93cdSSrikanth Jampala  * @dbe: Memory DBE error. This is a fatal and requires a
125314fa93cdSSrikanth Jampala  *   system reset.
125414fa93cdSSrikanth Jampala  * @pref_dat_len_mismatch_err: Summary bit for context length
125514fa93cdSSrikanth Jampala  *   mismatch errors.
125614fa93cdSSrikanth Jampala  * @rd_dat_len_mismatch_err: Summary bit for SE read data length
125714fa93cdSSrikanth Jampala  *   greater than data prefect length errors.
125814fa93cdSSrikanth Jampala  * @cam_soft_err: is recoverable. Software must complete a
125914fa93cdSSrikanth Jampala  *   LBC_INVAL_CTL[CAM_INVAL_START] invalidation sequence and
126014fa93cdSSrikanth Jampala  *   then clear [CAM_SOFT_ERR].
126114fa93cdSSrikanth Jampala  * @dma_rd_err: A context prefect read of host memory returned with
126214fa93cdSSrikanth Jampala  *   a read error.
126314fa93cdSSrikanth Jampala  */
126414fa93cdSSrikanth Jampala union lbc_int {
126514fa93cdSSrikanth Jampala 	u64 value;
126614fa93cdSSrikanth Jampala 	struct {
126714fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
126814fa93cdSSrikanth Jampala 		u64 raz_10_63 : 54;
126914fa93cdSSrikanth Jampala 		u64 cam_hard_err : 1;
127014fa93cdSSrikanth Jampala 		u64 cam_inval_abort : 1;
127114fa93cdSSrikanth Jampala 		u64 over_fetch_err : 1;
127214fa93cdSSrikanth Jampala 		u64 cache_line_to_err : 1;
127314fa93cdSSrikanth Jampala 		u64 sbe : 1;
127414fa93cdSSrikanth Jampala 		u64 dbe	: 1;
127514fa93cdSSrikanth Jampala 		u64 pref_dat_len_mismatch_err : 1;
127614fa93cdSSrikanth Jampala 		u64 rd_dat_len_mismatch_err : 1;
127714fa93cdSSrikanth Jampala 		u64 cam_soft_err : 1;
127814fa93cdSSrikanth Jampala 		u64 dma_rd_err : 1;
127914fa93cdSSrikanth Jampala #else
128014fa93cdSSrikanth Jampala 		u64 dma_rd_err : 1;
128114fa93cdSSrikanth Jampala 		u64 cam_soft_err : 1;
128214fa93cdSSrikanth Jampala 		u64 rd_dat_len_mismatch_err : 1;
128314fa93cdSSrikanth Jampala 		u64 pref_dat_len_mismatch_err : 1;
128414fa93cdSSrikanth Jampala 		u64 dbe	: 1;
128514fa93cdSSrikanth Jampala 		u64 sbe	: 1;
128614fa93cdSSrikanth Jampala 		u64 cache_line_to_err : 1;
128714fa93cdSSrikanth Jampala 		u64 over_fetch_err : 1;
128814fa93cdSSrikanth Jampala 		u64 cam_inval_abort : 1;
128914fa93cdSSrikanth Jampala 		u64 cam_hard_err : 1;
129014fa93cdSSrikanth Jampala 		u64 raz_10_63 : 54;
129114fa93cdSSrikanth Jampala #endif
129214fa93cdSSrikanth Jampala 	} s;
129314fa93cdSSrikanth Jampala };
129414fa93cdSSrikanth Jampala 
129514fa93cdSSrikanth Jampala /**
129614fa93cdSSrikanth Jampala  * struct lbc_inval_status: LBC Invalidation status register
129714fa93cdSSrikanth Jampala  * @cam_clean_entry_complete_cnt: The number of entries that are
129814fa93cdSSrikanth Jampala  *   cleaned up successfully.
129914fa93cdSSrikanth Jampala  * @cam_clean_entry_cnt: The number of entries that have the CAM
130014fa93cdSSrikanth Jampala  *   inval command issued.
130114fa93cdSSrikanth Jampala  * @cam_inval_state: cam invalidation FSM state
130214fa93cdSSrikanth Jampala  * @cam_inval_abort: cam invalidation abort
130314fa93cdSSrikanth Jampala  * @cam_rst_rdy: lbc_cam reset ready
130414fa93cdSSrikanth Jampala  * @done: LBC clears [DONE] when
130514fa93cdSSrikanth Jampala  *   LBC_INVAL_CTL[CAM_INVAL_START] is written with a one,
130614fa93cdSSrikanth Jampala  *   and sets [DONE] when it completes the invalidation
130714fa93cdSSrikanth Jampala  *   sequence.
130814fa93cdSSrikanth Jampala  */
130914fa93cdSSrikanth Jampala union lbc_inval_status {
131014fa93cdSSrikanth Jampala 	u64 value;
131114fa93cdSSrikanth Jampala 	struct {
131214fa93cdSSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
131314fa93cdSSrikanth Jampala 		u64 raz3 : 23;
131414fa93cdSSrikanth Jampala 		u64 cam_clean_entry_complete_cnt : 9;
131514fa93cdSSrikanth Jampala 		u64 raz2 : 7;
131614fa93cdSSrikanth Jampala 		u64 cam_clean_entry_cnt : 9;
131714fa93cdSSrikanth Jampala 		u64 raz1 : 5;
131814fa93cdSSrikanth Jampala 		u64 cam_inval_state : 3;
131914fa93cdSSrikanth Jampala 		u64 raz0 : 5;
132014fa93cdSSrikanth Jampala 		u64 cam_inval_abort : 1;
132114fa93cdSSrikanth Jampala 		u64 cam_rst_rdy	: 1;
132214fa93cdSSrikanth Jampala 		u64 done : 1;
132314fa93cdSSrikanth Jampala #else
132414fa93cdSSrikanth Jampala 		u64 done : 1;
132514fa93cdSSrikanth Jampala 		u64 cam_rst_rdy : 1;
132614fa93cdSSrikanth Jampala 		u64 cam_inval_abort : 1;
132714fa93cdSSrikanth Jampala 		u64 raz0 : 5;
132814fa93cdSSrikanth Jampala 		u64 cam_inval_state : 3;
132914fa93cdSSrikanth Jampala 		u64 raz1 : 5;
133014fa93cdSSrikanth Jampala 		u64 cam_clean_entry_cnt : 9;
133114fa93cdSSrikanth Jampala 		u64 raz2 : 7;
133214fa93cdSSrikanth Jampala 		u64 cam_clean_entry_complete_cnt : 9;
133314fa93cdSSrikanth Jampala 		u64 raz3 : 23;
133414fa93cdSSrikanth Jampala #endif
133514fa93cdSSrikanth Jampala 	} s;
133614fa93cdSSrikanth Jampala };
133714fa93cdSSrikanth Jampala 
133848e10548SSrikanth Jampala /**
133948e10548SSrikanth Jampala  * struct rst_boot: RST Boot Register
134048e10548SSrikanth Jampala  * @jtcsrdis: when set, internal CSR access via JTAG TAP controller
134148e10548SSrikanth Jampala  *   is disabled
134248e10548SSrikanth Jampala  * @jt_tst_mode: JTAG test mode
134348e10548SSrikanth Jampala  * @io_supply: I/O power supply setting based on IO_VDD_SELECT pin:
134448e10548SSrikanth Jampala  *    0x1 = 1.8V
134548e10548SSrikanth Jampala  *    0x2 = 2.5V
134648e10548SSrikanth Jampala  *    0x4 = 3.3V
134748e10548SSrikanth Jampala  *    All other values are reserved
134848e10548SSrikanth Jampala  * @pnr_mul: clock multiplier
134948e10548SSrikanth Jampala  * @lboot: last boot cause mask, resets only with PLL_DC_OK
135048e10548SSrikanth Jampala  * @rboot: determines whether core 0 remains in reset after
135148e10548SSrikanth Jampala  *    chip cold or warm or soft reset
135248e10548SSrikanth Jampala  * @rboot_pin: read only access to REMOTE_BOOT pin
135348e10548SSrikanth Jampala  */
135448e10548SSrikanth Jampala union rst_boot {
135548e10548SSrikanth Jampala 	u64 value;
135648e10548SSrikanth Jampala 	struct {
135748e10548SSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
135848e10548SSrikanth Jampala 		u64 raz_63 : 1;
135948e10548SSrikanth Jampala 		u64 jtcsrdis : 1;
136048e10548SSrikanth Jampala 		u64 raz_59_61 : 3;
136148e10548SSrikanth Jampala 		u64 jt_tst_mode : 1;
136248e10548SSrikanth Jampala 		u64 raz_40_57 : 18;
136348e10548SSrikanth Jampala 		u64 io_supply : 3;
136448e10548SSrikanth Jampala 		u64 raz_30_36 : 7;
136548e10548SSrikanth Jampala 		u64 pnr_mul : 6;
136648e10548SSrikanth Jampala 		u64 raz_12_23 : 12;
136748e10548SSrikanth Jampala 		u64 lboot : 10;
136848e10548SSrikanth Jampala 		u64 rboot : 1;
136948e10548SSrikanth Jampala 		u64 rboot_pin : 1;
137048e10548SSrikanth Jampala #else
137148e10548SSrikanth Jampala 		u64 rboot_pin : 1;
137248e10548SSrikanth Jampala 		u64 rboot : 1;
137348e10548SSrikanth Jampala 		u64 lboot : 10;
137448e10548SSrikanth Jampala 		u64 raz_12_23 : 12;
137548e10548SSrikanth Jampala 		u64 pnr_mul : 6;
137648e10548SSrikanth Jampala 		u64 raz_30_36 : 7;
137748e10548SSrikanth Jampala 		u64 io_supply : 3;
137848e10548SSrikanth Jampala 		u64 raz_40_57 : 18;
137948e10548SSrikanth Jampala 		u64 jt_tst_mode : 1;
138048e10548SSrikanth Jampala 		u64 raz_59_61 : 3;
138148e10548SSrikanth Jampala 		u64 jtcsrdis : 1;
138248e10548SSrikanth Jampala 		u64 raz_63 : 1;
138348e10548SSrikanth Jampala #endif
138448e10548SSrikanth Jampala 	};
138548e10548SSrikanth Jampala };
138648e10548SSrikanth Jampala 
138748e10548SSrikanth Jampala /**
138848e10548SSrikanth Jampala  * struct fus_dat1: Fuse Data 1 Register
138948e10548SSrikanth Jampala  * @pll_mul: main clock PLL multiplier hardware limit
139048e10548SSrikanth Jampala  * @pll_half_dis: main clock PLL control
139148e10548SSrikanth Jampala  * @efus_lck: efuse lockdown
139248e10548SSrikanth Jampala  * @zip_info: ZIP information
139348e10548SSrikanth Jampala  * @bar2_sz_conf: when zero, BAR2 size conforms to
139448e10548SSrikanth Jampala  *    PCIe specification
139548e10548SSrikanth Jampala  * @efus_ign: efuse ignore
139648e10548SSrikanth Jampala  * @nozip: ZIP disable
139748e10548SSrikanth Jampala  * @pll_alt_matrix: select alternate PLL matrix
139848e10548SSrikanth Jampala  * @pll_bwadj_denom: select CLKF denominator for
139948e10548SSrikanth Jampala  *    BWADJ value
140048e10548SSrikanth Jampala  * @chip_id: chip ID
140148e10548SSrikanth Jampala  */
140248e10548SSrikanth Jampala union fus_dat1 {
140348e10548SSrikanth Jampala 	u64 value;
140448e10548SSrikanth Jampala 	struct {
140548e10548SSrikanth Jampala #if (defined(__BIG_ENDIAN_BITFIELD))
140648e10548SSrikanth Jampala 		u64 raz_57_63 : 7;
140748e10548SSrikanth Jampala 		u64 pll_mul : 3;
140848e10548SSrikanth Jampala 		u64 pll_half_dis : 1;
140948e10548SSrikanth Jampala 		u64 raz_43_52 : 10;
141048e10548SSrikanth Jampala 		u64 efus_lck : 3;
141148e10548SSrikanth Jampala 		u64 raz_26_39 : 14;
141248e10548SSrikanth Jampala 		u64 zip_info : 5;
141348e10548SSrikanth Jampala 		u64 bar2_sz_conf : 1;
141448e10548SSrikanth Jampala 		u64 efus_ign : 1;
141548e10548SSrikanth Jampala 		u64 nozip : 1;
141648e10548SSrikanth Jampala 		u64 raz_11_17 : 7;
141748e10548SSrikanth Jampala 		u64 pll_alt_matrix : 1;
141848e10548SSrikanth Jampala 		u64 pll_bwadj_denom : 2;
141948e10548SSrikanth Jampala 		u64 chip_id : 8;
142048e10548SSrikanth Jampala #else
142148e10548SSrikanth Jampala 		u64 chip_id : 8;
142248e10548SSrikanth Jampala 		u64 pll_bwadj_denom : 2;
142348e10548SSrikanth Jampala 		u64 pll_alt_matrix : 1;
142448e10548SSrikanth Jampala 		u64 raz_11_17 : 7;
142548e10548SSrikanth Jampala 		u64 nozip : 1;
142648e10548SSrikanth Jampala 		u64 efus_ign : 1;
142748e10548SSrikanth Jampala 		u64 bar2_sz_conf : 1;
142848e10548SSrikanth Jampala 		u64 zip_info : 5;
142948e10548SSrikanth Jampala 		u64 raz_26_39 : 14;
143048e10548SSrikanth Jampala 		u64 efus_lck : 3;
143148e10548SSrikanth Jampala 		u64 raz_43_52 : 10;
143248e10548SSrikanth Jampala 		u64 pll_half_dis : 1;
143348e10548SSrikanth Jampala 		u64 pll_mul : 3;
143448e10548SSrikanth Jampala 		u64 raz_57_63 : 7;
143548e10548SSrikanth Jampala #endif
143648e10548SSrikanth Jampala 	};
143748e10548SSrikanth Jampala };
143848e10548SSrikanth Jampala 
143914fa93cdSSrikanth Jampala #endif /* __NITROX_CSR_H */
1440