1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <asm/byteorder.h>
6 #include <linux/types.h>
10 /* Maximum cores per cluster,
11 * varies based on partname
13 #define AE_CORES_PER_CLUSTER 20
14 #define SE_CORES_PER_CLUSTER 16
16 #define AE_MAX_CORES (AE_CORES_PER_CLUSTER * NR_CLUSTERS)
17 #define SE_MAX_CORES (SE_CORES_PER_CLUSTER * NR_CLUSTERS)
18 #define ZIP_MAX_CORES 5
21 #define EMU_BIST_STATUSX(_i) (0x1402700 + ((_i) * 0x40000))
22 #define UCD_BIST_STATUS 0x12C0070
23 #define NPS_CORE_BIST_REG 0x10000E8
24 #define NPS_CORE_NPC_BIST_REG 0x1000128
25 #define NPS_PKT_SLC_BIST_REG 0x1040088
26 #define NPS_PKT_IN_BIST_REG 0x1040100
27 #define POM_BIST_REG 0x11C0100
28 #define BMI_BIST_REG 0x1140080
29 #define EFL_CORE_BIST_REGX(_i) (0x1240100 + ((_i) * 0x400))
30 #define EFL_TOP_BIST_STAT 0x1241090
31 #define BMO_BIST_REG 0x1180080
32 #define LBC_BIST_STATUS 0x1200020
33 #define PEM_BIST_STATUSX(_i) (0x1080468 | ((_i) << 18))
36 #define EMU_SE_ENABLEX(_i) (0x1400000 + ((_i) * 0x40000))
37 #define EMU_AE_ENABLEX(_i) (0x1400008 + ((_i) * 0x40000))
38 #define EMU_WD_INT_ENA_W1SX(_i) (0x1402318 + ((_i) * 0x40000))
39 #define EMU_GE_INT_ENA_W1SX(_i) (0x1402518 + ((_i) * 0x40000))
40 #define EMU_FUSE_MAPX(_i) (0x1402708 + ((_i) * 0x40000))
43 #define UCD_SE_EID_UCODE_BLOCK_NUMX(_i) (0x12C0000 + ((_i) * 0x1000))
44 #define UCD_AE_EID_UCODE_BLOCK_NUMX(_i) (0x12C0008 + ((_i) * 0x800))
45 #define UCD_UCODE_LOAD_BLOCK_NUM 0x12C0010
46 #define UCD_UCODE_LOAD_IDX_DATAX(_i) (0x12C0018 + ((_i) * 0x20))
47 #define UCD_SE_CNTX(_i) (0x12C0040 + ((_i) * 0x1000))
48 #define UCD_AE_CNTX(_i) (0x12C0048 + ((_i) * 0x800))
51 #define AQM_CTL 0x1300000
52 #define AQM_INT 0x1300008
53 #define AQM_DBELL_OVF_LO 0x1300010
54 #define AQM_DBELL_OVF_HI 0x1300018
55 #define AQM_DBELL_OVF_LO_W1S 0x1300020
56 #define AQM_DBELL_OVF_LO_ENA_W1C 0x1300028
57 #define AQM_DBELL_OVF_LO_ENA_W1S 0x1300030
58 #define AQM_DBELL_OVF_HI_W1S 0x1300038
59 #define AQM_DBELL_OVF_HI_ENA_W1C 0x1300040
60 #define AQM_DBELL_OVF_HI_ENA_W1S 0x1300048
61 #define AQM_DMA_RD_ERR_LO 0x1300050
62 #define AQM_DMA_RD_ERR_HI 0x1300058
63 #define AQM_DMA_RD_ERR_LO_W1S 0x1300060
64 #define AQM_DMA_RD_ERR_LO_ENA_W1C 0x1300068
65 #define AQM_DMA_RD_ERR_LO_ENA_W1S 0x1300070
66 #define AQM_DMA_RD_ERR_HI_W1S 0x1300078
67 #define AQM_DMA_RD_ERR_HI_ENA_W1C 0x1300080
68 #define AQM_DMA_RD_ERR_HI_ENA_W1S 0x1300088
69 #define AQM_EXEC_NA_LO 0x1300090
70 #define AQM_EXEC_NA_HI 0x1300098
71 #define AQM_EXEC_NA_LO_W1S 0x13000A0
72 #define AQM_EXEC_NA_LO_ENA_W1C 0x13000A8
73 #define AQM_EXEC_NA_LO_ENA_W1S 0x13000B0
74 #define AQM_EXEC_NA_HI_W1S 0x13000B8
75 #define AQM_EXEC_NA_HI_ENA_W1C 0x13000C0
76 #define AQM_EXEC_NA_HI_ENA_W1S 0x13000C8
77 #define AQM_EXEC_ERR_LO 0x13000D0
78 #define AQM_EXEC_ERR_HI 0x13000D8
79 #define AQM_EXEC_ERR_LO_W1S 0x13000E0
80 #define AQM_EXEC_ERR_LO_ENA_W1C 0x13000E8
81 #define AQM_EXEC_ERR_LO_ENA_W1S 0x13000F0
82 #define AQM_EXEC_ERR_HI_W1S 0x13000F8
83 #define AQM_EXEC_ERR_HI_ENA_W1C 0x1300100
84 #define AQM_EXEC_ERR_HI_ENA_W1S 0x1300108
85 #define AQM_ECC_INT 0x1300110
86 #define AQM_ECC_INT_W1S 0x1300118
87 #define AQM_ECC_INT_ENA_W1C 0x1300120
88 #define AQM_ECC_INT_ENA_W1S 0x1300128
89 #define AQM_ECC_CTL 0x1300130
90 #define AQM_BIST_STATUS 0x1300138
91 #define AQM_CMD_INF_THRX(x) (0x1300400 + ((x) * 0x8))
92 #define AQM_CMD_INFX(x) (0x1300800 + ((x) * 0x8))
93 #define AQM_GRP_EXECMSK_LOX(x) (0x1300C00 + ((x) * 0x10))
94 #define AQM_GRP_EXECMSK_HIX(x) (0x1300C08 + ((x) * 0x10))
95 #define AQM_ACTIVITY_STAT_LO 0x1300C80
96 #define AQM_ACTIVITY_STAT_HI 0x1300C88
97 #define AQM_Q_CMD_PROCX(x) (0x1301000 + ((x) * 0x8))
98 #define AQM_PERF_CTL_LO 0x1301400
99 #define AQM_PERF_CTL_HI 0x1301408
100 #define AQM_PERF_CNT 0x1301410
102 #define AQMQ_DRBLX(x) (0x20000 + ((x) * 0x40000))
103 #define AQMQ_QSZX(x) (0x20008 + ((x) * 0x40000))
104 #define AQMQ_BADRX(x) (0x20010 + ((x) * 0x40000))
105 #define AQMQ_NXT_CMDX(x) (0x20018 + ((x) * 0x40000))
106 #define AQMQ_CMD_CNTX(x) (0x20020 + ((x) * 0x40000))
107 #define AQMQ_CMP_THRX(x) (0x20028 + ((x) * 0x40000))
108 #define AQMQ_CMP_CNTX(x) (0x20030 + ((x) * 0x40000))
109 #define AQMQ_TIM_LDX(x) (0x20038 + ((x) * 0x40000))
110 #define AQMQ_TIMERX(x) (0x20040 + ((x) * 0x40000))
111 #define AQMQ_ENX(x) (0x20048 + ((x) * 0x40000))
112 #define AQMQ_ACTIVITY_STATX(x) (0x20050 + ((x) * 0x40000))
113 #define AQM_VF_CMP_STATX(x) (0x28000 + ((x) * 0x40000))
115 /* NPS core registers */
116 #define NPS_CORE_GBL_VFCFG 0x1000000
117 #define NPS_CORE_CONTROL 0x1000008
118 #define NPS_CORE_INT_ACTIVE 0x1000080
119 #define NPS_CORE_INT 0x10000A0
120 #define NPS_CORE_INT_ENA_W1S 0x10000B8
121 #define NPS_STATS_PKT_DMA_RD_CNT 0x1000180
122 #define NPS_STATS_PKT_DMA_WR_CNT 0x1000190
124 /* NPS packet registers */
125 #define NPS_PKT_INT 0x1040018
126 #define NPS_PKT_MBOX_INT_LO 0x1040020
127 #define NPS_PKT_MBOX_INT_LO_ENA_W1C 0x1040030
128 #define NPS_PKT_MBOX_INT_LO_ENA_W1S 0x1040038
129 #define NPS_PKT_MBOX_INT_HI 0x1040040
130 #define NPS_PKT_MBOX_INT_HI_ENA_W1C 0x1040050
131 #define NPS_PKT_MBOX_INT_HI_ENA_W1S 0x1040058
132 #define NPS_PKT_IN_RERR_HI 0x1040108
133 #define NPS_PKT_IN_RERR_HI_ENA_W1S 0x1040120
134 #define NPS_PKT_IN_RERR_LO 0x1040128
135 #define NPS_PKT_IN_RERR_LO_ENA_W1S 0x1040140
136 #define NPS_PKT_IN_ERR_TYPE 0x1040148
137 #define NPS_PKT_IN_ERR_TYPE_ENA_W1S 0x1040160
138 #define NPS_PKT_IN_INSTR_CTLX(_i) (0x10060 + ((_i) * 0x40000))
139 #define NPS_PKT_IN_INSTR_BADDRX(_i) (0x10068 + ((_i) * 0x40000))
140 #define NPS_PKT_IN_INSTR_RSIZEX(_i) (0x10070 + ((_i) * 0x40000))
141 #define NPS_PKT_IN_DONE_CNTSX(_i) (0x10080 + ((_i) * 0x40000))
142 #define NPS_PKT_IN_INSTR_BAOFF_DBELLX(_i) (0x10078 + ((_i) * 0x40000))
143 #define NPS_PKT_IN_INT_LEVELSX(_i) (0x10088 + ((_i) * 0x40000))
145 #define NPS_PKT_SLC_RERR_HI 0x1040208
146 #define NPS_PKT_SLC_RERR_HI_ENA_W1S 0x1040220
147 #define NPS_PKT_SLC_RERR_LO 0x1040228
148 #define NPS_PKT_SLC_RERR_LO_ENA_W1S 0x1040240
149 #define NPS_PKT_SLC_ERR_TYPE 0x1040248
150 #define NPS_PKT_SLC_ERR_TYPE_ENA_W1S 0x1040260
151 /* Mailbox PF->VF PF Accessible Data registers */
152 #define NPS_PKT_MBOX_PF_VF_PFDATAX(_i) (0x1040800 + ((_i) * 0x8))
153 #define NPS_PKT_MBOX_VF_PF_PFDATAX(_i) (0x1040C00 + ((_i) * 0x8))
155 #define NPS_PKT_SLC_CTLX(_i) (0x10000 + ((_i) * 0x40000))
156 #define NPS_PKT_SLC_CNTSX(_i) (0x10008 + ((_i) * 0x40000))
157 #define NPS_PKT_SLC_INT_LEVELSX(_i) (0x10010 + ((_i) * 0x40000))
160 #define POM_INT_ENA_W1S 0x11C0018
161 #define POM_GRP_EXECMASKX(_i) (0x11C1100 | ((_i) * 8))
162 #define POM_INT 0x11C0000
163 #define POM_PERF_CTL 0x11CC400
166 #define BMI_INT 0x1140000
167 #define BMI_CTL 0x1140020
168 #define BMI_INT_ENA_W1S 0x1140018
169 #define BMI_NPS_PKT_CNT 0x1140070
172 #define EFL_CORE_INT_ENA_W1SX(_i) (0x1240018 + ((_i) * 0x400))
173 #define EFL_CORE_VF_ERR_INT0X(_i) (0x1240050 + ((_i) * 0x400))
174 #define EFL_CORE_VF_ERR_INT0_ENA_W1SX(_i) (0x1240068 + ((_i) * 0x400))
175 #define EFL_CORE_VF_ERR_INT1X(_i) (0x1240070 + ((_i) * 0x400))
176 #define EFL_CORE_VF_ERR_INT1_ENA_W1SX(_i) (0x1240088 + ((_i) * 0x400))
177 #define EFL_CORE_SE_ERR_INTX(_i) (0x12400A0 + ((_i) * 0x400))
178 #define EFL_RNM_CTL_STATUS 0x1241800
179 #define EFL_CORE_INTX(_i) (0x1240000 + ((_i) * 0x400))
182 #define BMO_CTL2 0x1180028
183 #define BMO_NPS_SLC_PKT_CNT 0x1180078
186 #define LBC_INT 0x1200000
187 #define LBC_INVAL_CTL 0x1201010
188 #define LBC_PLM_VF1_64_INT 0x1202008
189 #define LBC_INVAL_STATUS 0x1202010
190 #define LBC_INT_ENA_W1S 0x1203000
191 #define LBC_PLM_VF1_64_INT_ENA_W1S 0x1205008
192 #define LBC_PLM_VF65_128_INT 0x1206008
193 #define LBC_ELM_VF1_64_INT 0x1208000
194 #define LBC_PLM_VF65_128_INT_ENA_W1S 0x1209008
195 #define LBC_ELM_VF1_64_INT_ENA_W1S 0x120B000
196 #define LBC_ELM_VF65_128_INT 0x120C000
197 #define LBC_ELM_VF65_128_INT_ENA_W1S 0x120F000
199 #define RST_BOOT 0x10C1600
200 #define FUS_DAT1 0x10C1408
203 #define PEM0_INT 0x1080428
206 * struct ucd_core_eid_ucode_block_num - Core Eid to Ucode Blk Mapping Registers
207 * @ucode_len: Ucode length identifier 32KB or 64KB
208 * @ucode_blk: Ucode Block Number
210 union ucd_core_eid_ucode_block_num
{
213 #if (defined(__BIG_ENDIAN_BITFIELD))
226 * struct aqm_grp_execmsk_lo - Available AE engines for the group
227 * @exec_0_to_39: AE engines 0 to 39 status
229 union aqm_grp_execmsk_lo
{
232 #if (defined(__BIG_ENDIAN_BITFIELD))
234 u64 exec_0_to_39
: 40;
236 u64 exec_0_to_39
: 40;
243 * struct aqm_grp_execmsk_hi - Available AE engines for the group
244 * @exec_40_to_79: AE engines 40 to 79 status
246 union aqm_grp_execmsk_hi
{
249 #if (defined(__BIG_ENDIAN_BITFIELD))
251 u64 exec_40_to_79
: 40;
253 u64 exec_40_to_79
: 40;
260 * struct aqmq_drbl - AQM Queue Doorbell Counter Registers
261 * @dbell_count: Doorbell Counter
266 #if (defined(__BIG_ENDIAN_BITFIELD))
268 u64 dbell_count
: 32;
270 u64 dbell_count
: 32;
277 * struct aqmq_qsz - AQM Queue Host Queue Size Registers
278 * @host_queue_size: Size, in numbers of 'aqmq_command_s' command
284 #if (defined(__BIG_ENDIAN_BITFIELD))
286 u64 host_queue_size
: 32;
288 u64 host_queue_size
: 32;
295 * struct aqmq_cmp_thr - AQM Queue Commands Completed Threshold Registers
296 * @commands_completed_threshold: Count of 'aqmq_command_s' commands executed
297 * by AE engines for which completion interrupt is asserted.
302 #if (defined(__BIG_ENDIAN_BITFIELD))
304 u64 commands_completed_threshold
: 32;
306 u64 commands_completed_threshold
: 32;
313 * struct aqmq_cmp_cnt - AQM Queue Commands Completed Count Registers
314 * @resend: Bit to request completion interrupt Resend.
315 * @completion_status: Command completion status of the ring.
316 * @commands_completed_count: Count of 'aqmq_command_s' commands executed by
322 #if (defined(__BIG_ENDIAN_BITFIELD))
325 u64 completion_status
: 1;
326 u64 commands_completed_count
: 32;
328 u64 commands_completed_count
: 32;
329 u64 completion_status
: 1;
337 * struct aqmq_en - AQM Queue Enable Registers
338 * @queue_status: 1 = AQMQ is enabled, 0 = AQMQ is disabled
343 #if (defined(__BIG_ENDIAN_BITFIELD))
345 u64 queue_enable
: 1;
347 u64 queue_enable
: 1;
354 * struct aqmq_activity_stat - AQM Queue Activity Status Registers
355 * @queue_active: 1 = AQMQ is active, 0 = AQMQ is quiescent
357 union aqmq_activity_stat
{
360 #if (defined(__BIG_ENDIAN_BITFIELD))
362 u64 queue_active
: 1;
364 u64 queue_active
: 1;
371 * struct emu_fuse_map - EMU Fuse Map Registers
372 * @ae_fuse: Fuse settings for AE 19..0
373 * @se_fuse: Fuse settings for SE 15..0
375 * A set bit indicates the unit is fuse disabled.
380 #if (defined(__BIG_ENDIAN_BITFIELD))
397 * struct emu_se_enable - Symmetric Engine Enable Registers
398 * @enable: Individual enables for each of the clusters
399 * 16 symmetric engines.
401 union emu_se_enable
{
404 #if (defined(__BIG_ENDIAN_BITFIELD))
415 * struct emu_ae_enable - EMU Asymmetric engines.
416 * @enable: Individual enables for each of the cluster's
417 * 20 Asymmetric Engines.
419 union emu_ae_enable
{
422 #if (defined(__BIG_ENDIAN_BITFIELD))
433 * struct emu_wd_int_ena_w1s - EMU Interrupt Enable Registers
434 * @ae_wd: Reads or sets enable for EMU(0..3)_WD_INT[AE_WD]
435 * @se_wd: Reads or sets enable for EMU(0..3)_WD_INT[SE_WD]
437 union emu_wd_int_ena_w1s
{
440 #if (defined(__BIG_ENDIAN_BITFIELD))
455 * struct emu_ge_int_ena_w1s - EMU Interrupt Enable set registers
456 * @ae_ge: Reads or sets enable for EMU(0..3)_GE_INT[AE_GE]
457 * @se_ge: Reads or sets enable for EMU(0..3)_GE_INT[SE_GE]
459 union emu_ge_int_ena_w1s
{
462 #if (defined(__BIG_ENDIAN_BITFIELD))
477 * struct nps_pkt_slc_ctl - Solicited Packet Out Control Registers
478 * @rh: Indicates whether to remove or include the response header
479 * 1 = Include, 0 = Remove
480 * @z: If set, 8 trailing 0x00 bytes will be added to the end of the
482 * @enb: Enable for this port.
484 union nps_pkt_slc_ctl
{
487 #if defined(__BIG_ENDIAN_BITFIELD)
502 * struct nps_pkt_slc_cnts - Solicited Packet Out Count Registers
503 * @slc_int: Returns a 1 when:
504 * NPS_PKT_SLC(i)_CNTS[CNT] > NPS_PKT_SLC(i)_INT_LEVELS[CNT], or
505 * NPS_PKT_SLC(i)_CNTS[TIMER] > NPS_PKT_SLC(i)_INT_LEVELS[TIMET].
506 * To clear the bit, the CNTS register must be written to clear.
507 * @in_int: Returns a 1 when:
508 * NPS_PKT_IN(i)_DONE_CNTS[CNT] > NPS_PKT_IN(i)_INT_LEVELS[CNT].
509 * To clear the bit, the DONE_CNTS register must be written to clear.
510 * @mbox_int: Returns a 1 when:
511 * NPS_PKT_MBOX_PF_VF(i)_INT[INTR] is set. To clear the bit,
512 * write NPS_PKT_MBOX_PF_VF(i)_INT[INTR] with 1.
513 * @timer: Timer, incremented every 2048 coprocessor clock cycles
514 * when [CNT] is not zero. The hardware clears both [TIMER] and
515 * [INT] when [CNT] goes to 0.
516 * @cnt: Packet counter. Hardware adds to [CNT] as it sends packets out.
517 * On a write to this CSR, hardware subtracts the amount written to the
518 * [CNT] field from [CNT].
520 union nps_pkt_slc_cnts
{
523 #if defined(__BIG_ENDIAN_BITFIELD)
546 * struct nps_pkt_slc_int_levels - Solicited Packet Out Interrupt Levels
548 * @bmode: Determines whether NPS_PKT_SLC_CNTS[CNT] is a byte or
550 * @timet: Output port counter time interrupt threshold.
551 * @cnt: Output port counter interrupt threshold.
553 union nps_pkt_slc_int_levels
{
556 #if defined(__BIG_ENDIAN_BITFIELD)
571 * struct nps_pkt_inst - NPS Packet Interrupt Register
572 * @in_err: Set when any NPS_PKT_IN_RERR_HI/LO bit and
573 * corresponding NPS_PKT_IN_RERR_*_ENA_* bit are bot set.
574 * @uns_err: Set when any NSP_PKT_UNS_RERR_HI/LO bit and
575 * corresponding NPS_PKT_UNS_RERR_*_ENA_* bit are both set.
576 * @slc_er: Set when any NSP_PKT_SLC_RERR_HI/LO bit and
577 * corresponding NPS_PKT_SLC_RERR_*_ENA_* bit are both set.
582 #if defined(__BIG_ENDIAN_BITFIELD)
611 * struct nps_pkt_in_done_cnts - Input instruction ring counts registers
612 * @slc_cnt: Returns a 1 when:
613 * NPS_PKT_SLC(i)_CNTS[CNT] > NPS_PKT_SLC(i)_INT_LEVELS[CNT], or
614 * NPS_PKT_SLC(i)_CNTS[TIMER] > NPS_PKT_SCL(i)_INT_LEVELS[TIMET]
615 * To clear the bit, the CNTS register must be
616 * written to clear the underlying condition
617 * @uns_int: Return a 1 when:
618 * NPS_PKT_UNS(i)_CNTS[CNT] > NPS_PKT_UNS(i)_INT_LEVELS[CNT], or
619 * NPS_PKT_UNS(i)_CNTS[TIMER] > NPS_PKT_UNS(i)_INT_LEVELS[TIMET]
620 * To clear the bit, the CNTS register must be
621 * written to clear the underlying condition
622 * @in_int: Returns a 1 when:
623 * NPS_PKT_IN(i)_DONE_CNTS[CNT] > NPS_PKT_IN(i)_INT_LEVELS[CNT]
624 * To clear the bit, the DONE_CNTS register
625 * must be written to clear the underlying condition
626 * @mbox_int: Returns a 1 when:
627 * NPS_PKT_MBOX_PF_VF(i)_INT[INTR] is set.
628 * To clear the bit, write NPS_PKT_MBOX_PF_VF(i)_INT[INTR]
630 * @resend: A write of 1 will resend an MSI-X interrupt message if any
631 * of the following conditions are true for this ring "i".
632 * NPS_PKT_SLC(i)_CNTS[CNT] > NPS_PKT_SLC(i)_INT_LEVELS[CNT]
633 * NPS_PKT_SLC(i)_CNTS[TIMER] > NPS_PKT_SLC(i)_INT_LEVELS[TIMET]
634 * NPS_PKT_UNS(i)_CNTS[CNT] > NPS_PKT_UNS(i)_INT_LEVELS[CNT]
635 * NPS_PKT_UNS(i)_CNTS[TIMER] > NPS_PKT_UNS(i)_INT_LEVELS[TIMET]
636 * NPS_PKT_IN(i)_DONE_CNTS[CNT] > NPS_PKT_IN(i)_INT_LEVELS[CNT]
637 * NPS_PKT_MBOX_PF_VF(i)_INT[INTR] is set
638 * @cnt: Packet counter. Hardware adds to [CNT] as it reads
639 * packets. On a write to this CSR, hardware substracts the
640 * amount written to the [CNT] field from [CNT], which will
641 * clear PKT_IN(i)_INT_STATUS[INTR] if [CNT] becomes <=
642 * NPS_PKT_IN(i)_INT_LEVELS[CNT]. This register should be
643 * cleared before enabling a ring by reading the current
644 * value and writing it back.
646 union nps_pkt_in_done_cnts
{
649 #if defined(__BIG_ENDIAN_BITFIELD)
670 * struct nps_pkt_in_instr_ctl - Input Instruction Ring Control Registers.
671 * @is64b: If 1, the ring uses 64-byte instructions. If 0, the
672 * ring uses 32-byte instructions.
673 * @enb: Enable for the input ring.
675 union nps_pkt_in_instr_ctl
{
678 #if (defined(__BIG_ENDIAN_BITFIELD))
691 * struct nps_pkt_in_instr_rsize - Input instruction ring size registers
692 * @rsize: Ring size (number of instructions)
694 union nps_pkt_in_instr_rsize
{
697 #if (defined(__BIG_ENDIAN_BITFIELD))
708 * struct nps_pkt_in_instr_baoff_dbell - Input instruction ring
709 * base address offset and doorbell registers
710 * @aoff: Address offset. The offset from the NPS_PKT_IN_INSTR_BADDR
711 * where the next pointer is read.
712 * @dbell: Pointer list doorbell count. Write operations to this field
713 * increments the present value here. Read operations return the
716 union nps_pkt_in_instr_baoff_dbell
{
719 #if (defined(__BIG_ENDIAN_BITFIELD))
730 * struct nps_core_int_ena_w1s - NPS core interrupt enable set register
731 * @host_nps_wr_err: Reads or sets enable for
732 * NPS_CORE_INT[HOST_NPS_WR_ERR].
733 * @npco_dma_malform: Reads or sets enable for
734 * NPS_CORE_INT[NPCO_DMA_MALFORM].
735 * @exec_wr_timeout: Reads or sets enable for
736 * NPS_CORE_INT[EXEC_WR_TIMEOUT].
737 * @host_wr_timeout: Reads or sets enable for
738 * NPS_CORE_INT[HOST_WR_TIMEOUT].
739 * @host_wr_err: Reads or sets enable for
740 * NPS_CORE_INT[HOST_WR_ERR]
742 union nps_core_int_ena_w1s
{
745 #if (defined(__BIG_ENDIAN_BITFIELD))
747 u64 host_nps_wr_err
: 1;
748 u64 npco_dma_malform
: 1;
749 u64 exec_wr_timeout
: 1;
750 u64 host_wr_timeout
: 1;
762 u64 host_wr_timeout
: 1;
763 u64 exec_wr_timeout
: 1;
764 u64 npco_dma_malform
: 1;
765 u64 host_nps_wr_err
: 1;
772 * struct nps_core_gbl_vfcfg - Global VF Configuration Register.
773 * @ilk_disable: When set, this bit indicates that the ILK interface has
775 * @obaf: BMO allocation control
776 * 0 = allocate per queue
777 * 1 = allocate per VF
778 * @ibaf: BMI allocation control
779 * 0 = allocate per queue
780 * 1 = allocate per VF
781 * @zaf: ZIP allocation control
782 * 0 = allocate per queue
783 * 1 = allocate per VF
784 * @aeaf: AE allocation control
785 * 0 = allocate per queue
786 * 1 = allocate per VF
787 * @seaf: SE allocation control
788 * 0 = allocation per queue
789 * 1 = allocate per VF
792 union nps_core_gbl_vfcfg
{
795 #if (defined(__BIG_ENDIAN_BITFIELD))
818 * struct nps_core_int_active - NPS Core Interrupt Active Register
819 * @resend: Resend MSI-X interrupt if needs to handle interrupts
820 * Sofware can set this bit and then exit the ISR.
821 * @ocla: Set when any OCLA(0)_INT and corresponding OCLA(0_INT_ENA_W1C
823 * @mbox: Set when any NPS_PKT_MBOX_INT_LO/HI and corresponding
824 * NPS_PKT_MBOX_INT_LO_ENA_W1C/HI_ENA_W1C bits are set
825 * @emu: bit i is set in [EMU] when any EMU(i)_INT bit is set
826 * @bmo: Set when any BMO_INT bit is set
827 * @bmi: Set when any BMI_INT bit is set or when any non-RO
828 * BMI_INT and corresponding BMI_INT_ENA_W1C bits are both set
829 * @aqm: Set when any AQM_INT bit is set
830 * @zqm: Set when any ZQM_INT bit is set
831 * @efl: Set when any EFL_INT RO bit is set or when any non-RO EFL_INT
832 * and corresponding EFL_INT_ENA_W1C bits are both set
833 * @ilk: Set when any ILK_INT bit is set
834 * @lbc: Set when any LBC_INT RO bit is set or when any non-RO LBC_INT
835 * and corresponding LBC_INT_ENA_W1C bits are bot set
836 * @pem: Set when any PEM(0)_INT RO bit is set or when any non-RO
837 * PEM(0)_INT and corresponding PEM(0)_INT_ENA_W1C bit are both set
838 * @ucd: Set when any UCD_INT bit is set
839 * @zctl: Set when any ZIP_INT RO bit is set or when any non-RO ZIP_INT
840 * and corresponding ZIP_INT_ENA_W1C bits are both set
841 * @lbm: Set when any LBM_INT bit is set
842 * @nps_pkt: Set when any NPS_PKT_INT bit is set
843 * @nps_core: Set when any NPS_CORE_INT RO bit is set or when non-RO
844 * NPS_CORE_INT and corresponding NSP_CORE_INT_ENA_W1C bits are both set
846 union nps_core_int_active
{
849 #if (defined(__BIG_ENDIAN_BITFIELD))
894 * struct efl_core_int - EFL Interrupt Registers
895 * @epci_decode_err: EPCI decoded a transacation that was unknown
896 * This error should only occurred when there is a micrcode/SE error
897 * and should be considered fatal
898 * @ae_err: An AE uncorrectable error occurred.
899 * See EFL_CORE(0..3)_AE_ERR_INT
900 * @se_err: An SE uncorrectable error occurred.
901 * See EFL_CORE(0..3)_SE_ERR_INT
902 * @dbe: Double-bit error occurred in EFL
903 * @sbe: Single-bit error occurred in EFL
904 * @d_left: Asserted when new POM-Header-BMI-data is
905 * being sent to an Exec, and that Exec has Not read all BMI
906 * data associated with the previous POM header
907 * @len_ovr: Asserted when an Exec-Read is issued that is more than
908 * 14 greater in length that the BMI data left to be read
913 #if (defined(__BIG_ENDIAN_BITFIELD))
915 u64 epci_decode_err
: 1;
929 u64 epci_decode_err
: 1;
936 * struct efl_core_int_ena_w1s - EFL core interrupt enable set register
937 * @epci_decode_err: Reads or sets enable for
938 * EFL_CORE(0..3)_INT[EPCI_DECODE_ERR].
939 * @d_left: Reads or sets enable for
940 * EFL_CORE(0..3)_INT[D_LEFT].
941 * @len_ovr: Reads or sets enable for
942 * EFL_CORE(0..3)_INT[LEN_OVR].
944 union efl_core_int_ena_w1s
{
947 #if (defined(__BIG_ENDIAN_BITFIELD))
949 u64 epci_decode_err
: 1;
957 u64 epci_decode_err
: 1;
964 * struct efl_rnm_ctl_status - RNM Control and Status Register
965 * @ent_sel: Select input to RNM FIFO
966 * @exp_ent: Exported entropy enable for random number generator
967 * @rng_rst: Reset to RNG. Setting this bit to 1 cancels the generation
968 * of the current random number.
969 * @rnm_rst: Reset the RNM. Setting this bit to 1 clears all sorted numbers
970 * in the random number memory.
971 * @rng_en: Enabled the output of the RNG.
972 * @ent_en: Entropy enable for random number generator.
974 union efl_rnm_ctl_status
{
977 #if (defined(__BIG_ENDIAN_BITFIELD))
998 * struct bmi_ctl - BMI control register
999 * @ilk_hdrq_thrsh: Maximum number of header queue locations
1000 * that ILK packets may consume. When the threshold is
1001 * exceeded ILK_XOFF is sent to the BMI_X2P_ARB.
1002 * @nps_hdrq_thrsh: Maximum number of header queue locations
1003 * that NPS packets may consume. When the threshold is
1004 * exceeded NPS_XOFF is sent to the BMI_X2P_ARB.
1005 * @totl_hdrq_thrsh: Maximum number of header queue locations
1006 * that the sum of ILK and NPS packets may consume.
1007 * @ilk_free_thrsh: Maximum number of buffers that ILK packet
1008 * flows may consume before ILK_XOFF is sent to the BMI_X2P_ARB.
1009 * @nps_free_thrsh: Maximum number of buffers that NPS packet
1010 * flows may consume before NPS XOFF is sent to the BMI_X2p_ARB.
1011 * @totl_free_thrsh: Maximum number of buffers that bot ILK and NPS
1012 * packet flows may consume before both NPS_XOFF and ILK_XOFF
1013 * are asserted to the BMI_X2P_ARB.
1014 * @max_pkt_len: Maximum packet length, integral number of 256B
1020 #if (defined(__BIG_ENDIAN_BITFIELD))
1022 u64 ilk_hdrq_thrsh
: 8;
1023 u64 nps_hdrq_thrsh
: 8;
1024 u64 totl_hdrq_thrsh
: 8;
1025 u64 ilk_free_thrsh
: 8;
1026 u64 nps_free_thrsh
: 8;
1027 u64 totl_free_thrsh
: 8;
1028 u64 max_pkt_len
: 8;
1030 u64 max_pkt_len
: 8;
1031 u64 totl_free_thrsh
: 8;
1032 u64 nps_free_thrsh
: 8;
1033 u64 ilk_free_thrsh
: 8;
1034 u64 totl_hdrq_thrsh
: 8;
1035 u64 nps_hdrq_thrsh
: 8;
1036 u64 ilk_hdrq_thrsh
: 8;
1043 * struct bmi_int_ena_w1s - BMI interrupt enable set register
1044 * @ilk_req_oflw: Reads or sets enable for
1045 * BMI_INT[ILK_REQ_OFLW].
1046 * @nps_req_oflw: Reads or sets enable for
1047 * BMI_INT[NPS_REQ_OFLW].
1048 * @fpf_undrrn: Reads or sets enable for
1049 * BMI_INT[FPF_UNDRRN].
1050 * @eop_err_ilk: Reads or sets enable for
1051 * BMI_INT[EOP_ERR_ILK].
1052 * @eop_err_nps: Reads or sets enable for
1053 * BMI_INT[EOP_ERR_NPS].
1054 * @sop_err_ilk: Reads or sets enable for
1055 * BMI_INT[SOP_ERR_ILK].
1056 * @sop_err_nps: Reads or sets enable for
1057 * BMI_INT[SOP_ERR_NPS].
1058 * @pkt_rcv_err_ilk: Reads or sets enable for
1059 * BMI_INT[PKT_RCV_ERR_ILK].
1060 * @pkt_rcv_err_nps: Reads or sets enable for
1061 * BMI_INT[PKT_RCV_ERR_NPS].
1062 * @max_len_err_ilk: Reads or sets enable for
1063 * BMI_INT[MAX_LEN_ERR_ILK].
1064 * @max_len_err_nps: Reads or sets enable for
1065 * BMI_INT[MAX_LEN_ERR_NPS].
1067 union bmi_int_ena_w1s
{
1070 #if (defined(__BIG_ENDIAN_BITFIELD))
1072 u64 ilk_req_oflw
: 1;
1073 u64 nps_req_oflw
: 1;
1077 u64 eop_err_ilk
: 1;
1078 u64 eop_err_nps
: 1;
1079 u64 sop_err_ilk
: 1;
1080 u64 sop_err_nps
: 1;
1081 u64 pkt_rcv_err_ilk
: 1;
1082 u64 pkt_rcv_err_nps
: 1;
1083 u64 max_len_err_ilk
: 1;
1084 u64 max_len_err_nps
: 1;
1086 u64 max_len_err_nps
: 1;
1087 u64 max_len_err_ilk
: 1;
1088 u64 pkt_rcv_err_nps
: 1;
1089 u64 pkt_rcv_err_ilk
: 1;
1090 u64 sop_err_nps
: 1;
1091 u64 sop_err_ilk
: 1;
1092 u64 eop_err_nps
: 1;
1093 u64 eop_err_ilk
: 1;
1097 u64 nps_req_oflw
: 1;
1098 u64 ilk_req_oflw
: 1;
1105 * struct bmo_ctl2 - BMO Control2 Register
1106 * @arb_sel: Determines P2X Arbitration
1107 * @ilk_buf_thrsh: Maximum number of buffers that the
1108 * ILK packet flows may consume before ILK XOFF is
1109 * asserted to the POM.
1110 * @nps_slc_buf_thrsh: Maximum number of buffers that the
1111 * NPS_SLC packet flow may consume before NPS_SLC XOFF is
1112 * asserted to the POM.
1113 * @nps_uns_buf_thrsh: Maximum number of buffers that the
1114 * NPS_UNS packet flow may consume before NPS_UNS XOFF is
1115 * asserted to the POM.
1116 * @totl_buf_thrsh: Maximum number of buffers that ILK, NPS_UNS and
1117 * NPS_SLC packet flows may consume before NPS_UNS XOFF, NSP_SLC and
1118 * ILK_XOFF are all asserted POM.
1123 #if (defined(__BIG_ENDIAN_BITFIELD))
1126 u64 ilk_buf_thrsh
: 8;
1127 u64 nps_slc_buf_thrsh
: 8;
1128 u64 nps_uns_buf_thrsh
: 8;
1129 u64 totl_buf_thrsh
: 8;
1131 u64 totl_buf_thrsh
: 8;
1132 u64 nps_uns_buf_thrsh
: 8;
1133 u64 nps_slc_buf_thrsh
: 8;
1134 u64 ilk_buf_thrsh
: 8;
1142 * struct pom_int_ena_w1s - POM interrupt enable set register
1143 * @illegal_intf: Reads or sets enable for POM_INT[ILLEGAL_INTF].
1144 * @illegal_dport: Reads or sets enable for POM_INT[ILLEGAL_DPORT].
1146 union pom_int_ena_w1s
{
1149 #if (defined(__BIG_ENDIAN_BITFIELD))
1151 u64 illegal_intf
: 1;
1152 u64 illegal_dport
: 1;
1158 u64 illegal_dport
: 1;
1159 u64 illegal_intf
: 1;
1166 * struct lbc_inval_ctl - LBC invalidation control register
1167 * @wait_timer: Wait timer for wait state. [WAIT_TIMER] must
1168 * always be written with its reset value.
1169 * @cam_inval_start: Software should write [CAM_INVAL_START]=1
1170 * to initiate an LBC cache invalidation. After this, software
1171 * should read LBC_INVAL_STATUS until LBC_INVAL_STATUS[DONE] is set.
1172 * LBC hardware clears [CAVM_INVAL_START] before software can
1173 * observed LBC_INVAL_STATUS[DONE] to be set
1175 union lbc_inval_ctl
{
1178 #if (defined(__BIG_ENDIAN_BITFIELD))
1182 u64 cam_inval_start
: 1;
1186 u64 cam_inval_start
: 1;
1195 * struct lbc_int_ena_w1s - LBC interrupt enable set register
1196 * @cam_hard_err: Reads or sets enable for LBC_INT[CAM_HARD_ERR].
1197 * @cam_inval_abort: Reads or sets enable for LBC_INT[CAM_INVAL_ABORT].
1198 * @over_fetch_err: Reads or sets enable for LBC_INT[OVER_FETCH_ERR].
1199 * @cache_line_to_err: Reads or sets enable for
1200 * LBC_INT[CACHE_LINE_TO_ERR].
1201 * @cam_soft_err: Reads or sets enable for
1202 * LBC_INT[CAM_SOFT_ERR].
1203 * @dma_rd_err: Reads or sets enable for
1204 * LBC_INT[DMA_RD_ERR].
1206 union lbc_int_ena_w1s
{
1209 #if (defined(__BIG_ENDIAN_BITFIELD))
1211 u64 cam_hard_err
: 1;
1212 u64 cam_inval_abort
: 1;
1213 u64 over_fetch_err
: 1;
1214 u64 cache_line_to_err
: 1;
1216 u64 cam_soft_err
: 1;
1220 u64 cam_soft_err
: 1;
1222 u64 cache_line_to_err
: 1;
1223 u64 over_fetch_err
: 1;
1224 u64 cam_inval_abort
: 1;
1225 u64 cam_hard_err
: 1;
1232 * struct lbc_int - LBC interrupt summary register
1233 * @cam_hard_err: indicates a fatal hardware error.
1234 * It requires system reset.
1235 * When [CAM_HARD_ERR] is set, LBC stops logging any new information in
1236 * LBC_POM_MISS_INFO_LOG,
1237 * LBC_POM_MISS_ADDR_LOG,
1238 * LBC_EFL_MISS_INFO_LOG, and
1239 * LBC_EFL_MISS_ADDR_LOG.
1240 * Software should sample them.
1241 * @cam_inval_abort: indicates a fatal hardware error.
1242 * System reset is required.
1243 * @over_fetch_err: indicates a fatal hardware error
1244 * System reset is required
1245 * @cache_line_to_err: is a debug feature.
1246 * This timeout interrupt bit tells the software that
1247 * a cacheline in LBC has non-zero usage and the context
1248 * has not been used for greater than the
1249 * LBC_TO_CNT[TO_CNT] time interval.
1250 * @sbe: Memory SBE error. This is recoverable via ECC.
1251 * See LBC_ECC_INT for more details.
1252 * @dbe: Memory DBE error. This is a fatal and requires a
1254 * @pref_dat_len_mismatch_err: Summary bit for context length
1256 * @rd_dat_len_mismatch_err: Summary bit for SE read data length
1257 * greater than data prefect length errors.
1258 * @cam_soft_err: is recoverable. Software must complete a
1259 * LBC_INVAL_CTL[CAM_INVAL_START] invalidation sequence and
1260 * then clear [CAM_SOFT_ERR].
1261 * @dma_rd_err: A context prefect read of host memory returned with
1267 #if (defined(__BIG_ENDIAN_BITFIELD))
1269 u64 cam_hard_err
: 1;
1270 u64 cam_inval_abort
: 1;
1271 u64 over_fetch_err
: 1;
1272 u64 cache_line_to_err
: 1;
1275 u64 pref_dat_len_mismatch_err
: 1;
1276 u64 rd_dat_len_mismatch_err
: 1;
1277 u64 cam_soft_err
: 1;
1281 u64 cam_soft_err
: 1;
1282 u64 rd_dat_len_mismatch_err
: 1;
1283 u64 pref_dat_len_mismatch_err
: 1;
1286 u64 cache_line_to_err
: 1;
1287 u64 over_fetch_err
: 1;
1288 u64 cam_inval_abort
: 1;
1289 u64 cam_hard_err
: 1;
1296 * struct lbc_inval_status: LBC Invalidation status register
1297 * @cam_clean_entry_complete_cnt: The number of entries that are
1298 * cleaned up successfully.
1299 * @cam_clean_entry_cnt: The number of entries that have the CAM
1300 * inval command issued.
1301 * @cam_inval_state: cam invalidation FSM state
1302 * @cam_inval_abort: cam invalidation abort
1303 * @cam_rst_rdy: lbc_cam reset ready
1304 * @done: LBC clears [DONE] when
1305 * LBC_INVAL_CTL[CAM_INVAL_START] is written with a one,
1306 * and sets [DONE] when it completes the invalidation
1309 union lbc_inval_status
{
1312 #if (defined(__BIG_ENDIAN_BITFIELD))
1314 u64 cam_clean_entry_complete_cnt
: 9;
1316 u64 cam_clean_entry_cnt
: 9;
1318 u64 cam_inval_state
: 3;
1320 u64 cam_inval_abort
: 1;
1321 u64 cam_rst_rdy
: 1;
1325 u64 cam_rst_rdy
: 1;
1326 u64 cam_inval_abort
: 1;
1328 u64 cam_inval_state
: 3;
1330 u64 cam_clean_entry_cnt
: 9;
1332 u64 cam_clean_entry_complete_cnt
: 9;
1339 * struct rst_boot: RST Boot Register
1340 * @jtcsrdis: when set, internal CSR access via JTAG TAP controller
1342 * @jt_tst_mode: JTAG test mode
1343 * @io_supply: I/O power supply setting based on IO_VDD_SELECT pin:
1347 * All other values are reserved
1348 * @pnr_mul: clock multiplier
1349 * @lboot: last boot cause mask, resets only with PLL_DC_OK
1350 * @rboot: determines whether core 0 remains in reset after
1351 * chip cold or warm or soft reset
1352 * @rboot_pin: read only access to REMOTE_BOOT pin
1357 #if (defined(__BIG_ENDIAN_BITFIELD))
1361 u64 jt_tst_mode
: 1;
1379 u64 jt_tst_mode
: 1;
1388 * struct fus_dat1: Fuse Data 1 Register
1389 * @pll_mul: main clock PLL multiplier hardware limit
1390 * @pll_half_dis: main clock PLL control
1391 * @efus_lck: efuse lockdown
1392 * @zip_info: ZIP information
1393 * @bar2_sz_conf: when zero, BAR2 size conforms to
1394 * PCIe specification
1395 * @efus_ign: efuse ignore
1396 * @nozip: ZIP disable
1397 * @pll_alt_matrix: select alternate PLL matrix
1398 * @pll_bwadj_denom: select CLKF denominator for
1405 #if (defined(__BIG_ENDIAN_BITFIELD))
1408 u64 pll_half_dis
: 1;
1413 u64 bar2_sz_conf
: 1;
1417 u64 pll_alt_matrix
: 1;
1418 u64 pll_bwadj_denom
: 2;
1422 u64 pll_bwadj_denom
: 2;
1423 u64 pll_alt_matrix
: 1;
1427 u64 bar2_sz_conf
: 1;
1432 u64 pll_half_dis
: 1;
1439 #endif /* __NITROX_CSR_H */