Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause
2 : : * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
3 : : * Copyright(c) 2010-2017 Intel Corporation
4 : : */
5 : :
6 : : #ifndef _NGBE_REGS_H_
7 : : #define _NGBE_REGS_H_
8 : :
9 : : #define NGBE_PVMBX_QSIZE (16) /* 16*4B */
10 : : #define NGBE_PVMBX_BSIZE (NGBE_PVMBX_QSIZE * 4)
11 : :
12 : : #define NGBE_REMOVED(a) (0)
13 : :
14 : : #define NGBE_REG_DUMMY 0xFFFFFF
15 : :
16 : : #define MS8(shift, mask) (((u8)(mask)) << (shift))
17 : : #define LS8(val, shift, mask) (((u8)(val) & (u8)(mask)) << (shift))
18 : : #define RS8(reg, shift, mask) (((u8)(reg) >> (shift)) & (u8)(mask))
19 : :
20 : : #define MS16(shift, mask) (((u16)(mask)) << (shift))
21 : : #define LS16(val, shift, mask) (((u16)(val) & (u16)(mask)) << (shift))
22 : : #define RS16(reg, shift, mask) (((u16)(reg) >> (shift)) & (u16)(mask))
23 : :
24 : : #define MS32(shift, mask) (((u32)(mask)) << (shift))
25 : : #define LS32(val, shift, mask) (((u32)(val) & (u32)(mask)) << (shift))
26 : : #define RS32(reg, shift, mask) (((u32)(reg) >> (shift)) & (u32)(mask))
27 : :
28 : : #define MS64(shift, mask) (((u64)(mask)) << (shift))
29 : : #define LS64(val, shift, mask) (((u64)(val) & (u64)(mask)) << (shift))
30 : : #define RS64(reg, shift, mask) (((u64)(reg) >> (shift)) & (u64)(mask))
31 : :
32 : : #define MS(shift, mask) MS32(shift, mask)
33 : : #define LS(val, shift, mask) LS32(val, shift, mask)
34 : : #define RS(reg, shift, mask) RS32(reg, shift, mask)
35 : :
36 : : #define ROUND_UP(x, y) (((x) + (y) - 1) / (y) * (y))
37 : : #define ROUND_DOWN(x, y) ((x) / (y) * (y))
38 : : #define ROUND_OVER(x, maxbits, unitbits) \
39 : : ((x) >= 1 << (maxbits) ? 0 : (x) >> (unitbits))
40 : :
41 : : /* autoc bits definition */
42 : : #define NGBE_AUTOC NGBE_REG_DUMMY
43 : : #define NGBE_AUTOC_FLU MS64(0, 0x1)
44 : : #define NGBE_AUTOC_10G_PMA_PMD_MASK MS64(7, 0x3) /* parallel */
45 : : #define NGBE_AUTOC_10G_XAUI LS64(0, 7, 0x3)
46 : : #define NGBE_AUTOC_10G_KX4 LS64(1, 7, 0x3)
47 : : #define NGBE_AUTOC_10G_CX4 LS64(2, 7, 0x3)
48 : : #define NGBE_AUTOC_10G_KR LS64(3, 7, 0x3) /* fixme */
49 : : #define NGBE_AUTOC_1G_PMA_PMD_MASK MS64(9, 0x7)
50 : : #define NGBE_AUTOC_1G_BX LS64(0, 9, 0x7)
51 : : #define NGBE_AUTOC_1G_KX LS64(1, 9, 0x7)
52 : : #define NGBE_AUTOC_1G_SFI LS64(0, 9, 0x7)
53 : : #define NGBE_AUTOC_1G_KX_BX LS64(1, 9, 0x7)
54 : : #define NGBE_AUTOC_AN_RESTART MS64(12, 0x1)
55 : : #define NGBE_AUTOC_LMS_MASK MS64(13, 0x7)
56 : : #define NGBE_AUTOC_LMS_10G LS64(3, 13, 0x7)
57 : : #define NGBE_AUTOC_LMS_KX4_KX_KR LS64(4, 13, 0x7)
58 : : #define NGBE_AUTOC_LMS_SGMII_1G_100M LS64(5, 13, 0x7)
59 : : #define NGBE_AUTOC_LMS_KX4_KX_KR_1G_AN LS64(6, 13, 0x7)
60 : : #define NGBE_AUTOC_LMS_KX4_KX_KR_SGMII LS64(7, 13, 0x7)
61 : : #define NGBE_AUTOC_LMS_1G_LINK_NO_AN LS64(0, 13, 0x7)
62 : : #define NGBE_AUTOC_LMS_10G_LINK_NO_AN LS64(1, 13, 0x7)
63 : : #define NGBE_AUTOC_LMS_1G_AN LS64(2, 13, 0x7)
64 : : #define NGBE_AUTOC_LMS_KX4_AN LS64(4, 13, 0x7)
65 : : #define NGBE_AUTOC_LMS_KX4_AN_1G_AN LS64(6, 13, 0x7)
66 : : #define NGBE_AUTOC_LMS_ATTACH_TYPE LS64(7, 13, 0x7)
67 : : #define NGBE_AUTOC_LMS_AN MS64(15, 0x7)
68 : :
69 : : #define NGBE_AUTOC_KR_SUPP MS64(16, 0x1)
70 : : #define NGBE_AUTOC_FECR MS64(17, 0x1)
71 : : #define NGBE_AUTOC_FECA MS64(18, 0x1)
72 : : #define NGBE_AUTOC_AN_RX_ALIGN MS64(18, 0x1F) /* fixme */
73 : : #define NGBE_AUTOC_AN_RX_DRIFT MS64(23, 0x3)
74 : : #define NGBE_AUTOC_AN_RX_LOOSE MS64(24, 0x3)
75 : : #define NGBE_AUTOC_PD_TMR MS64(25, 0x3)
76 : : #define NGBE_AUTOC_RF MS64(27, 0x1)
77 : : #define NGBE_AUTOC_ASM_PAUSE MS64(29, 0x1)
78 : : #define NGBE_AUTOC_SYM_PAUSE MS64(28, 0x1)
79 : : #define NGBE_AUTOC_PAUSE MS64(28, 0x3)
80 : : #define NGBE_AUTOC_KX_SUPP MS64(30, 0x1)
81 : : #define NGBE_AUTOC_KX4_SUPP MS64(31, 0x1)
82 : :
83 : : #define NGBE_AUTOC_10GS_PMA_PMD_MASK MS64(48, 0x3) /* serial */
84 : : #define NGBE_AUTOC_10GS_KR LS64(0, 48, 0x3)
85 : : #define NGBE_AUTOC_10GS_XFI LS64(1, 48, 0x3)
86 : : #define NGBE_AUTOC_10GS_SFI LS64(2, 48, 0x3)
87 : : #define NGBE_AUTOC_LINK_DIA_MASK MS64(60, 0x7)
88 : : #define NGBE_AUTOC_LINK_DIA_D3_MASK LS64(5, 60, 0x7)
89 : :
90 : : #define NGBE_AUTOC_SPEED_MASK MS64(32, 0xFFFF)
91 : : #define NGBD_AUTOC_SPEED(r) RS64(r, 32, 0xFFFF)
92 : : #define NGBE_AUTOC_SPEED(v) LS64(v, 32, 0xFFFF)
93 : : #define NGBE_LINK_SPEED_UNKNOWN 0
94 : : #define NGBE_LINK_SPEED_10M_FULL 0x0002
95 : : #define NGBE_LINK_SPEED_100M_FULL 0x0008
96 : : #define NGBE_LINK_SPEED_1GB_FULL 0x0020
97 : : #define NGBE_LINK_SPEED_2_5GB_FULL 0x0400
98 : : #define NGBE_LINK_SPEED_5GB_FULL 0x0800
99 : : #define NGBE_LINK_SPEED_10GB_FULL 0x0080
100 : : #define NGBE_LINK_SPEED_40GB_FULL 0x0100
101 : : #define NGBE_AUTOC_AUTONEG MS64(63, 0x1)
102 : :
103 : :
104 : :
105 : : /* Hardware Datapath:
106 : : * RX: / Queue <- Filter \
107 : : * Host | TC <=> SEC <=> MAC <=> PHY
108 : : * TX: \ Queue -> Filter /
109 : : *
110 : : * Packet Filter:
111 : : * RX: RSS < FDIR < Filter < Encrypt
112 : : *
113 : : * Macro Argument Naming:
114 : : * rp = ring pair [0,127]
115 : : * tc = traffic class [0,7]
116 : : * up = user priority [0,7]
117 : : * pi = pool index [0,63]
118 : : * r = register
119 : : * v = value
120 : : * s = shift
121 : : * m = mask
122 : : * i,j,k = array index
123 : : * H,L = high/low bits
124 : : * HI,LO = high/low state
125 : : */
126 : :
127 : : #define NGBE_ETHPHYIF NGBE_REG_DUMMY
128 : : #define NGBE_ETHPHYIF_MDIO_ACT MS(1, 0x1)
129 : : #define NGBE_ETHPHYIF_MDIO_MODE MS(2, 0x1)
130 : : #define NGBE_ETHPHYIF_MDIO_BASE(r) RS(r, 3, 0x1F)
131 : : #define NGBE_ETHPHYIF_MDIO_SHARED MS(13, 0x1)
132 : : #define NGBE_ETHPHYIF_SPEED_10M MS(17, 0x1)
133 : : #define NGBE_ETHPHYIF_SPEED_100M MS(18, 0x1)
134 : : #define NGBE_ETHPHYIF_SPEED_1G MS(19, 0x1)
135 : : #define NGBE_ETHPHYIF_SPEED_2_5G MS(20, 0x1)
136 : : #define NGBE_ETHPHYIF_SPEED_10G MS(21, 0x1)
137 : : #define NGBE_ETHPHYIF_SGMII_ENABLE MS(25, 0x1)
138 : : #define NGBE_ETHPHYIF_INT_PHY_MODE MS(24, 0x1)
139 : : #define NGBE_ETHPHYIF_IO_XPCS MS(30, 0x1)
140 : : #define NGBE_ETHPHYIF_IO_EPHY MS(31, 0x1)
141 : :
142 : : /******************************************************************************
143 : : * Chip Registers
144 : : ******************************************************************************/
145 : : /**
146 : : * Chip Status
147 : : **/
148 : : #define NGBE_PWR 0x010000
149 : : #define NGBE_PWR_LAN(r) RS(r, 28, 0xC)
150 : : #define NGBE_PWR_LAN_0 (1)
151 : : #define NGBE_PWR_LAN_1 (2)
152 : : #define NGBE_PWR_LAN_2 (3)
153 : : #define NGBE_PWR_LAN_3 (4)
154 : : #define NGBE_CTL 0x010004
155 : : #define NGBE_LOCKPF 0x010008
156 : : #define NGBE_RST 0x01000C
157 : : #define NGBE_RST_SW MS(0, 0x1)
158 : : #define NGBE_RST_LAN(i) MS(((i) + 1), 0x1)
159 : : #define NGBE_RST_FW MS(5, 0x1)
160 : : #define NGBE_RST_ETH(i) MS(((i) + 29), 0x1)
161 : : #define NGBE_RST_GLB MS(31, 0x1)
162 : : #define NGBE_RST_DEFAULT (NGBE_RST_SW | \
163 : : NGBE_RST_LAN(0) | \
164 : : NGBE_RST_LAN(1) | \
165 : : NGBE_RST_LAN(2) | \
166 : : NGBE_RST_LAN(3))
167 : : #define NGBE_PROB 0x010010
168 : : #define NGBE_IODRV 0x010024
169 : : #define NGBE_STAT 0x010028
170 : : #define NGBE_STAT_MNGINIT MS(0, 0x1)
171 : : #define NGBE_STAT_MNGVETO MS(8, 0x1)
172 : : #define NGBE_STAT_ECCLAN0 MS(16, 0x1)
173 : : #define NGBE_STAT_ECCLAN1 MS(17, 0x1)
174 : : #define NGBE_STAT_ECCLAN2 MS(18, 0x1)
175 : : #define NGBE_STAT_ECCLAN3 MS(19, 0x1)
176 : : #define NGBE_STAT_ECCMNG MS(20, 0x1)
177 : : #define NGBE_STAT_ECCPCORE MS(21, 0X1)
178 : : #define NGBE_STAT_ECCPCIW MS(22, 0x1)
179 : : #define NGBE_STAT_ECCPCIEPHY MS(23, 0x1)
180 : : #define NGBE_STAT_ECCFMGR MS(24, 0x1)
181 : : #define NGBE_STAT_GPHY_IN_RST(i) MS(((i) + 9), 0x1)
182 : : #define NGBE_RSTSTAT 0x010030
183 : : #define NGBE_RSTSTAT_PROG MS(20, 0x1)
184 : : #define NGBE_RSTSTAT_PREP MS(19, 0x1)
185 : : #define NGBE_RSTSTAT_TYPE_MASK MS(16, 0x7)
186 : : #define NGBE_RSTSTAT_TYPE(r) RS(r, 16, 0x7)
187 : : #define NGBE_RSTSTAT_TYPE_PE LS(0, 16, 0x7)
188 : : #define NGBE_RSTSTAT_TYPE_PWR LS(1, 16, 0x7)
189 : : #define NGBE_RSTSTAT_TYPE_HOT LS(2, 16, 0x7)
190 : : #define NGBE_RSTSTAT_TYPE_SW LS(3, 16, 0x7)
191 : : #define NGBE_RSTSTAT_TYPE_FW LS(4, 16, 0x7)
192 : : #define NGBE_RSTSTAT_TMRINIT_MASK MS(8, 0xFF)
193 : : #define NGBE_RSTSTAT_TMRINIT(v) LS(v, 8, 0xFF)
194 : : #define NGBE_RSTSTAT_TMRCNT_MASK MS(0, 0xFF)
195 : : #define NGBE_RSTSTAT_TMRCNT(v) LS(v, 0, 0xFF)
196 : : #define NGBE_PWRTMR 0x010034
197 : :
198 : : /**
199 : : * SPI(Flash)
200 : : **/
201 : : #define NGBE_SPICMD 0x010104
202 : : #define NGBE_SPICMD_ADDR(v) LS(v, 0, 0xFFFFFF)
203 : : #define NGBE_SPICMD_CLK(v) LS(v, 25, 0x7)
204 : : #define NGBE_SPICMD_CMD(v) LS(v, 28, 0x7)
205 : : #define NGBE_SPIDAT 0x010108
206 : : #define NGBE_SPIDAT_BYPASS MS(31, 0x1)
207 : : #define NGBE_SPIDAT_STATUS(v) LS(v, 16, 0xFF)
208 : : #define NGBE_SPIDAT_OPDONE MS(0, 0x1)
209 : : #define NGBE_SPISTAT 0x01010C
210 : : #define NGBE_SPISTAT_OPDONE MS(0, 0x1)
211 : : #define NGBE_SPISTAT_BPFLASH MS(31, 0x1)
212 : : #define NGBE_SPIUSRCMD 0x010110
213 : : #define NGBE_SPICFG0 0x010114
214 : : #define NGBE_SPICFG1 0x010118
215 : :
216 : : /* FMGR Registers */
217 : : #define NGBE_ILDRSTAT 0x010120
218 : : #define NGBE_ILDRSTAT_PCIRST MS(0, 0x1)
219 : : #define NGBE_ILDRSTAT_PWRRST MS(1, 0x1)
220 : : #define NGBE_ILDRSTAT_SWRST MS(11, 0x1)
221 : : #define NGBE_ILDRSTAT_SWRST_LAN0 MS(13, 0x1)
222 : : #define NGBE_ILDRSTAT_SWRST_LAN1 MS(14, 0x1)
223 : : #define NGBE_ILDRSTAT_SWRST_LAN2 MS(15, 0x1)
224 : : #define NGBE_ILDRSTAT_SWRST_LAN3 MS(16, 0x1)
225 : :
226 : : #define NGBE_SRAM 0x010124
227 : : #define NGBE_SRAM_SZ(v) LS(v, 28, 0x7)
228 : : #define NGBE_SRAMCTLECC 0x010130
229 : : #define NGBE_SRAMINJECC 0x010134
230 : : #define NGBE_SRAMECC 0x010138
231 : :
232 : : /* Sensors for PVT(Process Voltage Temperature) */
233 : : #define NGBE_TSCTRL 0x010300
234 : : #define NGBE_TSCTRL_EVALMD MS(31, 0x1)
235 : : #define NGBE_TSEN 0x010304
236 : : #define NGBE_TSEN_ENA MS(0, 0x1)
237 : : #define NGBE_TSSTAT 0x010308
238 : : #define NGBE_TSSTAT_VLD MS(16, 0x1)
239 : : #define NGBE_TSSTAT_DATA(r) RS(r, 0, 0x3FF)
240 : : #define NGBE_TSATHRE 0x01030C
241 : : #define NGBE_TSDTHRE 0x010310
242 : : #define NGBE_TSINTR 0x010314
243 : : #define NGBE_TSINTR_AEN MS(0, 0x1)
244 : : #define NGBE_TSINTR_DEN MS(1, 0x1)
245 : : #define NGBE_TSALM 0x010318
246 : : #define NGBE_TSALM_LO MS(0, 0x1)
247 : : #define NGBE_TSALM_HI MS(1, 0x1)
248 : :
249 : : #define NGBE_EFUSE_WDATA0 0x010320
250 : : #define NGBE_EFUSE_WDATA1 0x010324
251 : : #define NGBE_EFUSE_RDATA0 0x010328
252 : : #define NGBE_EFUSE_RDATA1 0x01032C
253 : : #define NGBE_EFUSE_STATUS 0x010330
254 : :
255 : : /******************************************************************************
256 : : * Port Registers
257 : : ******************************************************************************/
258 : : /* Internal PHY reg_offset [0,31] */
259 : : #define NGBE_PHY_CONFIG(reg_offset) (0x014000 + (reg_offset) * 4)
260 : :
261 : : /* Port Control */
262 : : #define NGBE_PORTCTL 0x014400
263 : : #define NGBE_PORTCTL_VLANEXT MS(0, 0x1)
264 : : #define NGBE_PORTCTL_ETAG MS(1, 0x1)
265 : : #define NGBE_PORTCTL_QINQ MS(2, 0x1)
266 : : #define NGBE_PORTCTL_DRVLOAD MS(3, 0x1)
267 : : #define NGBE_PORTCTL_NUMVT_MASK MS(12, 0x1)
268 : : #define NGBE_PORTCTL_NUMVT_8 LS(1, 12, 0x1)
269 : : #define NGBE_PORTCTL_RSTDONE MS(14, 0x1)
270 : : #define NGBE_PORTCTL_TEREDODIA MS(27, 0x1)
271 : : #define NGBE_PORTCTL_GENEVEDIA MS(28, 0x1)
272 : : #define NGBE_PORTCTL_VXLANGPEDIA MS(30, 0x1)
273 : : #define NGBE_PORTCTL_VXLANDIA MS(31, 0x1)
274 : :
275 : : /* Port Status */
276 : : #define NGBE_PORTSTAT 0x014404
277 : : #define NGBE_PORTSTAT_BW_MASK MS(1, 0x7)
278 : : #define NGBE_PORTSTAT_BW_1G MS(1, 0x1)
279 : : #define NGBE_PORTSTAT_BW_100M MS(2, 0x1)
280 : : #define NGBE_PORTSTAT_BW_10M MS(3, 0x1)
281 : : #define NGBE_PORTSTAT_ID(r) RS(r, 8, 0x3)
282 : :
283 : : #define NGBE_EXTAG 0x014408
284 : : #define NGBE_EXTAG_ETAG_MASK MS(0, 0xFFFF)
285 : : #define NGBE_EXTAG_ETAG(v) LS(v, 0, 0xFFFF)
286 : : #define NGBE_EXTAG_VLAN_MASK MS(16, 0xFFFF)
287 : : #define NGBE_EXTAG_VLAN(v) LS(v, 16, 0xFFFF)
288 : :
289 : : #define NGBE_TCPTIME 0x014420
290 : :
291 : : #define NGBE_LEDCTL 0x014424
292 : : #define NGBE_LEDCTL_SEL(s) MS((s), 0x1)
293 : : #define NGBE_LEDCTL_OD(s) MS(((s) + 16), 0x1)
294 : : /* s=1G(1),100M(2),10M(3) */
295 : : #define NGBE_LEDCTL_100M (NGBE_LEDCTL_SEL(2) | NGBE_LEDCTL_OD(2))
296 : :
297 : : #define NGBE_TAGTPID(i) (0x014430 + (i) * 4) /*0-3*/
298 : : #define NGBE_TAGTPID_LSB_MASK MS(0, 0xFFFF)
299 : : #define NGBE_TAGTPID_LSB(v) LS(v, 0, 0xFFFF)
300 : : #define NGBE_TAGTPID_MSB_MASK MS(16, 0xFFFF)
301 : : #define NGBE_TAGTPID_MSB(v) LS(v, 16, 0xFFFF)
302 : :
303 : : #define NGBE_LAN_SPEED 0x014440
304 : : #define NGBE_LAN_SPEED_MASK MS(0, 0x3)
305 : :
306 : : /* GPIO Registers */
307 : : #define NGBE_GPIODATA 0x014800
308 : : #define NGBE_GPIOBIT_0 MS(0, 0x1) /* O:tx fault */
309 : : #define NGBE_GPIOBIT_1 MS(1, 0x1) /* O:tx disabled */
310 : : #define NGBE_GPIOBIT_2 MS(2, 0x1) /* I:sfp module absent */
311 : : #define NGBE_GPIOBIT_3 MS(3, 0x1) /* I:rx signal lost */
312 : : #define NGBE_GPIOBIT_4 MS(4, 0x1) /* O:rate select, 1G(0) 10G(1) */
313 : : #define NGBE_GPIOBIT_5 MS(5, 0x1) /* O:rate select, 1G(0) 10G(1) */
314 : : #define NGBE_GPIOBIT_6 MS(6, 0x1) /* I:ext phy interrupt */
315 : : #define NGBE_GPIOBIT_7 MS(7, 0x1) /* I:fan speed alarm */
316 : : #define NGBE_GPIODIR 0x014804
317 : : #define NGBE_GPIODIR_DDR(v) LS(v, 0, 0x3)
318 : : #define NGBE_GPIOCTL 0x014808
319 : : #define NGBE_GPIOINTEN 0x014830
320 : : #define NGBE_GPIOINTEN_INT(v) LS(v, 0, 0x3)
321 : : #define NGBE_GPIOINTMASK 0x014834
322 : : #define NGBE_GPIOINTTYPE 0x014838
323 : : #define NGBE_GPIOINTTYPE_LEVEL(v) LS(v, 0, 0x3)
324 : : #define NGBE_GPIOINTPOL 0x01483C
325 : : #define NGBE_GPIOINTPOL_ACT(v) LS(v, 0, 0x3)
326 : : #define NGBE_GPIOINTSTAT 0x014840
327 : : #define NGBE_GPIOINTDB 0x014848
328 : : #define NGBE_GPIOEOI 0x01484C
329 : : #define NGBE_GPIODAT 0x014850
330 : :
331 : : /* TPH */
332 : : #define NGBE_TPHCFG 0x014F00
333 : :
334 : : /******************************************************************************
335 : : * Transmit DMA Registers
336 : : ******************************************************************************/
337 : : /* TDMA Control */
338 : : #define NGBE_DMATXCTRL 0x018000
339 : : #define NGBE_DMATXCTRL_ENA MS(0, 0x1)
340 : : #define NGBE_DMATXCTRL_TPID_MASK MS(16, 0xFFFF)
341 : : #define NGBE_DMATXCTRL_TPID(v) LS(v, 16, 0xFFFF)
342 : : #define NGBE_POOLTXENA(i) (0x018004 + (i) * 4) /*0*/
343 : : #define NGBE_PRBTXDMACTL 0x018010
344 : : #define NGBE_ECCTXDMACTL 0x018014
345 : : #define NGBE_ECCTXDMAINJ 0x018018
346 : : #define NGBE_ECCTXDMA 0x01801C
347 : : #define NGBE_PBTXDMATH 0x018020
348 : : #define NGBE_QPTXLLI 0x018040
349 : : #define NGBE_POOLTXLBET 0x018050
350 : : #define NGBE_POOLTXASET 0x018058
351 : : #define NGBE_POOLTXASMAC 0x018060
352 : : #define NGBE_POOLTXASVLAN 0x018070
353 : : #define NGBE_POOLTXDSA 0x0180A0
354 : : #define NGBE_POOLTAG(pl) (0x018100 + (pl) * 4) /*0-7*/
355 : : #define NGBE_POOLTAG_VTAG(v) LS(v, 0, 0xFFFF)
356 : : #define NGBE_POOLTAG_VTAG_MASK MS(0, 0xFFFF)
357 : : #define TXGBD_POOLTAG_VTAG_UP(r) RS(r, 13, 0x7)
358 : : #define NGBE_POOLTAG_TPIDSEL(v) LS(v, 24, 0x7)
359 : : #define NGBE_POOLTAG_ETAG_MASK MS(27, 0x3)
360 : : #define NGBE_POOLTAG_ETAG LS(2, 27, 0x3)
361 : : #define NGBE_POOLTAG_ACT_MASK MS(30, 0x3)
362 : : #define NGBE_POOLTAG_ACT_ALWAYS LS(1, 30, 0x3)
363 : : #define NGBE_POOLTAG_ACT_NEVER LS(2, 30, 0x3)
364 : :
365 : : /* Queue Arbiter(QoS) */
366 : : #define NGBE_QARBTXCTL 0x018200
367 : : #define NGBE_QARBTXCTL_DA MS(6, 0x1)
368 : : #define NGBE_QARBTXRATE 0x018404
369 : : #define NGBE_QARBTXRATE_MIN(v) LS(v, 0, 0x3FFF)
370 : : #define NGBE_QARBTXRATE_MAX(v) LS(v, 16, 0x3FFF)
371 : :
372 : : /* ETAG */
373 : : #define NGBE_POOLETAG(pl) (0x018700 + (pl) * 4)
374 : :
375 : : /******************************************************************************
376 : : * Receive DMA Registers
377 : : ******************************************************************************/
378 : : /* Receive Control */
379 : : #define NGBE_ARBRXCTL 0x012000
380 : : #define NGBE_ARBRXCTL_DIA MS(6, 0x1)
381 : : #define NGBE_POOLRXENA(i) (0x012004 + (i) * 4) /*0*/
382 : : #define NGBE_PRBRDMA 0x012010
383 : : #define NGBE_ECCRXDMACTL 0x012014
384 : : #define NGBE_ECCRXDMAINJ 0x012018
385 : : #define NGBE_ECCRXDMA 0x01201C
386 : : #define NGBE_POOLRXDNA 0x0120A0
387 : : #define NGBE_QPRXDROP 0x012080
388 : : #define NGBE_QPRXSTRPVLAN 0x012090
389 : :
390 : : /******************************************************************************
391 : : * Packet Buffer
392 : : ******************************************************************************/
393 : : /* Flow Control */
394 : : #define NGBE_FCXOFFTM 0x019200
395 : : #define NGBE_FCWTRLO 0x019220
396 : : #define NGBE_FCWTRLO_TH(v) LS(v, 10, 0x1FF) /*KB*/
397 : : #define NGBE_FCWTRLO_XON MS(31, 0x1)
398 : : #define NGBE_FCWTRHI 0x019260
399 : : #define NGBE_FCWTRHI_TH(v) LS(v, 10, 0x1FF) /*KB*/
400 : : #define NGBE_FCWTRHI_XOFF MS(31, 0x1)
401 : : #define NGBE_RXFCRFSH 0x0192A0
402 : : #define NGBE_RXFCFSH_TIME(v) LS(v, 0, 0xFFFF)
403 : : #define NGBE_FCSTAT 0x01CE00
404 : : #define NGBE_FCSTAT_DLNK MS(0, 0x1)
405 : : #define NGBE_FCSTAT_ULNK MS(8, 0x1)
406 : :
407 : : #define NGBE_RXFCCFG 0x011090
408 : : #define NGBE_RXFCCFG_FC MS(0, 0x1)
409 : : #define NGBE_TXFCCFG 0x0192A4
410 : : #define NGBE_TXFCCFG_FC MS(3, 0x1)
411 : :
412 : : /* Data Buffer */
413 : : #define NGBE_PBRXCTL 0x019000
414 : : #define NGBE_PBRXCTL_ST MS(0, 0x1)
415 : : #define NGBE_PBRXCTL_ENA MS(31, 0x1)
416 : : #define NGBE_PBRXSTAT 0x019004
417 : : #define NGBE_PBRXSIZE 0x019020
418 : : #define NGBE_PBRXSIZE_KB(v) LS(v, 10, 0x3F)
419 : :
420 : : #define NGBE_PBRXOFTMR 0x019094
421 : : #define NGBE_PBRXDBGCMD 0x019090
422 : : #define NGBE_PBRXDBGDAT 0x0190A0
423 : :
424 : : #define NGBE_PBTXSIZE 0x01CC00
425 : :
426 : : /* LLI */
427 : : #define NGBE_PBRXLLI 0x19080
428 : : #define NGBE_PBRXLLI_SZLT(v) LS(v, 0, 0xFFF)
429 : : #define NGBE_PBRXLLI_UPLT(v) LS(v, 16, 0x7)
430 : : #define NGBE_PBRXLLI_UPEA MS(19, 0x1)
431 : :
432 : : /* Port Arbiter(QoS) */
433 : : #define NGBE_PARBTXCTL 0x01CD00
434 : : #define NGBE_PARBTXCTL_DA MS(6, 0x1)
435 : :
436 : : /******************************************************************************
437 : : * Packet Filter (L2-7)
438 : : ******************************************************************************/
439 : : /**
440 : : * Receive Scaling
441 : : **/
442 : : #define NGBE_POOLRSS(pl) (0x019300 + (pl) * 4) /*0-7*/
443 : : #define NGBE_POOLRSS_L4HDR MS(1, 0x1)
444 : : #define NGBE_POOLRSS_L3HDR MS(2, 0x1)
445 : : #define NGBE_POOLRSS_L2HDR MS(3, 0x1)
446 : : #define NGBE_POOLRSS_L2TUN MS(4, 0x1)
447 : : #define NGBE_POOLRSS_TUNHDR MS(5, 0x1)
448 : : #define NGBE_RSSTBL(i) (0x019400 + (i) * 4) /*32*/
449 : : #define NGBE_RSSKEY(i) (0x019480 + (i) * 4) /*10*/
450 : : #define NGBE_RACTL 0x0194F4
451 : : #define NGBE_RACTL_RSSENA MS(2, 0x1)
452 : : #define NGBE_RACTL_RSSMASK MS(16, 0xFFFF)
453 : : #define NGBE_RACTL_RSSIPV4TCP MS(16, 0x1)
454 : : #define NGBE_RACTL_RSSIPV4 MS(17, 0x1)
455 : : #define NGBE_RACTL_RSSIPV4SCTP MS(18, 0x1)
456 : : #define NGBE_RACTL_RSSIPV6SCTP MS(19, 0x1)
457 : : #define NGBE_RACTL_RSSIPV6 MS(20, 0x1)
458 : : #define NGBE_RACTL_RSSIPV6TCP MS(21, 0x1)
459 : : #define NGBE_RACTL_RSSIPV4UDP MS(22, 0x1)
460 : : #define NGBE_RACTL_RSSIPV6UDP MS(23, 0x1)
461 : :
462 : : /**
463 : : * Flow Director
464 : : **/
465 : : #define PERFECT_BUCKET_64KB_HASH_MASK 0x07FF /* 11 bits */
466 : : #define PERFECT_BUCKET_128KB_HASH_MASK 0x0FFF /* 12 bits */
467 : : #define PERFECT_BUCKET_256KB_HASH_MASK 0x1FFF /* 13 bits */
468 : : #define SIG_BUCKET_64KB_HASH_MASK 0x1FFF /* 13 bits */
469 : : #define SIG_BUCKET_128KB_HASH_MASK 0x3FFF /* 14 bits */
470 : : #define SIG_BUCKET_256KB_HASH_MASK 0x7FFF /* 15 bits */
471 : :
472 : : /**
473 : : * 5-tuple Filter
474 : : **/
475 : : #define NGBE_5TFPORT(i) (0x019A00 + (i) * 4) /*0-7*/
476 : : #define NGBE_5TFPORT_SRC(v) LS(v, 0, 0xFFFF)
477 : : #define NGBE_5TFPORT_DST(v) LS(v, 16, 0xFFFF)
478 : : #define NGBE_5TFCTL0(i) (0x019C00 + (i) * 4) /*0-7*/
479 : : #define NGBE_5TFCTL0_PROTO(v) LS(v, 0, 0x3)
480 : : enum ngbe_5tuple_protocol {
481 : : NGBE_5TF_PROT_TCP = 0,
482 : : NGBE_5TF_PROT_UDP,
483 : : NGBE_5TF_PROT_SCTP,
484 : : NGBE_5TF_PROT_NONE,
485 : : };
486 : : #define NGBE_5TFCTL0_PRI(v) LS(v, 2, 0x7)
487 : : #define NGBE_5TFCTL0_POOL(v) LS(v, 8, 0x7)
488 : : #define NGBE_5TFCTL0_MASK MS(27, 0xF)
489 : : #define NGBE_5TFCTL0_MSPORT MS(27, 0x1)
490 : : #define NGBE_5TFCTL0_MDPORT MS(28, 0x1)
491 : : #define NGBE_5TFCTL0_MPROTO MS(29, 0x1)
492 : : #define NGBE_5TFCTL0_MPOOL MS(30, 0x1)
493 : : #define NGBE_5TFCTL0_ENA MS(31, 0x1)
494 : : #define NGBE_5TFCTL1(i) (0x019E00 + (i) * 4) /*0-7*/
495 : : #define NGBE_5TFCTL1_CHKSZ MS(12, 0x1)
496 : : #define NGBE_5TFCTL1_LLI MS(20, 0x1)
497 : : #define NGBE_5TFCTL1_QP(v) LS(v, 21, 0x7)
498 : :
499 : : /**
500 : : * Storm Control
501 : : **/
502 : : #define NGBE_STRMCTL 0x015004
503 : : #define NGBE_STRMCTL_MCPNSH MS(0, 0x1)
504 : : #define NGBE_STRMCTL_MCDROP MS(1, 0x1)
505 : : #define NGBE_STRMCTL_BCPNSH MS(2, 0x1)
506 : : #define NGBE_STRMCTL_BCDROP MS(3, 0x1)
507 : : #define NGBE_STRMCTL_DFTPOOL MS(4, 0x1)
508 : : #define NGBE_STRMCTL_ITVL(v) LS(v, 8, 0x3FF)
509 : : #define NGBE_STRMTH 0x015008
510 : : #define NGBE_STRMTH_MC(v) LS(v, 0, 0xFFFF)
511 : : #define NGBE_STRMTH_BC(v) LS(v, 16, 0xFFFF)
512 : :
513 : : /******************************************************************************
514 : : * Ether Flow
515 : : ******************************************************************************/
516 : : #define NGBE_PSRCTL 0x015000
517 : : #define NGBE_PSRCTL_TPE MS(4, 0x1)
518 : : #define NGBE_PSRCTL_ADHF12_MASK MS(5, 0x3)
519 : : #define NGBE_PSRCTL_ADHF12(v) LS(v, 5, 0x3)
520 : : #define NGBE_PSRCTL_UCHFENA MS(7, 0x1)
521 : : #define NGBE_PSRCTL_MCHFENA MS(7, 0x1)
522 : : #define NGBE_PSRCTL_MCP MS(8, 0x1)
523 : : #define NGBE_PSRCTL_UCP MS(9, 0x1)
524 : : #define NGBE_PSRCTL_BCA MS(10, 0x1)
525 : : #define NGBE_PSRCTL_L4CSUM MS(12, 0x1)
526 : : #define NGBE_PSRCTL_PCSD MS(13, 0x1)
527 : : #define NGBE_PSRCTL_LBENA MS(18, 0x1)
528 : : #define NGBE_FRMSZ 0x015020
529 : : #define NGBE_FRMSZ_MAX_MASK MS(0, 0xFFFF)
530 : : #define NGBE_FRMSZ_MAX(v) LS((v) + 4, 0, 0xFFFF)
531 : : #define NGBE_VLANCTL 0x015088
532 : : #define NGBE_VLANCTL_TPID_MASK MS(0, 0xFFFF)
533 : : #define NGBE_VLANCTL_TPID(v) LS(v, 0, 0xFFFF)
534 : : #define NGBE_VLANCTL_CFI MS(28, 0x1)
535 : : #define NGBE_VLANCTL_CFIENA MS(29, 0x1)
536 : : #define NGBE_VLANCTL_VFE MS(30, 0x1)
537 : : #define NGBE_POOLCTL 0x0151B0
538 : : #define NGBE_POOLCTL_DEFDSA MS(29, 0x1)
539 : : #define NGBE_POOLCTL_RPLEN MS(30, 0x1)
540 : : #define NGBE_POOLCTL_MODE_MASK MS(16, 0x3)
541 : : #define NGBE_PSRPOOL_MODE_MAC LS(0, 16, 0x3)
542 : : #define NGBE_PSRPOOL_MODE_ETAG LS(1, 16, 0x3)
543 : : #define NGBE_POOLCTL_DEFPL(v) LS(v, 7, 0x7)
544 : : #define NGBE_POOLCTL_DEFPL_MASK MS(7, 0x7)
545 : :
546 : : #define NGBE_ETFLT(i) (0x015128 + (i) * 4) /*0-7*/
547 : : #define NGBE_ETFLT_ETID(v) LS(v, 0, 0xFFFF)
548 : : #define NGBE_ETFLT_ETID_MASK MS(0, 0xFFFF)
549 : : #define NGBE_ETFLT_POOL(v) LS(v, 20, 0x7)
550 : : #define NGBE_ETFLT_POOLENA MS(26, 0x1)
551 : : #define NGBE_ETFLT_TXAS MS(29, 0x1)
552 : : #define NGBE_ETFLT_1588 MS(30, 0x1)
553 : : #define NGBE_ETFLT_ENA MS(31, 0x1)
554 : : #define NGBE_ETCLS(i) (0x019100 + (i) * 4) /*0-7*/
555 : : #define NGBE_ETCLS_QPID(v) LS(v, 16, 0x7)
556 : : #define NGBD_ETCLS_QPID(r) RS(r, 16, 0x7)
557 : : #define NGBE_ETCLS_LLI MS(29, 0x1)
558 : : #define NGBE_ETCLS_QENA MS(31, 0x1)
559 : : #define NGBE_SYNCLS 0x019130
560 : : #define NGBE_SYNCLS_ENA MS(0, 0x1)
561 : : #define NGBE_SYNCLS_QPID(v) LS(v, 1, 0x7)
562 : : #define NGBD_SYNCLS_QPID(r) RS(r, 1, 0x7)
563 : : #define NGBE_SYNCLS_QPID_MASK MS(1, 0x7)
564 : : #define NGBE_SYNCLS_HIPRIO MS(31, 0x1)
565 : :
566 : : /* MAC & VLAN & NVE */
567 : : #define NGBE_PSRVLANIDX 0x016230 /*0-31*/
568 : : #define NGBE_PSRVLAN 0x016220
569 : : #define NGBE_PSRVLAN_VID(v) LS(v, 0, 0xFFF)
570 : : #define NGBE_PSRVLAN_EA MS(31, 0x1)
571 : : #define NGBE_PSRVLANPLM(i) (0x016224 + (i) * 4) /*0-1*/
572 : :
573 : : /**
574 : : * Mirror Rules
575 : : **/
576 : : #define NGBE_MIRRCTL(i) (0x015B00 + (i) * 4)
577 : : #define NGBE_MIRRCTL_POOL MS(0, 0x1)
578 : : #define NGBE_MIRRCTL_UPLINK MS(1, 0x1)
579 : : #define NGBE_MIRRCTL_DNLINK MS(2, 0x1)
580 : : #define NGBE_MIRRCTL_VLAN MS(3, 0x1)
581 : : #define NGBE_MIRRCTL_DESTP(v) LS(v, 8, 0x7)
582 : : #define NGBE_MIRRVLANL(i) (0x015B10 + (i) * 8)
583 : : #define NGBE_MIRRPOOLL(i) (0x015B30 + (i) * 8)
584 : :
585 : : /**
586 : : * Time Stamp
587 : : **/
588 : : #define NGBE_TSRXCTL 0x015188
589 : : #define NGBE_TSRXCTL_VLD MS(0, 0x1)
590 : : #define NGBE_TSRXCTL_TYPE(v) LS(v, 1, 0x7)
591 : : #define NGBE_TSRXCTL_TYPE_V2L2 (0)
592 : : #define NGBE_TSRXCTL_TYPE_V1L4 (1)
593 : : #define NGBE_TSRXCTL_TYPE_V2L24 (2)
594 : : #define NGBE_TSRXCTL_TYPE_V2EVENT (5)
595 : : #define NGBE_TSRXCTL_ENA MS(4, 0x1)
596 : : #define NGBE_TSRXSTMPL 0x0151E8
597 : : #define NGBE_TSRXSTMPH 0x0151A4
598 : : #define NGBE_TSTXCTL 0x011F00
599 : : #define NGBE_TSTXCTL_VLD MS(0, 0x1)
600 : : #define NGBE_TSTXCTL_ENA MS(4, 0x1)
601 : : #define NGBE_TSTXSTMPL 0x011F04
602 : : #define NGBE_TSTXSTMPH 0x011F08
603 : : #define NGBE_TSTIMEL 0x011F0C
604 : : #define NGBE_TSTIMEH 0x011F10
605 : : #define NGBE_TSTIMEINC 0x011F14
606 : : #define NGBE_TSTIMEINC_IV(v) LS(v, 0, 0x7FFFFFF)
607 : :
608 : : /**
609 : : * Wake on Lan
610 : : **/
611 : : #define NGBE_WOLCTL 0x015B80
612 : : #define NGBE_WOLIPCTL 0x015B84
613 : : #define NGBE_WOLIP4(i) (0x015BC0 + (i) * 4) /* 0-3 */
614 : : #define NGBE_WOLIP6(i) (0x015BE0 + (i) * 4) /* 0-3 */
615 : :
616 : : #define NGBE_WOLFLEXCTL 0x015CFC
617 : : #define NGBE_WOLFLEXI 0x015B8C
618 : : #define NGBE_WOLFLEXDAT(i) (0x015C00 + (i) * 16) /* 0-15 */
619 : : #define NGBE_WOLFLEXMSK(i) (0x015C08 + (i) * 16) /* 0-15 */
620 : :
621 : : /******************************************************************************
622 : : * Security Registers
623 : : ******************************************************************************/
624 : : #define NGBE_SECRXCTL 0x017000
625 : : #define NGBE_SECRXCTL_ODSA MS(0, 0x1)
626 : : #define NGBE_SECRXCTL_XDSA MS(1, 0x1)
627 : : #define NGBE_SECRXCTL_CRCSTRIP MS(2, 0x1)
628 : : #define NGBE_SECRXCTL_SAVEBAD MS(6, 0x1)
629 : : #define NGBE_SECRXSTAT 0x017004
630 : : #define NGBE_SECRXSTAT_RDY MS(0, 0x1)
631 : : #define NGBE_SECRXSTAT_ECC MS(1, 0x1)
632 : :
633 : : #define NGBE_SECTXCTL 0x01D000
634 : : #define NGBE_SECTXCTL_ODSA MS(0, 0x1)
635 : : #define NGBE_SECTXCTL_XDSA MS(1, 0x1)
636 : : #define NGBE_SECTXCTL_STFWD MS(2, 0x1)
637 : : #define NGBE_SECTXCTL_MSKIV MS(3, 0x1)
638 : : #define NGBE_SECTXSTAT 0x01D004
639 : : #define NGBE_SECTXSTAT_RDY MS(0, 0x1)
640 : : #define NGBE_SECTXSTAT_ECC MS(1, 0x1)
641 : : #define NGBE_SECTXBUFAF 0x01D008
642 : : #define NGBE_SECTXBUFAE 0x01D00C
643 : : #define NGBE_SECTXIFG 0x01D020
644 : : #define NGBE_SECTXIFG_MIN(v) LS(v, 0, 0xF)
645 : : #define NGBE_SECTXIFG_MIN_MASK MS(0, 0xF)
646 : :
647 : : /**
648 : : * LinkSec
649 : : **/
650 : : #define NGBE_LSECRXCAP 0x017200
651 : : #define NGBE_LSECRXCTL 0x017204
652 : : /* disabled(0),check(1),strict(2),drop(3) */
653 : : #define NGBE_LSECRXCTL_MODE_MASK MS(2, 0x3)
654 : : #define NGBE_LSECRXCTL_MODE_STRICT LS(2, 2, 0x3)
655 : : #define NGBE_LSECRXCTL_POSTHDR MS(6, 0x1)
656 : : #define NGBE_LSECRXCTL_REPLAY MS(7, 0x1)
657 : : #define NGBE_LSECRXSCIL 0x017208
658 : : #define NGBE_LSECRXSCIH 0x01720C
659 : : #define NGBE_LSECRXSA(i) (0x017210 + (i) * 4) /* 0-1 */
660 : : #define NGBE_LSECRXPN(i) (0x017218 + (i) * 4) /* 0-1 */
661 : : #define NGBE_LSECRXKEY(n, i) (0x017220 + 0x10 * (n) + 4 * (i)) /*0-3*/
662 : : #define NGBE_LSECTXCAP 0x01D200
663 : : #define NGBE_LSECTXCTL 0x01D204
664 : : /* disabled(0), auth(1), auth+encrypt(2) */
665 : : #define NGBE_LSECTXCTL_MODE_MASK MS(0, 0x3)
666 : : #define NGBE_LSECTXCTL_MODE_AUTH LS(1, 0, 0x3)
667 : : #define NGBE_LSECTXCTL_MODE_AENC LS(2, 0, 0x3)
668 : : #define NGBE_LSECTXCTL_PNTRH_MASK MS(8, 0xFFFFFF)
669 : : #define NGBE_LSECTXCTL_PNTRH(v) LS(v, 8, 0xFFFFFF)
670 : : #define NGBE_LSECTXSCIL 0x01D208
671 : : #define NGBE_LSECTXSCIH 0x01D20C
672 : : #define NGBE_LSECTXSA 0x01D210
673 : : #define NGBE_LSECTXPN0 0x01D214
674 : : #define NGBE_LSECTXPN1 0x01D218
675 : : #define NGBE_LSECTXKEY0(i) (0x01D21C + (i) * 4) /* 0-3 */
676 : : #define NGBE_LSECTXKEY1(i) (0x01D22C + (i) * 4) /* 0-3 */
677 : :
678 : : #define NGBE_LSECRX_UTPKT 0x017240
679 : : #define NGBE_LSECRX_DECOCT 0x017244
680 : : #define NGBE_LSECRX_VLDOCT 0x017248
681 : : #define NGBE_LSECRX_BTPKT 0x01724C
682 : : #define NGBE_LSECRX_NOSCIPKT 0x017250
683 : : #define NGBE_LSECRX_UNSCIPKT 0x017254
684 : : #define NGBE_LSECRX_UNCHKPKT 0x017258
685 : : #define NGBE_LSECRX_DLYPKT 0x01725C
686 : : #define NGBE_LSECRX_LATEPKT 0x017260
687 : : #define NGBE_LSECRX_OKPKT(i) (0x017264 + (i) * 4) /* 0-1 */
688 : : #define NGBE_LSECRX_BADPKT(i) (0x01726C + (i) * 4) /* 0-1 */
689 : : #define NGBE_LSECRX_INVPKT(i) (0x017274 + (i) * 4) /* 0-1 */
690 : : #define NGBE_LSECRX_BADSAPKT(i) (0x01727C + (i) * 8) /* 0-3 */
691 : : #define NGBE_LSECRX_INVSAPKT(i) (0x017280 + (i) * 8) /* 0-3 */
692 : : #define NGBE_LSECTX_UTPKT 0x01D23C
693 : : #define NGBE_LSECTX_ENCPKT 0x01D240
694 : : #define NGBE_LSECTX_PROTPKT 0x01D244
695 : : #define NGBE_LSECTX_ENCOCT 0x01D248
696 : : #define NGBE_LSECTX_PROTOCT 0x01D24C
697 : :
698 : : /******************************************************************************
699 : : * MAC Registers
700 : : ******************************************************************************/
701 : : #define NGBE_MACRXCFG 0x011004
702 : : #define NGBE_MACRXCFG_ENA MS(0, 0x1)
703 : : #define NGBE_MACRXCFG_JUMBO MS(8, 0x1)
704 : : #define NGBE_MACRXCFG_LB MS(10, 0x1)
705 : : #define NGBE_MACCNTCTL 0x011800
706 : : #define NGBE_MACCNTCTL_RC MS(2, 0x1)
707 : :
708 : : #define NGBE_MACRXFLT 0x011008
709 : : #define NGBE_MACRXFLT_PROMISC MS(0, 0x1)
710 : : #define NGBE_MACRXFLT_CTL_MASK MS(6, 0x3)
711 : : #define NGBE_MACRXFLT_CTL_DROP LS(0, 6, 0x3)
712 : : #define NGBE_MACRXFLT_CTL_NOPS LS(1, 6, 0x3)
713 : : #define NGBE_MACRXFLT_CTL_NOFT LS(2, 6, 0x3)
714 : : #define NGBE_MACRXFLT_CTL_PASS LS(3, 6, 0x3)
715 : : #define NGBE_MACRXFLT_RXALL MS(31, 0x1)
716 : :
717 : : #define NGBE_MAC_WDG_TIMEOUT 0x01100C
718 : :
719 : : /******************************************************************************
720 : : * Statistic Registers
721 : : ******************************************************************************/
722 : : /* Ring Counter */
723 : : #define NGBE_QPRXPKT(rp) (0x001014 + 0x40 * (rp))
724 : : #define NGBE_QPRXOCTL(rp) (0x001018 + 0x40 * (rp))
725 : : #define NGBE_QPRXOCTH(rp) (0x00101C + 0x40 * (rp))
726 : : #define NGBE_QPRXMPKT(rp) (0x001020 + 0x40 * (rp))
727 : : #define NGBE_QPRXBPKT(rp) (0x001024 + 0x40 * (rp))
728 : : #define NGBE_QPTXPKT(rp) (0x003014 + 0x40 * (rp))
729 : : #define NGBE_QPTXOCTL(rp) (0x003018 + 0x40 * (rp))
730 : : #define NGBE_QPTXOCTH(rp) (0x00301C + 0x40 * (rp))
731 : : #define NGBE_QPTXMPKT(rp) (0x003020 + 0x40 * (rp))
732 : : #define NGBE_QPTXBPKT(rp) (0x003024 + 0x40 * (rp))
733 : :
734 : : /* TDMA Counter */
735 : : #define NGBE_DMATXDROP 0x018300
736 : : #define NGBE_DMATXSECDROP 0x018304
737 : : #define NGBE_DMATXPKT 0x018308
738 : : #define NGBE_DMATXOCTL 0x01830C
739 : : #define NGBE_DMATXOCTH 0x018310
740 : : #define NGBE_DMATXMNG 0x018314
741 : :
742 : : /* RDMA Counter */
743 : : #define NGBE_DMARXDROP 0x012500
744 : : #define NGBE_DMARXPKT 0x012504
745 : : #define NGBE_DMARXOCTL 0x012508
746 : : #define NGBE_DMARXOCTH 0x01250C
747 : : #define NGBE_DMARXMNG 0x012510
748 : :
749 : : /* Packet Buffer Counter */
750 : : #define NGBE_PBRXMISS 0x019040
751 : : #define NGBE_PBRXPKT 0x019060
752 : : #define NGBE_PBRXREP 0x019064
753 : : #define NGBE_PBRXDROP 0x019068
754 : : #define NGBE_PBLBSTAT 0x01906C
755 : : #define NGBE_PBLBSTAT_FREE(r) RS(r, 0, 0x3FF)
756 : : #define NGBE_PBLBSTAT_FULL MS(11, 0x1)
757 : : #define NGBE_PBRXWRPTR 0x019180
758 : : #define NGBE_PBRXWRPTR_HEAD(r) RS(r, 0, 0xFFFF)
759 : : #define NGBE_PBRXWRPTR_TAIL(r) RS(r, 16, 0xFFFF)
760 : : #define NGBE_PBRXRDPTR 0x0191A0
761 : : #define NGBE_PBRXRDPTR_HEAD(r) RS(r, 0, 0xFFFF)
762 : : #define NGBE_PBRXRDPTR_TAIL(r) RS(r, 16, 0xFFFF)
763 : : #define NGBE_PBRXDATA 0x0191C0
764 : : #define NGBE_PBRXDATA_RDPTR(r) RS(r, 0, 0xFFFF)
765 : : #define NGBE_PBRXDATA_WRPTR(r) RS(r, 16, 0xFFFF)
766 : : #define NGBE_PBRX_USDSP 0x0191E0
767 : : #define NGBE_RXPBPFCDMACL 0x019210
768 : : #define NGBE_RXPBPFCDMACH 0x019214
769 : : #define NGBE_PBTXLNKXOFF 0x019218
770 : : #define NGBE_PBTXLNKXON 0x01921C
771 : :
772 : : #define NGBE_PBTXSTAT 0x01C004
773 : : #define NGBE_PBTXSTAT_EMPT(tc, r) ((1 << (tc) & (r)) >> (tc))
774 : :
775 : : #define NGBE_PBRXLNKXOFF 0x011988
776 : : #define NGBE_PBRXLNKXON 0x011E0C
777 : :
778 : : #define NGBE_PBLPBK 0x01CF08
779 : :
780 : : /* Ether Flow Counter */
781 : : #define NGBE_LANPKTDROP 0x0151C0
782 : : #define NGBE_MNGPKTDROP 0x0151C4
783 : :
784 : : #define NGBE_PSRLANPKTCNT 0x0151B8
785 : : #define NGBE_PSRMNGPKTCNT 0x0151BC
786 : :
787 : : /* MAC Counter */
788 : : #define NGBE_MACRXERRCRCL 0x011928
789 : : #define NGBE_MACRXERRCRCH 0x01192C
790 : : #define NGBE_MACRXERRLENL 0x011978
791 : : #define NGBE_MACRXERRLENH 0x01197C
792 : : #define NGBE_MACRX1TO64L 0x011940
793 : : #define NGBE_MACRX1TO64H 0x011944
794 : : #define NGBE_MACRX65TO127L 0x011948
795 : : #define NGBE_MACRX65TO127H 0x01194C
796 : : #define NGBE_MACRX128TO255L 0x011950
797 : : #define NGBE_MACRX128TO255H 0x011954
798 : : #define NGBE_MACRX256TO511L 0x011958
799 : : #define NGBE_MACRX256TO511H 0x01195C
800 : : #define NGBE_MACRX512TO1023L 0x011960
801 : : #define NGBE_MACRX512TO1023H 0x011964
802 : : #define NGBE_MACRX1024TOMAXL 0x011968
803 : : #define NGBE_MACRX1024TOMAXH 0x01196C
804 : : #define NGBE_MACTX1TO64L 0x011834
805 : : #define NGBE_MACTX1TO64H 0x011838
806 : : #define NGBE_MACTX65TO127L 0x01183C
807 : : #define NGBE_MACTX65TO127H 0x011840
808 : : #define NGBE_MACTX128TO255L 0x011844
809 : : #define NGBE_MACTX128TO255H 0x011848
810 : : #define NGBE_MACTX256TO511L 0x01184C
811 : : #define NGBE_MACTX256TO511H 0x011850
812 : : #define NGBE_MACTX512TO1023L 0x011854
813 : : #define NGBE_MACTX512TO1023H 0x011858
814 : : #define NGBE_MACTX1024TOMAXL 0x01185C
815 : : #define NGBE_MACTX1024TOMAXH 0x011860
816 : :
817 : : #define NGBE_MACRXUNDERSIZE 0x011938
818 : : #define NGBE_MACRXOVERSIZE 0x01193C
819 : : #define NGBE_MACRXJABBER 0x011934
820 : :
821 : : #define NGBE_MACRXPKTL 0x011900
822 : : #define NGBE_MACRXPKTH 0x011904
823 : : #define NGBE_MACTXPKTL 0x01181C
824 : : #define NGBE_MACTXPKTH 0x011820
825 : : #define NGBE_MACRXGBOCTL 0x011908
826 : : #define NGBE_MACRXGBOCTH 0x01190C
827 : : #define NGBE_MACTXGBOCTL 0x011814
828 : : #define NGBE_MACTXGBOCTH 0x011818
829 : :
830 : : #define NGBE_MACRXOCTL 0x011918
831 : : #define NGBE_MACRXOCTH 0x01191C
832 : : #define NGBE_MACRXMPKTL 0x011920
833 : : #define NGBE_MACRXMPKTH 0x011924
834 : : #define NGBE_MACTXOCTL 0x011824
835 : : #define NGBE_MACTXOCTH 0x011828
836 : : #define NGBE_MACTXMPKTL 0x01182C
837 : : #define NGBE_MACTXMPKTH 0x011830
838 : :
839 : : /* Management Counter */
840 : : #define NGBE_MNGOUT 0x01CF00
841 : : #define NGBE_MNGIN 0x01CF04
842 : : #define NGBE_MNGDROP 0x01CF0C
843 : :
844 : : /* MAC SEC Counter */
845 : : #define NGBE_LSECRXUNTAG 0x017240
846 : : #define NGBE_LSECRXDECOCT 0x017244
847 : : #define NGBE_LSECRXVLDOCT 0x017248
848 : : #define NGBE_LSECRXBADTAG 0x01724C
849 : : #define NGBE_LSECRXNOSCI 0x017250
850 : : #define NGBE_LSECRXUKSCI 0x017254
851 : : #define NGBE_LSECRXUNCHK 0x017258
852 : : #define NGBE_LSECRXDLY 0x01725C
853 : : #define NGBE_LSECRXLATE 0x017260
854 : : #define NGBE_LSECRXGOOD 0x017264
855 : : #define NGBE_LSECRXBAD 0x01726C
856 : : #define NGBE_LSECRXUK 0x017274
857 : : #define NGBE_LSECRXBADSA 0x01727C
858 : : #define NGBE_LSECRXUKSA 0x017280
859 : : #define NGBE_LSECTXUNTAG 0x01D23C
860 : : #define NGBE_LSECTXENC 0x01D240
861 : : #define NGBE_LSECTXPTT 0x01D244
862 : : #define NGBE_LSECTXENCOCT 0x01D248
863 : : #define NGBE_LSECTXPTTOCT 0x01D24C
864 : :
865 : : /* Management Counter */
866 : : #define NGBE_MNGOS2BMC 0x01E094
867 : : #define NGBE_MNGBMC2OS 0x01E090
868 : :
869 : : /******************************************************************************
870 : : * PF(Physical Function) Registers
871 : : ******************************************************************************/
872 : : /* Interrupt */
873 : : #define NGBE_BMECTL 0x012020
874 : : #define NGBE_BMECTL_VFDRP MS(1, 0x1)
875 : : #define NGBE_BMECTL_PFDRP MS(0, 0x1)
876 : : #define NGBE_ICRMISC 0x000100
877 : : #define NGBE_ICRMISC_MASK MS(8, 0xFFFFFF)
878 : : #define NGBE_ICRMISC_RST MS(10, 0x1) /* device reset event */
879 : : #define NGBE_ICRMISC_TS MS(11, 0x1) /* time sync */
880 : : #define NGBE_ICRMISC_STALL MS(12, 0x1) /* trans or recv path is stalled */
881 : : #define NGBE_ICRMISC_LNKSEC MS(13, 0x1) /* Tx LinkSec require key exchange*/
882 : : #define NGBE_ICRMISC_ERRBUF MS(14, 0x1) /* Packet Buffer Overrun */
883 : : #define NGBE_ICRMISC_ERRMAC MS(17, 0x1) /* err reported by MAC */
884 : : #define NGBE_ICRMISC_PHY MS(18, 0x1) /* interrupt reported by eth phy */
885 : : #define NGBE_ICRMISC_ERRIG MS(20, 0x1) /* integrity error */
886 : : #define NGBE_ICRMISC_SPI MS(21, 0x1) /* SPI interface */
887 : : #define NGBE_ICRMISC_VFMBX MS(23, 0x1) /* VF-PF message box */
888 : : #define NGBE_ICRMISC_GPIO MS(26, 0x1) /* GPIO interrupt */
889 : : #define NGBE_ICRMISC_ERRPCI MS(27, 0x1) /* pcie request error */
890 : : #define NGBE_ICRMISC_HEAT MS(28, 0x1) /* overheat detection */
891 : : #define NGBE_ICRMISC_PROBE MS(29, 0x1) /* probe match */
892 : : #define NGBE_ICRMISC_MNGMBX MS(30, 0x1) /* mng mailbox */
893 : : #define NGBE_ICRMISC_TIMER MS(31, 0x1) /* tcp timer */
894 : : #define NGBE_ICRMISC_DEFAULT ( \
895 : : NGBE_ICRMISC_RST | \
896 : : NGBE_ICRMISC_ERRMAC | \
897 : : NGBE_ICRMISC_PHY | \
898 : : NGBE_ICRMISC_ERRIG | \
899 : : NGBE_ICRMISC_GPIO | \
900 : : NGBE_ICRMISC_VFMBX | \
901 : : NGBE_ICRMISC_MNGMBX | \
902 : : NGBE_ICRMISC_STALL | \
903 : : NGBE_ICRMISC_TIMER)
904 : : #define NGBE_ICSMISC 0x000104
905 : : #define NGBE_IENMISC 0x000108
906 : : #define NGBE_IVARMISC 0x0004FC
907 : : #define NGBE_IVARMISC_VEC(v) LS(v, 0, 0x7)
908 : : #define NGBE_IVARMISC_VLD MS(7, 0x1)
909 : : #define NGBE_ICR(i) (0x000120 + (i) * 4) /*0*/
910 : : #define NGBE_ICR_MASK MS(0, 0x1FF)
911 : : #define NGBE_ICS(i) (0x000130 + (i) * 4) /*0*/
912 : : #define NGBE_ICS_MASK NGBE_ICR_MASK
913 : : #define NGBE_IMS(i) (0x000140 + (i) * 4) /*0*/
914 : : #define NGBE_IMS_MASK NGBE_ICR_MASK
915 : : #define NGBE_IMC(i) (0x000150 + (i) * 4) /*0*/
916 : : #define NGBE_IMC_MASK NGBE_ICR_MASK
917 : : #define NGBE_IVAR(i) (0x000500 + (i) * 4) /*0-3*/
918 : : #define NGBE_IVAR_VEC(v) LS(v, 0, 0x7)
919 : : #define NGBE_IVAR_VLD MS(7, 0x1)
920 : : #define NGBE_TCPTMR 0x000170
921 : : #define NGBE_ITRSEL 0x000180
922 : :
923 : : /* P2V Mailbox */
924 : : #define NGBE_MBMEM(i) (0x005000 + 0x40 * (i)) /*0-7*/
925 : : #define NGBE_MBCTL(i) (0x000600 + 4 * (i)) /*0-7*/
926 : : #define NGBE_MBCTL_STS MS(0, 0x1) /* Initiate message send to VF */
927 : : #define NGBE_MBCTL_ACK MS(1, 0x1) /* Ack message recv'd from VF */
928 : : #define NGBE_MBCTL_VFU MS(2, 0x1) /* VF owns the mailbox buffer */
929 : : #define NGBE_MBCTL_PFU MS(3, 0x1) /* PF owns the mailbox buffer */
930 : : #define NGBE_MBCTL_RVFU MS(4, 0x1) /* Reset VFU - used when VF stuck */
931 : : #define NGBE_MBVFICR 0x000480
932 : : #define NGBE_MBVFICR_INDEX(vf) ((vf) >> 4)
933 : : #define NGBE_MBVFICR_VFREQ_MASK (0x0000FFFF) /* bits for VF messages */
934 : : #define NGBE_MBVFICR_VFREQ_VF1 (0x00000001) /* bit for VF 1 message */
935 : : #define NGBE_MBVFICR_VFACK_MASK (0xFFFF0000) /* bits for VF acks */
936 : : #define NGBE_MBVFICR_VFACK_VF1 (0x00010000) /* bit for VF 1 ack */
937 : : #define NGBE_FLRVFP 0x000490
938 : : #define NGBE_FLRVFE 0x0004A0
939 : : #define NGBE_FLRVFEC 0x0004A8
940 : :
941 : : /******************************************************************************
942 : : * VF(Virtual Function) Registers
943 : : ******************************************************************************/
944 : : #define NGBE_VFPBWRAP 0x000000
945 : : #define NGBE_VFPBWRAP_WRAP MS(0, 0x7)
946 : : #define NGBE_VFPBWRAP_EMPT MS(3, 0x1)
947 : : #define NGBE_VFSTATUS 0x000004
948 : : #define NGBE_VFSTATUS_UP MS(0, 0x1)
949 : : #define NGBE_VFSTATUS_BW_MASK MS(1, 0x7)
950 : : #define NGBE_VFSTATUS_BW_1G LS(0x1, 1, 0x7)
951 : : #define NGBE_VFSTATUS_BW_100M LS(0x2, 1, 0x7)
952 : : #define NGBE_VFSTATUS_BW_10M LS(0x4, 1, 0x7)
953 : : #define NGBE_VFSTATUS_BUSY MS(4, 0x1)
954 : : #define NGBE_VFSTATUS_LANID MS(8, 0x3)
955 : : #define NGBE_VFRST 0x000008
956 : : #define NGBE_VFRST_SET MS(0, 0x1)
957 : : #define NGBE_VFMSIXECC 0x00000C
958 : : #define NGBE_VFPLCFG 0x000078
959 : : #define NGBE_VFPLCFG_RSV MS(0, 0x1)
960 : : #define NGBE_VFPLCFG_PSR(v) LS(v, 1, 0x1F)
961 : : #define NGBE_VFPLCFG_PSRL4HDR (0x1)
962 : : #define NGBE_VFPLCFG_PSRL3HDR (0x2)
963 : : #define NGBE_VFPLCFG_PSRL2HDR (0x4)
964 : : #define NGBE_VFPLCFG_PSRTUNHDR (0x8)
965 : : #define NGBE_VFPLCFG_PSRTUNMAC (0x10)
966 : : #define NGBE_VFICR 0x000100
967 : : #define NGBE_VFICR_MASK LS(3, 0, 0x3)
968 : : #define NGBE_VFICR_MBX MS(1, 0x1)
969 : : #define NGBE_VFICR_DONE1 MS(0, 0x1)
970 : : #define NGBE_VFICS 0x000104
971 : : #define NGBE_VFICS_MASK NGBE_VFICR_MASK
972 : : #define NGBE_VFIMS 0x000108
973 : : #define NGBE_VFIMS_MASK NGBE_VFICR_MASK
974 : : #define NGBE_VFIMC 0x00010C
975 : : #define NGBE_VFIMC_MASK NGBE_VFICR_MASK
976 : : #define NGBE_VFGPIE 0x000118
977 : : #define NGBE_VFIVAR(i) (0x000240 + 4 * (i)) /*0-1*/
978 : : #define NGBE_VFIVARMISC 0x000260
979 : : #define NGBE_VFIVAR_ALLOC(v) LS(v, 0, 0x1)
980 : : #define NGBE_VFIVAR_VLD MS(7, 0x1)
981 : :
982 : : #define NGBE_VFMBCTL 0x000600
983 : : #define NGBE_VFMBCTL_REQ MS(0, 0x1) /* Request for PF Ready bit */
984 : : #define NGBE_VFMBCTL_ACK MS(1, 0x1) /* Ack PF message received */
985 : : #define NGBE_VFMBCTL_VFU MS(2, 0x1) /* VF owns the mailbox buffer */
986 : : #define NGBE_VFMBCTL_PFU MS(3, 0x1) /* PF owns the mailbox buffer */
987 : : #define NGBE_VFMBCTL_PFSTS MS(4, 0x1) /* PF wrote a message in the MB */
988 : : #define NGBE_VFMBCTL_PFACK MS(5, 0x1) /* PF ack the previous VF msg */
989 : : #define NGBE_VFMBCTL_RSTI MS(6, 0x1) /* PF has reset indication */
990 : : #define NGBE_VFMBCTL_RSTD MS(7, 0x1) /* PF has indicated reset done */
991 : : #define NGBE_VFMBCTL_R2C_BITS (NGBE_VFMBCTL_RSTD | \
992 : : NGBE_VFMBCTL_PFSTS | \
993 : : NGBE_VFMBCTL_PFACK)
994 : : #define NGBE_VFMBX 0x000C00 /*0-15*/
995 : : #define NGBE_VFTPHCTL(i) 0x000D00
996 : :
997 : : /******************************************************************************
998 : : * PF&VF TxRx Interface
999 : : ******************************************************************************/
1000 : : #define RNGLEN(v) ROUND_OVER(v, 13, 7)
1001 : : #define HDRLEN(v) ROUND_OVER(v, 10, 6)
1002 : : #define PKTLEN(v) ROUND_OVER(v, 14, 10)
1003 : : #define INTTHR(v) ROUND_OVER(v, 4, 0)
1004 : :
1005 : : #define NGBE_RING_DESC_ALIGN 128
1006 : : #define NGBE_RING_DESC_MIN 128
1007 : : #define NGBE_RING_DESC_MAX 8192
1008 : : #define NGBE_RXD_ALIGN NGBE_RING_DESC_ALIGN
1009 : : #define NGBE_TXD_ALIGN NGBE_RING_DESC_ALIGN
1010 : :
1011 : : /* receive ring */
1012 : : #define NGBE_RXBAL(rp) (0x001000 + 0x40 * (rp))
1013 : : #define NGBE_RXBAH(rp) (0x001004 + 0x40 * (rp))
1014 : : #define NGBE_RXRP(rp) (0x00100C + 0x40 * (rp))
1015 : : #define NGBE_RXWP(rp) (0x001008 + 0x40 * (rp))
1016 : : #define NGBE_RXCFG(rp) (0x001010 + 0x40 * (rp))
1017 : : #define NGBE_RXCFG_ENA MS(0, 0x1)
1018 : : #define NGBE_RXCFG_RNGLEN(v) LS(RNGLEN(v), 1, 0x3F)
1019 : : #define NGBE_RXCFG_PKTLEN(v) LS(PKTLEN(v), 8, 0xF)
1020 : : #define NGBE_RXCFG_PKTLEN_MASK MS(8, 0xF)
1021 : : #define NGBE_RXCFG_HDRLEN(v) LS(HDRLEN(v), 12, 0xF)
1022 : : #define NGBE_RXCFG_HDRLEN_MASK MS(12, 0xF)
1023 : : #define NGBE_RXCFG_WTHRESH(v) LS(v, 16, 0x7)
1024 : : #define NGBE_RXCFG_ETAG MS(22, 0x1)
1025 : : #define NGBE_RXCFG_SPLIT MS(26, 0x1)
1026 : : #define NGBE_RXCFG_CNTAG MS(28, 0x1)
1027 : : #define NGBE_RXCFG_DROP MS(30, 0x1)
1028 : : #define NGBE_RXCFG_VLAN MS(31, 0x1)
1029 : :
1030 : : /* transmit ring */
1031 : : #define NGBE_TXBAL(rp) (0x003000 + 0x40 * (rp)) /*0-7*/
1032 : : #define NGBE_TXBAH(rp) (0x003004 + 0x40 * (rp))
1033 : : #define NGBE_TXWP(rp) (0x003008 + 0x40 * (rp))
1034 : : #define NGBE_TXRP(rp) (0x00300C + 0x40 * (rp))
1035 : : #define NGBE_TXCFG(rp) (0x003010 + 0x40 * (rp))
1036 : : #define NGBE_TXCFG_ENA MS(0, 0x1)
1037 : : #define NGBE_TXCFG_BUFLEN_MASK MS(1, 0x3F)
1038 : : #define NGBE_TXCFG_BUFLEN(v) LS(RNGLEN(v), 1, 0x3F)
1039 : : #define NGBE_TXCFG_HTHRESH_MASK MS(8, 0xF)
1040 : : #define NGBE_TXCFG_HTHRESH(v) LS(v, 8, 0xF)
1041 : : #define NGBE_TXCFG_WTHRESH_MASK MS(16, 0x7F)
1042 : : #define NGBE_TXCFG_WTHRESH(v) LS(v, 16, 0x7F)
1043 : : #define NGBE_TXCFG_FLUSH MS(26, 0x1)
1044 : :
1045 : : /* interrupt registers */
1046 : : #define NGBE_BMEPEND 0x000168
1047 : : #define NGBE_BMEPEND_ST MS(0, 0x1)
1048 : : #define NGBE_ITRI 0x000180
1049 : : #define NGBE_ITR(i) (0x000200 + 4 * (i))
1050 : : #define NGBE_ITR_IVAL_MASK MS(2, 0x1FFF) /* 1ns/10G, 10ns/REST */
1051 : : #define NGBE_ITR_IVAL(v) LS(v, 2, 0x1FFF) /*1ns/10G, 10ns/REST*/
1052 : : #define NGBE_ITR_IVAL_1G(us) NGBE_ITR_IVAL((us) / 2)
1053 : : #define NGBE_ITR_IVAL_10G(us) NGBE_ITR_IVAL((us) / 20)
1054 : : #define NGBE_ITR_LLIEA MS(15, 0x1)
1055 : : #define NGBE_ITR_LLICREDIT(v) LS(v, 16, 0x1F)
1056 : : #define NGBE_ITR_CNT(v) LS(v, 21, 0x3FF)
1057 : : #define NGBE_ITR_WRDSA MS(31, 0x1)
1058 : : #define NGBE_GPIE 0x000118
1059 : : #define NGBE_GPIE_MSIX MS(0, 0x1)
1060 : : #define NGBE_GPIE_LLIEA MS(1, 0x1)
1061 : : #define NGBE_GPIE_LLIVAL(v) LS(v, 3, 0x1F)
1062 : : #define NGBE_GPIE_LLIVAL_H(v) LS(v, 16, 0x7FF)
1063 : :
1064 : : /******************************************************************************
1065 : : * Debug Registers
1066 : : ******************************************************************************/
1067 : : /**
1068 : : * Probe
1069 : : **/
1070 : : #define NGBE_PRBCTL 0x010200
1071 : : #define NGBE_PRBSTA 0x010204
1072 : : #define NGBE_PRBDAT 0x010220
1073 : : #define NGBE_PRBCNT 0x010228
1074 : :
1075 : : #define NGBE_PRBPCI 0x01F010
1076 : : #define NGBE_PRBPSR 0x015010
1077 : : #define NGBE_PRBRDB 0x019010
1078 : : #define NGBE_PRBTDB 0x01C010
1079 : : #define NGBE_PRBRSEC 0x017010
1080 : : #define NGBE_PRBTSEC 0x01D010
1081 : : #define NGBE_PRBMNG 0x01E010
1082 : : #define NGBE_PRBRMAC 0x011014
1083 : : #define NGBE_PRBTMAC 0x011010
1084 : : #define NGBE_PRBREMAC 0x011E04
1085 : : #define NGBE_PRBTEMAC 0x011E00
1086 : :
1087 : : /**
1088 : : * ECC
1089 : : **/
1090 : : #define NGBE_ECCRXPBCTL 0x019014
1091 : : #define NGBE_ECCRXPBINJ 0x019018
1092 : : #define NGBE_ECCRXPB 0x01901C
1093 : : #define NGBE_ECCTXPBCTL 0x01C014
1094 : : #define NGBE_ECCTXPBINJ 0x01C018
1095 : : #define NGBE_ECCTXPB 0x01C01C
1096 : :
1097 : : #define NGBE_ECCRXETHCTL 0x015014
1098 : : #define NGBE_ECCRXETHINJ 0x015018
1099 : : #define NGBE_ECCRXETH 0x01401C
1100 : :
1101 : : #define NGBE_ECCRXSECCTL 0x017014
1102 : : #define NGBE_ECCRXSECINJ 0x017018
1103 : : #define NGBE_ECCRXSEC 0x01701C
1104 : : #define NGBE_ECCTXSECCTL 0x01D014
1105 : : #define NGBE_ECCTXSECINJ 0x01D018
1106 : : #define NGBE_ECCTXSEC 0x01D01C
1107 : :
1108 : : #define NGBE_P2VMBX_SIZE (16) /* 16*4B */
1109 : : #define NGBE_P2MMBX_SIZE (64) /* 64*4B */
1110 : :
1111 : : /**************** Global Registers ****************************/
1112 : : #define NGBE_POOLETHCTL(pl) (0x015600 + (pl) * 4)
1113 : : #define NGBE_POOLETHCTL_LBDIA MS(0, 0x1)
1114 : : #define NGBE_POOLETHCTL_LLBDIA MS(1, 0x1)
1115 : : #define NGBE_POOLETHCTL_LLB MS(2, 0x1)
1116 : : #define NGBE_POOLETHCTL_UCP MS(4, 0x1)
1117 : : #define NGBE_POOLETHCTL_ETP MS(5, 0x1)
1118 : : #define NGBE_POOLETHCTL_VLA MS(6, 0x1)
1119 : : #define NGBE_POOLETHCTL_VLP MS(7, 0x1)
1120 : : #define NGBE_POOLETHCTL_UTA MS(8, 0x1)
1121 : : #define NGBE_POOLETHCTL_MCHA MS(9, 0x1)
1122 : : #define NGBE_POOLETHCTL_UCHA MS(10, 0x1)
1123 : : #define NGBE_POOLETHCTL_BCA MS(11, 0x1)
1124 : : #define NGBE_POOLETHCTL_MCP MS(12, 0x1)
1125 : : #define NGBE_POOLDROPSWBK(i) (0x0151C8 + (i) * 4) /*0-1*/
1126 : :
1127 : : /**************************** Receive DMA registers **************************/
1128 : :
1129 : : #define NGBE_RPUP2TC 0x019008
1130 : : #define NGBE_RPUP2TC_UP_SHIFT 3
1131 : : #define NGBE_RPUP2TC_UP_MASK 0x7
1132 : :
1133 : : /* mac switcher */
1134 : : #define NGBE_ETHADDRL 0x016200
1135 : : #define NGBE_ETHADDRL_AD0(v) LS(v, 0, 0xFF)
1136 : : #define NGBE_ETHADDRL_AD1(v) LS(v, 8, 0xFF)
1137 : : #define NGBE_ETHADDRL_AD2(v) LS(v, 16, 0xFF)
1138 : : #define NGBE_ETHADDRL_AD3(v) LS(v, 24, 0xFF)
1139 : : #define NGBE_ETHADDRL_ETAG(r) RS(r, 0, 0x3FFF)
1140 : : #define NGBE_ETHADDRH 0x016204
1141 : : #define NGBE_ETHADDRH_AD4(v) LS(v, 0, 0xFF)
1142 : : #define NGBE_ETHADDRH_AD5(v) LS(v, 8, 0xFF)
1143 : : #define NGBE_ETHADDRH_AD_MASK MS(0, 0xFFFF)
1144 : : #define NGBE_ETHADDRH_ETAG MS(30, 0x1)
1145 : : #define NGBE_ETHADDRH_VLD MS(31, 0x1)
1146 : : #define NGBE_ETHADDRASS 0x016208
1147 : : #define NGBE_ETHADDRIDX 0x016210
1148 : :
1149 : : /* Outmost Barrier Filters */
1150 : : #define NGBE_MCADDRTBL(i) (0x015200 + (i) * 4) /*0-127*/
1151 : : #define NGBE_UCADDRTBL(i) (0x015400 + (i) * 4) /*0-127*/
1152 : : #define NGBE_VLANTBL(i) (0x016000 + (i) * 4) /*0-127*/
1153 : :
1154 : : #define NGBE_MNGFLEXSEL 0x1582C
1155 : : #define NGBE_MNGFLEXDWL(i) (0x15A00 + ((i) * 16))
1156 : : #define NGBE_MNGFLEXDWH(i) (0x15A04 + ((i) * 16))
1157 : : #define NGBE_MNGFLEXMSK(i) (0x15A08 + ((i) * 16))
1158 : :
1159 : : #define NGBE_LANFLEXSEL 0x15B8C
1160 : : #define NGBE_LANFLEXDWL(i) (0x15C00 + ((i) * 16))
1161 : : #define NGBE_LANFLEXDWH(i) (0x15C04 + ((i) * 16))
1162 : : #define NGBE_LANFLEXMSK(i) (0x15C08 + ((i) * 16))
1163 : : #define NGBE_LANFLEXCTL 0x15CFC
1164 : :
1165 : : /* ipsec */
1166 : : #define NGBE_IPSRXIDX 0x017100
1167 : : #define NGBE_IPSRXIDX_ENA MS(0, 0x1)
1168 : : #define NGBE_IPSRXIDX_TB_MASK MS(1, 0x3)
1169 : : #define NGBE_IPSRXIDX_TB_IP LS(1, 1, 0x3)
1170 : : #define NGBE_IPSRXIDX_TB_SPI LS(2, 1, 0x3)
1171 : : #define NGBE_IPSRXIDX_TB_KEY LS(3, 1, 0x3)
1172 : : #define NGBE_IPSRXIDX_TBIDX(v) LS(v, 3, 0xF)
1173 : : #define NGBE_IPSRXIDX_READ MS(30, 0x1)
1174 : : #define NGBE_IPSRXIDX_WRITE MS(31, 0x1)
1175 : : #define NGBE_IPSRXADDR(i) (0x017104 + (i) * 4)
1176 : :
1177 : : #define NGBE_IPSRXSPI 0x017114
1178 : : #define NGBE_IPSRXADDRIDX 0x017118
1179 : : #define NGBE_IPSRXKEY(i) (0x01711C + (i) * 4)
1180 : : #define NGBE_IPSRXSALT 0x01712C
1181 : : #define NGBE_IPSRXMODE 0x017130
1182 : : #define NGBE_IPSRXMODE_IPV6 0x00000010
1183 : : #define NGBE_IPSRXMODE_DEC 0x00000008
1184 : : #define NGBE_IPSRXMODE_ESP 0x00000004
1185 : : #define NGBE_IPSRXMODE_AH 0x00000002
1186 : : #define NGBE_IPSRXMODE_VLD 0x00000001
1187 : : #define NGBE_IPSTXIDX 0x01D100
1188 : : #define NGBE_IPSTXIDX_ENA MS(0, 0x1)
1189 : : #define NGBE_IPSTXIDX_SAIDX(v) LS(v, 3, 0x3FF)
1190 : : #define NGBE_IPSTXIDX_READ MS(30, 0x1)
1191 : : #define NGBE_IPSTXIDX_WRITE MS(31, 0x1)
1192 : : #define NGBE_IPSTXSALT 0x01D104
1193 : : #define NGBE_IPSTXKEY(i) (0x01D108 + (i) * 4)
1194 : :
1195 : : #define NGBE_MACTXCFG 0x011000
1196 : : #define NGBE_MACTXCFG_TE MS(0, 0x1)
1197 : : #define NGBE_MACTXCFG_SPEED_MASK MS(29, 0x3)
1198 : : #define NGBE_MACTXCFG_SPEED(v) LS(v, 29, 0x3)
1199 : : #define NGBE_MACTXCFG_SPEED_10G LS(0, 29, 0x3)
1200 : : #define NGBE_MACTXCFG_SPEED_1G LS(3, 29, 0x3)
1201 : :
1202 : : #define NGBE_ISBADDRL 0x000160
1203 : : #define NGBE_ISBADDRH 0x000164
1204 : :
1205 : : #define NGBE_ARBPOOLIDX 0x01820C
1206 : : #define NGBE_ARBTXRATE 0x018404
1207 : : #define NGBE_ARBTXRATE_MIN(v) LS(v, 0, 0x3FFF)
1208 : : #define NGBE_ARBTXRATE_MAX(v) LS(v, 16, 0x3FFF)
1209 : :
1210 : : /* qos */
1211 : : #define NGBE_ARBTXCTL 0x018200
1212 : : #define NGBE_ARBTXCTL_RRM MS(1, 0x1)
1213 : : #define NGBE_ARBTXCTL_WSP MS(2, 0x1)
1214 : : #define NGBE_ARBTXCTL_DIA MS(6, 0x1)
1215 : : #define NGBE_ARBTXMMW 0x018208
1216 : :
1217 : : /* Management */
1218 : : #define NGBE_MNGFWSYNC 0x01E000
1219 : : #define NGBE_MNGFWSYNC_REQ MS(0, 0x1)
1220 : : #define NGBE_MNGSWSYNC 0x01E004
1221 : : #define NGBE_MNGSWSYNC_REQ MS(0, 0x1)
1222 : : #define NGBE_SWSEM 0x01002C
1223 : : #define NGBE_SWSEM_PF MS(0, 0x1)
1224 : : #define NGBE_MNGSEM 0x01E008
1225 : : #define NGBE_MNGSEM_SW(v) LS(v, 0, 0xFFFF)
1226 : : #define NGBE_MNGSEM_SWPHY MS(0, 0x1)
1227 : : #define NGBE_MNGSEM_SWMBX MS(2, 0x1)
1228 : : #define NGBE_MNGSEM_SWFLASH MS(3, 0x1)
1229 : : #define NGBE_MNGSEM_FW(v) LS(v, 16, 0xFFFF)
1230 : : #define NGBE_MNGSEM_FWPHY MS(16, 0x1)
1231 : : #define NGBE_MNGSEM_FWMBX MS(18, 0x1)
1232 : : #define NGBE_MNGSEM_FWFLASH MS(19, 0x1)
1233 : : #define NGBE_MNGMBXCTL 0x01E044
1234 : : #define NGBE_MNGMBXCTL_SWRDY MS(0, 0x1)
1235 : : #define NGBE_MNGMBXCTL_SWACK MS(1, 0x1)
1236 : : #define NGBE_MNGMBXCTL_FWRDY MS(2, 0x1)
1237 : : #define NGBE_MNGMBXCTL_FWACK MS(3, 0x1)
1238 : : #define NGBE_MNGMBX 0x01E100
1239 : :
1240 : : /**
1241 : : * MDIO(PHY)
1242 : : **/
1243 : : #define NGBE_MDIOSCA 0x011200
1244 : : #define NGBE_MDIOSCA_REG(v) LS(v, 0, 0xFFFF)
1245 : : #define NGBE_MDIOSCA_PORT(v) LS(v, 16, 0x1F)
1246 : : #define NGBE_MDIOSCA_DEV(v) LS(v, 21, 0x1F)
1247 : : #define NGBE_MDIOSCD 0x011204
1248 : : #define NGBE_MDIOSCD_DAT_R(r) RS(r, 0, 0xFFFF)
1249 : : #define NGBE_MDIOSCD_DAT(v) LS(v, 0, 0xFFFF)
1250 : : #define NGBE_MDIOSCD_CMD_PREAD LS(2, 16, 0x3)
1251 : : #define NGBE_MDIOSCD_CMD_WRITE LS(1, 16, 0x3)
1252 : : #define NGBE_MDIOSCD_CMD_READ LS(3, 16, 0x3)
1253 : : #define NGBE_MDIOSCD_SADDR MS(18, 0x1)
1254 : : #define NGBE_MDIOSCD_CLOCK(v) LS(v, 19, 0x7)
1255 : : #define NGBE_MDIOSCD_BUSY MS(22, 0x1)
1256 : :
1257 : : #define NGBE_MDIOMODE 0x011220
1258 : : #define NGBE_MDIOMODE_MASK MS(0, 0xF)
1259 : : #define NGBE_MDIOMODE_PRT3CL22 MS(3, 0x1)
1260 : : #define NGBE_MDIOMODE_PRT2CL22 MS(2, 0x1)
1261 : : #define NGBE_MDIOMODE_PRT1CL22 MS(1, 0x1)
1262 : : #define NGBE_MDIOMODE_PRT0CL22 MS(0, 0x1)
1263 : :
1264 : : #define NGBE_LLDP_REG 0x0F1000
1265 : :
1266 : : #define NVM_OROM_OFFSET 0x17
1267 : : #define NVM_OROM_BLK_LOW 0x83
1268 : : #define NVM_OROM_BLK_HI 0x84
1269 : : #define NVM_OROM_PATCH_MASK 0xFF
1270 : : #define NVM_OROM_SHIFT 8
1271 : : #define NVM_VER_MASK 0x00FF /* version mask */
1272 : : #define NVM_VER_SHIFT 8 /* version bit shift */
1273 : : #define NVM_OEM_PROD_VER_PTR 0x1B /* OEM Product version block pointer */
1274 : : #define NVM_OEM_PROD_VER_CAP_OFF 0x1 /* OEM Product version format offset */
1275 : : #define NVM_OEM_PROD_VER_OFF_L 0x2 /* OEM Product version offset low */
1276 : : #define NVM_OEM_PROD_VER_OFF_H 0x3 /* OEM Product version offset high */
1277 : : #define NVM_OEM_PROD_VER_CAP_MASK 0xF /* OEM Product version cap mask */
1278 : : #define NVM_OEM_PROD_VER_MOD_LEN 0x3 /* OEM Product version module length */
1279 : : #define NVM_ETK_OFF_LOW 0x2D /* version low order word */
1280 : : #define NVM_ETK_OFF_HI 0x2E /* version high order word */
1281 : : #define NVM_ETK_SHIFT 16 /* high version word shift */
1282 : : #define NVM_VER_INVALID 0xFFFF
1283 : : #define NVM_ETK_VALID 0x8000
1284 : : #define NVM_INVALID_PTR 0xFFFF
1285 : : #define NVM_VER_SIZE 32 /* version string size */
1286 : :
1287 : : #define NGBE_REG_RSSTBL NGBE_RSSTBL(0)
1288 : : #define NGBE_REG_RSSKEY NGBE_RSSKEY(0)
1289 : :
1290 : : /*
1291 : : * read non-rc counters
1292 : : */
1293 : : #define NGBE_UPDCNT32(reg, last, cur) \
1294 : : do { \
1295 : : uint32_t latest = rd32(hw, reg); \
1296 : : if (hw->offset_loaded || hw->rx_loaded) \
1297 : : last = 0; \
1298 : : cur += (latest - last) & UINT_MAX; \
1299 : : last = latest; \
1300 : : } while (0)
1301 : :
1302 : : #define NGBE_UPDCNT36(regl, last, cur) \
1303 : : do { \
1304 : : uint64_t new_lsb = rd32(hw, regl); \
1305 : : uint64_t new_msb = rd32(hw, regl + 4); \
1306 : : uint64_t latest = ((new_msb << 32) | new_lsb); \
1307 : : if (hw->offset_loaded || hw->rx_loaded) \
1308 : : last = 0; \
1309 : : cur += (0x1000000000LL + latest - last) & 0xFFFFFFFFFLL; \
1310 : : last = latest; \
1311 : : } while (0)
1312 : :
1313 : : /**
1314 : : * register operations
1315 : : **/
1316 : : #define NGBE_REG_READ32(addr) rte_read32(addr)
1317 : : #define NGBE_REG_READ32_RELAXED(addr) rte_read32_relaxed(addr)
1318 : : #define NGBE_REG_WRITE32(addr, val) rte_write32(val, addr)
1319 : : #define NGBE_REG_WRITE32_RELAXED(addr, val) rte_write32_relaxed(val, addr)
1320 : :
1321 : : #define NGBE_DEAD_READ_REG 0xdeadbeefU
1322 : : #define NGBE_FAILED_READ_REG 0xffffffffU
1323 : : #define NGBE_REG_ADDR(hw, reg) \
1324 : : ((volatile u32 *)((char *)(hw)->hw_addr + (reg)))
1325 : :
1326 : : static inline u32
1327 : : ngbe_get32(volatile u32 *addr)
1328 : : {
1329 : : u32 val = NGBE_REG_READ32(addr);
1330 : : return rte_le_to_cpu_32(val);
1331 : : }
1332 : :
1333 : : static inline void
1334 : : ngbe_set32(volatile u32 *addr, u32 val)
1335 : : {
1336 : : val = rte_cpu_to_le_32(val);
1337 : : NGBE_REG_WRITE32(addr, val);
1338 : 0 : }
1339 : :
1340 : : static inline u32
1341 : : ngbe_get32_masked(volatile u32 *addr, u32 mask)
1342 : : {
1343 : : u32 val = ngbe_get32(addr);
1344 : : val &= mask;
1345 : : return val;
1346 : : }
1347 : :
1348 : : static inline void
1349 : : ngbe_set32_masked(volatile u32 *addr, u32 mask, u32 field)
1350 : : {
1351 : : u32 val = ngbe_get32(addr);
1352 : 0 : val = ((val & ~mask) | (field & mask));
1353 : : ngbe_set32(addr, val);
1354 : 0 : }
1355 : :
1356 : : static inline u32
1357 : : ngbe_get32_relaxed(volatile u32 *addr)
1358 : : {
1359 : : u32 val = NGBE_REG_READ32_RELAXED(addr);
1360 : : return rte_le_to_cpu_32(val);
1361 : : }
1362 : :
1363 : : static inline void
1364 : : ngbe_set32_relaxed(volatile u32 *addr, u32 val)
1365 : : {
1366 : : val = rte_cpu_to_le_32(val);
1367 : : NGBE_REG_WRITE32_RELAXED(addr, val);
1368 : 0 : }
1369 : :
1370 : : static inline u32
1371 : : rd32(struct ngbe_hw *hw, u32 reg)
1372 : : {
1373 [ # # # # ]: 0 : if (reg == NGBE_REG_DUMMY)
1374 : : return 0;
1375 : 0 : return ngbe_get32(NGBE_REG_ADDR(hw, reg));
1376 : : }
1377 : :
1378 : : static inline void
1379 : : wr32(struct ngbe_hw *hw, u32 reg, u32 val)
1380 : : {
1381 : : if (reg == NGBE_REG_DUMMY)
1382 : : return;
1383 : 0 : ngbe_set32(NGBE_REG_ADDR(hw, reg), val);
1384 : : }
1385 : :
1386 : : static inline u32
1387 : : rd32m(struct ngbe_hw *hw, u32 reg, u32 mask)
1388 : : {
1389 : : u32 val = rd32(hw, reg);
1390 [ # # # # ]: 0 : val &= mask;
1391 : : return val;
1392 : : }
1393 : :
1394 : : static inline void
1395 : : wr32m(struct ngbe_hw *hw, u32 reg, u32 mask, u32 field)
1396 : : {
1397 : : u32 val = rd32(hw, reg);
1398 : 0 : val = ((val & ~mask) | (field & mask));
1399 : : wr32(hw, reg, val);
1400 : : }
1401 : :
1402 : : static inline u64
1403 : : rd64(struct ngbe_hw *hw, u32 reg)
1404 : : {
1405 : 0 : u64 lsb = rd32(hw, reg);
1406 : 0 : u64 msb = rd32(hw, reg + 4);
1407 : 0 : return (lsb | msb << 32);
1408 : : }
1409 : :
1410 : : static inline void
1411 : : wr64(struct ngbe_hw *hw, u32 reg, u64 val)
1412 : : {
1413 : : wr32(hw, reg, (u32)val);
1414 : : wr32(hw, reg + 4, (u32)(val >> 32));
1415 : : }
1416 : :
1417 : : /* poll register */
1418 : : static inline u32
1419 : 0 : po32m(struct ngbe_hw *hw, u32 reg, u32 mask, u32 expect, u32 *actual,
1420 : : u32 loop, u32 slice)
1421 : : {
1422 : : bool usec = true;
1423 : : u32 value = 0, all = 0;
1424 : :
1425 [ # # ]: 0 : if (slice > 1000 * MAX_UDELAY_MS) {
1426 : : usec = false;
1427 : 0 : slice = (slice + 500) / 1000;
1428 : : }
1429 : :
1430 : : do {
1431 [ # # ]: 0 : if (expect != 0) {
1432 : 0 : all |= rd32(hw, reg);
1433 : 0 : value |= mask & all;
1434 : : } else {
1435 : : all = rd32(hw, reg);
1436 : 0 : value = mask & all;
1437 : : }
1438 [ # # # # ]: 0 : if (value == expect)
1439 : : break;
1440 : :
1441 [ # # ]: 0 : usec ? usec_delay(slice) : msec_delay(slice);
1442 [ # # # # ]: 0 : } while (--loop > 0);
1443 : :
1444 [ # # ]: 0 : if (actual)
1445 : 0 : *actual = all;
1446 : :
1447 : 0 : return loop;
1448 : : }
1449 : :
1450 : : /* flush all write operations */
1451 : : #define ngbe_flush(hw) rd32(hw, 0x00100C)
1452 : :
1453 : : #define rd32a(hw, reg, idx) ( \
1454 : : rd32((hw), (reg) + ((idx) << 2)))
1455 : : #define wr32a(hw, reg, idx, val) \
1456 : : wr32((hw), (reg) + ((idx) << 2), (val))
1457 : :
1458 : : #define rd32w(hw, reg, mask, slice) do { \
1459 : : rd32((hw), reg); \
1460 : : po32m((hw), reg, mask, mask, NULL, 5, slice); \
1461 : : } while (0)
1462 : :
1463 : : #define wr32w(hw, reg, val, mask, slice) do { \
1464 : : wr32((hw), reg, val); \
1465 : : po32m((hw), reg, mask, mask, NULL, 5, slice); \
1466 : : } while (0)
1467 : :
1468 : : #define NGBE_XPCS_IDAADDR 0x13000
1469 : : #define NGBE_XPCS_IDADATA 0x13004
1470 : : #define NGBE_EPHY_IDAADDR 0x13008
1471 : : #define NGBE_EPHY_IDADATA 0x1300C
1472 : : static inline u32
1473 : : rd32_epcs(struct ngbe_hw *hw, u32 addr)
1474 : : {
1475 : : u32 data;
1476 : : wr32(hw, NGBE_XPCS_IDAADDR, addr);
1477 : : data = rd32(hw, NGBE_XPCS_IDADATA);
1478 : : return data;
1479 : : }
1480 : :
1481 : : static inline void
1482 : : wr32_epcs(struct ngbe_hw *hw, u32 addr, u32 data)
1483 : : {
1484 : : wr32(hw, NGBE_XPCS_IDAADDR, addr);
1485 : : wr32(hw, NGBE_XPCS_IDADATA, data);
1486 : : }
1487 : :
1488 : : static inline u32
1489 : : rd32_ephy(struct ngbe_hw *hw, u32 addr)
1490 : : {
1491 : : u32 data;
1492 : : wr32(hw, NGBE_EPHY_IDAADDR, addr);
1493 : : data = rd32(hw, NGBE_EPHY_IDADATA);
1494 : : return data;
1495 : : }
1496 : :
1497 : : static inline void
1498 : : wr32_ephy(struct ngbe_hw *hw, u32 addr, u32 data)
1499 : : {
1500 : : wr32(hw, NGBE_EPHY_IDAADDR, addr);
1501 : : wr32(hw, NGBE_EPHY_IDADATA, data);
1502 : : }
1503 : :
1504 : : #endif /* _NGBE_REGS_H_ */
|