1 #ifndef __ODY_CSRS_NCB_H__
2 #define __ODY_CSRS_NCB_H__
3 /* This file is auto-generated. Do not edit */
4
5 /***********************license start***********************************
6 * Copyright (C) 2021-2026 Marvell.
7 * SPDX-License-Identifier: BSD-3-Clause
8 * https://spdx.org/licenses
9 ***********************license end**************************************/
10
11
12 /**
13 * @file
14 *
15 * Configuration and status register (CSR) address and type definitions for
16 * NCB.
17 *
18 * This file is auto generated. Do not edit.
19 *
20 */
21
22 /**
23 * Enumeration ncb_bar_e
24 *
25 * NCB Base Address Register Enumeration
26 * Enumerates the base address registers.
27 */
28 #define ODY_NCB_BAR_E_NCBX_PF_BAR0(a) (0x87e140000000ll + 0x1000000ll * (a))
29 #define ODY_NCB_BAR_E_NCBX_PF_BAR0_SIZE 0x100000ull
30
31 /**
32 * Enumeration ncb_psb_event_e
33 *
34 * NCB Power Serial Bus Event Enumeration
35 * Enumerates the event numbers for IOB slaves, which correspond to index {b} of
36 * PSBS_SYS()_EVENT()_CFG.
37 */
38 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID0 (2)
39 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID1 (6)
40 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID10 (0x2a)
41 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID11 (0x2e)
42 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID12 (0x32)
43 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID13 (0x36)
44 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID14 (0x3a)
45 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID15 (0x3e)
46 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID2 (0xa)
47 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID3 (0xe)
48 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID4 (0x12)
49 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID5 (0x16)
50 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID6 (0x1a)
51 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID7 (0x1e)
52 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID8 (0x22)
53 #define ODY_NCB_PSB_EVENT_E_NCB_READ_DAT_ARBID9 (0x26)
54 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID0 (0)
55 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID1 (4)
56 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID10 (0x28)
57 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID11 (0x2c)
58 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID12 (0x30)
59 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID13 (0x34)
60 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID14 (0x38)
61 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID15 (0x3c)
62 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID2 (8)
63 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID3 (0xc)
64 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID4 (0x10)
65 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID5 (0x14)
66 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID6 (0x18)
67 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID7 (0x1c)
68 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID8 (0x20)
69 #define ODY_NCB_PSB_EVENT_E_NCB_READ_REQ_ARBID9 (0x24)
70 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID0 (3)
71 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID1 (7)
72 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID10 (0x2b)
73 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID11 (0x2f)
74 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID12 (0x33)
75 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID13 (0x37)
76 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID14 (0x3b)
77 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID15 (0x3f)
78 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID2 (0xb)
79 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID3 (0xf)
80 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID4 (0x13)
81 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID5 (0x17)
82 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID6 (0x1b)
83 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID7 (0x1f)
84 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID8 (0x23)
85 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_DAT_ARBID9 (0x27)
86 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID0 (1)
87 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID1 (5)
88 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID10 (0x29)
89 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID11 (0x2d)
90 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID12 (0x31)
91 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID13 (0x35)
92 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID14 (0x39)
93 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID15 (0x3d)
94 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID2 (9)
95 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID3 (0xd)
96 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID4 (0x11)
97 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID5 (0x15)
98 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID6 (0x19)
99 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID7 (0x1d)
100 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID8 (0x21)
101 #define ODY_NCB_PSB_EVENT_E_NCB_WRITE_REQ_ARBID9 (0x25)
102
103 /**
104 * Register (RSL) ncb#_arb#_crds
105 *
106 * NREQ Priority Register
107 */
108 union ody_ncbx_arbx_crds {
109 uint64_t u;
110 struct ody_ncbx_arbx_crds_s {
111 uint64_t min : 10;
112 uint64_t max : 10;
113 uint64_t rsv_rdstid : 1;
114 uint64_t reserved_21_63 : 43;
115 } s;
116 /* struct ody_ncbx_arbx_crds_s cn; */
117 };
118 typedef union ody_ncbx_arbx_crds ody_ncbx_arbx_crds_t;
119
120 static inline uint64_t ODY_NCBX_ARBX_CRDS(uint64_t a, uint64_t b) __attribute__ ((pure, always_inline));
ODY_NCBX_ARBX_CRDS(uint64_t a,uint64_t b)121 static inline uint64_t ODY_NCBX_ARBX_CRDS(uint64_t a, uint64_t b)
122 {
123 if (((a == 0) || ((a >= 2) && (a <= 5))) && (b <= 15))
124 return 0x87e1400f0000ll + 0x1000000ll * ((a) & 0x7) + 8ll * ((b) & 0xf);
125 __ody_csr_fatal("NCBX_ARBX_CRDS", 2, a, b, 0, 0, 0, 0);
126 }
127
128 #define typedef_ODY_NCBX_ARBX_CRDS(a, b) ody_ncbx_arbx_crds_t
129 #define bustype_ODY_NCBX_ARBX_CRDS(a, b) CSR_TYPE_RSL
130 #define basename_ODY_NCBX_ARBX_CRDS(a, b) "NCBX_ARBX_CRDS"
131 #define device_bar_ODY_NCBX_ARBX_CRDS(a, b) 0x0 /* PF_BAR0 */
132 #define busnum_ODY_NCBX_ARBX_CRDS(a, b) (a)
133 #define arguments_ODY_NCBX_ARBX_CRDS(a, b) (a), (b), -1, -1
134
135 /**
136 * Register (RSL) ncb#_arb_iut_dis
137 *
138 * NCBO ARBID IUT Disable Register
139 * This register enables the uTLB for transactions through each ARBID.
140 */
141 union ody_ncbx_arb_iut_dis {
142 uint64_t u;
143 struct ody_ncbx_arb_iut_dis_s {
144 uint64_t dis : 16;
145 uint64_t reserved_16_63 : 48;
146 } s;
147 /* struct ody_ncbx_arb_iut_dis_s cn; */
148 };
149 typedef union ody_ncbx_arb_iut_dis ody_ncbx_arb_iut_dis_t;
150
151 static inline uint64_t ODY_NCBX_ARB_IUT_DIS(uint64_t a) __attribute__ ((pure, always_inline));
ODY_NCBX_ARB_IUT_DIS(uint64_t a)152 static inline uint64_t ODY_NCBX_ARB_IUT_DIS(uint64_t a)
153 {
154 if ((a == 0) || ((a >= 2) && (a <= 5)))
155 return 0x87e140008080ll + 0x1000000ll * ((a) & 0x7);
156 __ody_csr_fatal("NCBX_ARB_IUT_DIS", 1, a, 0, 0, 0, 0, 0);
157 }
158
159 #define typedef_ODY_NCBX_ARB_IUT_DIS(a) ody_ncbx_arb_iut_dis_t
160 #define bustype_ODY_NCBX_ARB_IUT_DIS(a) CSR_TYPE_RSL
161 #define basename_ODY_NCBX_ARB_IUT_DIS(a) "NCBX_ARB_IUT_DIS"
162 #define device_bar_ODY_NCBX_ARB_IUT_DIS(a) 0x0 /* PF_BAR0 */
163 #define busnum_ODY_NCBX_ARB_IUT_DIS(a) (a)
164 #define arguments_ODY_NCBX_ARB_IUT_DIS(a) (a), -1, -1, -1
165
166 /**
167 * Register (RSL) ncb#_arbid#_ctl
168 *
169 * NCB ARBID Control Registers
170 * This register set properties for each of the flat ARBIDs.
171 */
172 union ody_ncbx_arbidx_ctl {
173 uint64_t u;
174 struct ody_ncbx_arbidx_ctl_s {
175 uint64_t ld_ld_ord : 1;
176 uint64_t st_st_ord : 1;
177 uint64_t st_ld_ord : 1;
178 uint64_t ro_dis : 1;
179 uint64_t pr_iova_dis : 1;
180 uint64_t prefetch_dis : 1;
181 uint64_t crppr_ena : 2;
182 uint64_t sow_dis : 1;
183 uint64_t fast_ord : 1;
184 uint64_t reserved_10_63 : 54;
185 } s;
186 /* struct ody_ncbx_arbidx_ctl_s cn; */
187 };
188 typedef union ody_ncbx_arbidx_ctl ody_ncbx_arbidx_ctl_t;
189
190 static inline uint64_t ODY_NCBX_ARBIDX_CTL(uint64_t a, uint64_t b) __attribute__ ((pure, always_inline));
ODY_NCBX_ARBIDX_CTL(uint64_t a,uint64_t b)191 static inline uint64_t ODY_NCBX_ARBIDX_CTL(uint64_t a, uint64_t b)
192 {
193 if (((a == 0) || ((a >= 2) && (a <= 5))) && (b <= 15))
194 return 0x87e140006100ll + 0x1000000ll * ((a) & 0x7) + 8ll * ((b) & 0xf);
195 __ody_csr_fatal("NCBX_ARBIDX_CTL", 2, a, b, 0, 0, 0, 0);
196 }
197
198 #define typedef_ODY_NCBX_ARBIDX_CTL(a, b) ody_ncbx_arbidx_ctl_t
199 #define bustype_ODY_NCBX_ARBIDX_CTL(a, b) CSR_TYPE_RSL
200 #define basename_ODY_NCBX_ARBIDX_CTL(a, b) "NCBX_ARBIDX_CTL"
201 #define device_bar_ODY_NCBX_ARBIDX_CTL(a, b) 0x0 /* PF_BAR0 */
202 #define busnum_ODY_NCBX_ARBIDX_CTL(a, b) (a)
203 #define arguments_ODY_NCBX_ARBIDX_CTL(a, b) (a), (b), -1, -1
204
205 /**
206 * Register (RSL) ncb#_arbid#_rr_ctl
207 *
208 * NCB Round Robin Control Registers
209 */
210 union ody_ncbx_arbidx_rr_ctl {
211 uint64_t u;
212 struct ody_ncbx_arbidx_rr_ctl_s {
213 uint64_t weight : 4;
214 uint64_t reserved_4_63 : 60;
215 } s;
216 /* struct ody_ncbx_arbidx_rr_ctl_s cn; */
217 };
218 typedef union ody_ncbx_arbidx_rr_ctl ody_ncbx_arbidx_rr_ctl_t;
219
220 static inline uint64_t ODY_NCBX_ARBIDX_RR_CTL(uint64_t a, uint64_t b) __attribute__ ((pure, always_inline));
ODY_NCBX_ARBIDX_RR_CTL(uint64_t a,uint64_t b)221 static inline uint64_t ODY_NCBX_ARBIDX_RR_CTL(uint64_t a, uint64_t b)
222 {
223 if (((a == 0) || ((a >= 2) && (a <= 5))) && (b <= 15))
224 return 0x87e1400f7000ll + 0x1000000ll * ((a) & 0x7) + 8ll * ((b) & 0xf);
225 __ody_csr_fatal("NCBX_ARBIDX_RR_CTL", 2, a, b, 0, 0, 0, 0);
226 }
227
228 #define typedef_ODY_NCBX_ARBIDX_RR_CTL(a, b) ody_ncbx_arbidx_rr_ctl_t
229 #define bustype_ODY_NCBX_ARBIDX_RR_CTL(a, b) CSR_TYPE_RSL
230 #define basename_ODY_NCBX_ARBIDX_RR_CTL(a, b) "NCBX_ARBIDX_RR_CTL"
231 #define device_bar_ODY_NCBX_ARBIDX_RR_CTL(a, b) 0x0 /* PF_BAR0 */
232 #define busnum_ODY_NCBX_ARBIDX_RR_CTL(a, b) (a)
233 #define arguments_ODY_NCBX_ARBIDX_RR_CTL(a, b) (a), (b), -1, -1
234
235 /**
236 * Register (RSL) ncb#_ctl
237 *
238 * NCB Control Registers
239 */
240 union ody_ncbx_ctl {
241 uint64_t u;
242 struct ody_ncbx_ctl_s {
243 uint64_t cal : 1;
244 uint64_t dis : 1;
245 uint64_t reserved_2_63 : 62;
246 } s;
247 /* struct ody_ncbx_ctl_s cn; */
248 };
249 typedef union ody_ncbx_ctl ody_ncbx_ctl_t;
250
251 static inline uint64_t ODY_NCBX_CTL(uint64_t a) __attribute__ ((pure, always_inline));
ODY_NCBX_CTL(uint64_t a)252 static inline uint64_t ODY_NCBX_CTL(uint64_t a)
253 {
254 if ((a == 0) || ((a >= 2) && (a <= 5)))
255 return 0x87e1400f6000ll + 0x1000000ll * ((a) & 0x7);
256 __ody_csr_fatal("NCBX_CTL", 1, a, 0, 0, 0, 0, 0);
257 }
258
259 #define typedef_ODY_NCBX_CTL(a) ody_ncbx_ctl_t
260 #define bustype_ODY_NCBX_CTL(a) CSR_TYPE_RSL
261 #define basename_ODY_NCBX_CTL(a) "NCBX_CTL"
262 #define device_bar_ODY_NCBX_CTL(a) 0x0 /* PF_BAR0 */
263 #define busnum_ODY_NCBX_CTL(a) (a)
264 #define arguments_ODY_NCBX_CTL(a) (a), -1, -1, -1
265
266 /**
267 * Register (RSL) ncb#_ready
268 *
269 * NCB READY Registers
270 */
271 union ody_ncbx_ready {
272 uint64_t u;
273 struct ody_ncbx_ready_s {
274 uint64_t ncbo_ready : 16;
275 uint64_t reserved_16_63 : 48;
276 } s;
277 /* struct ody_ncbx_ready_s cn; */
278 };
279 typedef union ody_ncbx_ready ody_ncbx_ready_t;
280
281 static inline uint64_t ODY_NCBX_READY(uint64_t a) __attribute__ ((pure, always_inline));
ODY_NCBX_READY(uint64_t a)282 static inline uint64_t ODY_NCBX_READY(uint64_t a)
283 {
284 if ((a == 0) || ((a >= 2) && (a <= 5)))
285 return 0x87e140008100ll + 0x1000000ll * ((a) & 0x7);
286 __ody_csr_fatal("NCBX_READY", 1, a, 0, 0, 0, 0, 0);
287 }
288
289 #define typedef_ODY_NCBX_READY(a) ody_ncbx_ready_t
290 #define bustype_ODY_NCBX_READY(a) CSR_TYPE_RSL
291 #define basename_ODY_NCBX_READY(a) "NCBX_READY"
292 #define device_bar_ODY_NCBX_READY(a) 0x0 /* PF_BAR0 */
293 #define busnum_ODY_NCBX_READY(a) (a)
294 #define arguments_ODY_NCBX_READY(a) (a), -1, -1, -1
295
296 #endif /* __ODY_CSRS_NCB_H__ */
297