1 // SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
2 /* Copyright (C) 2014-2017 aQuantia Corporation. */
4 /* File hw_atl_llh.c: Definitions of bitfield and register access functions for
8 #include "hw_atl_llh.h"
10 #include "../atl_hw_regs.h"
11 #include "hw_atl_llh_internal.h"
14 void hw_atl_reg_glb_cpu_sem_set(struct aq_hw_s *aq_hw, u32 glb_cpu_sem,
17 aq_hw_write_reg(aq_hw, HW_ATL_GLB_CPU_SEM_ADR(semaphore), glb_cpu_sem);
20 u32 hw_atl_reg_glb_cpu_sem_get(struct aq_hw_s *aq_hw, u32 semaphore)
22 return aq_hw_read_reg(aq_hw, HW_ATL_GLB_CPU_SEM_ADR(semaphore));
25 void hw_atl_glb_glb_reg_res_dis_set(struct aq_hw_s *aq_hw, u32 glb_reg_res_dis)
27 aq_hw_write_reg_bit(aq_hw, HW_ATL_GLB_REG_RES_DIS_ADR,
28 HW_ATL_GLB_REG_RES_DIS_MSK,
29 HW_ATL_GLB_REG_RES_DIS_SHIFT,
33 void hw_atl_glb_soft_res_set(struct aq_hw_s *aq_hw, u32 soft_res)
35 aq_hw_write_reg_bit(aq_hw, HW_ATL_GLB_SOFT_RES_ADR,
36 HW_ATL_GLB_SOFT_RES_MSK,
37 HW_ATL_GLB_SOFT_RES_SHIFT, soft_res);
40 u32 hw_atl_glb_soft_res_get(struct aq_hw_s *aq_hw)
42 return aq_hw_read_reg_bit(aq_hw, HW_ATL_GLB_SOFT_RES_ADR,
43 HW_ATL_GLB_SOFT_RES_MSK,
44 HW_ATL_GLB_SOFT_RES_SHIFT);
47 u32 hw_atl_reg_glb_mif_id_get(struct aq_hw_s *aq_hw)
49 return aq_hw_read_reg(aq_hw, HW_ATL_GLB_MIF_ID_ADR);
53 u32 hw_atl_rpb_rx_dma_drop_pkt_cnt_get(struct aq_hw_s *aq_hw)
55 return aq_hw_read_reg(aq_hw, HW_ATL_RPB_RX_DMA_DROP_PKT_CNT_ADR);
58 u32 hw_atl_stats_rx_dma_good_octet_counterlsw_get(struct aq_hw_s *aq_hw)
60 return aq_hw_read_reg(aq_hw, HW_ATL_STATS_RX_DMA_GOOD_OCTET_COUNTERLSW);
63 u32 hw_atl_stats_rx_dma_good_pkt_counterlsw_get(struct aq_hw_s *aq_hw)
65 return aq_hw_read_reg(aq_hw, HW_ATL_STATS_RX_DMA_GOOD_PKT_COUNTERLSW);
68 u32 hw_atl_stats_tx_dma_good_octet_counterlsw_get(struct aq_hw_s *aq_hw)
70 return aq_hw_read_reg(aq_hw, HW_ATL_STATS_TX_DMA_GOOD_OCTET_COUNTERLSW);
73 u32 hw_atl_stats_tx_dma_good_pkt_counterlsw_get(struct aq_hw_s *aq_hw)
75 return aq_hw_read_reg(aq_hw, HW_ATL_STATS_TX_DMA_GOOD_PKT_COUNTERLSW);
78 u32 hw_atl_stats_rx_dma_good_octet_countermsw_get(struct aq_hw_s *aq_hw)
80 return aq_hw_read_reg(aq_hw, HW_ATL_STATS_RX_DMA_GOOD_OCTET_COUNTERMSW);
83 u32 hw_atl_stats_rx_dma_good_pkt_countermsw_get(struct aq_hw_s *aq_hw)
85 return aq_hw_read_reg(aq_hw, HW_ATL_STATS_RX_DMA_GOOD_PKT_COUNTERMSW);
88 u32 hw_atl_stats_tx_dma_good_octet_countermsw_get(struct aq_hw_s *aq_hw)
90 return aq_hw_read_reg(aq_hw, HW_ATL_STATS_TX_DMA_GOOD_OCTET_COUNTERMSW);
93 u32 hw_atl_stats_tx_dma_good_pkt_countermsw_get(struct aq_hw_s *aq_hw)
95 return aq_hw_read_reg(aq_hw, HW_ATL_STATS_TX_DMA_GOOD_PKT_COUNTERMSW);
99 void hw_atl_itr_irq_auto_masklsw_set(struct aq_hw_s *aq_hw,
100 u32 irq_auto_masklsw)
102 aq_hw_write_reg(aq_hw, HW_ATL_ITR_IAMRLSW_ADR, irq_auto_masklsw);
105 void hw_atl_itr_irq_map_en_rx_set(struct aq_hw_s *aq_hw, u32 irq_map_en_rx,
108 /* register address for bitfield imr_rx{r}_en */
109 static const u32 itr_imr_rxren_adr[32] = {
110 0x00002100U, 0x00002100U, 0x00002104U, 0x00002104U,
111 0x00002108U, 0x00002108U, 0x0000210CU, 0x0000210CU,
112 0x00002110U, 0x00002110U, 0x00002114U, 0x00002114U,
113 0x00002118U, 0x00002118U, 0x0000211CU, 0x0000211CU,
114 0x00002120U, 0x00002120U, 0x00002124U, 0x00002124U,
115 0x00002128U, 0x00002128U, 0x0000212CU, 0x0000212CU,
116 0x00002130U, 0x00002130U, 0x00002134U, 0x00002134U,
117 0x00002138U, 0x00002138U, 0x0000213CU, 0x0000213CU
120 /* bitmask for bitfield imr_rx{r}_en */
121 static const u32 itr_imr_rxren_msk[32] = {
122 0x00008000U, 0x00000080U, 0x00008000U, 0x00000080U,
123 0x00008000U, 0x00000080U, 0x00008000U, 0x00000080U,
124 0x00008000U, 0x00000080U, 0x00008000U, 0x00000080U,
125 0x00008000U, 0x00000080U, 0x00008000U, 0x00000080U,
126 0x00008000U, 0x00000080U, 0x00008000U, 0x00000080U,
127 0x00008000U, 0x00000080U, 0x00008000U, 0x00000080U,
128 0x00008000U, 0x00000080U, 0x00008000U, 0x00000080U,
129 0x00008000U, 0x00000080U, 0x00008000U, 0x00000080U
132 /* lower bit position of bitfield imr_rx{r}_en */
133 static const u32 itr_imr_rxren_shift[32] = {
134 15U, 7U, 15U, 7U, 15U, 7U, 15U, 7U,
135 15U, 7U, 15U, 7U, 15U, 7U, 15U, 7U,
136 15U, 7U, 15U, 7U, 15U, 7U, 15U, 7U,
137 15U, 7U, 15U, 7U, 15U, 7U, 15U, 7U
140 aq_hw_write_reg_bit(aq_hw, itr_imr_rxren_adr[rx],
141 itr_imr_rxren_msk[rx],
142 itr_imr_rxren_shift[rx],
146 void hw_atl_itr_irq_map_en_tx_set(struct aq_hw_s *aq_hw, u32 irq_map_en_tx,
149 /* register address for bitfield imr_tx{t}_en */
150 static const u32 itr_imr_txten_adr[32] = {
151 0x00002100U, 0x00002100U, 0x00002104U, 0x00002104U,
152 0x00002108U, 0x00002108U, 0x0000210CU, 0x0000210CU,
153 0x00002110U, 0x00002110U, 0x00002114U, 0x00002114U,
154 0x00002118U, 0x00002118U, 0x0000211CU, 0x0000211CU,
155 0x00002120U, 0x00002120U, 0x00002124U, 0x00002124U,
156 0x00002128U, 0x00002128U, 0x0000212CU, 0x0000212CU,
157 0x00002130U, 0x00002130U, 0x00002134U, 0x00002134U,
158 0x00002138U, 0x00002138U, 0x0000213CU, 0x0000213CU
161 /* bitmask for bitfield imr_tx{t}_en */
162 static const u32 itr_imr_txten_msk[32] = {
163 0x80000000U, 0x00800000U, 0x80000000U, 0x00800000U,
164 0x80000000U, 0x00800000U, 0x80000000U, 0x00800000U,
165 0x80000000U, 0x00800000U, 0x80000000U, 0x00800000U,
166 0x80000000U, 0x00800000U, 0x80000000U, 0x00800000U,
167 0x80000000U, 0x00800000U, 0x80000000U, 0x00800000U,
168 0x80000000U, 0x00800000U, 0x80000000U, 0x00800000U,
169 0x80000000U, 0x00800000U, 0x80000000U, 0x00800000U,
170 0x80000000U, 0x00800000U, 0x80000000U, 0x00800000U
173 /* lower bit position of bitfield imr_tx{t}_en */
174 static const u32 itr_imr_txten_shift[32] = {
175 31U, 23U, 31U, 23U, 31U, 23U, 31U, 23U,
176 31U, 23U, 31U, 23U, 31U, 23U, 31U, 23U,
177 31U, 23U, 31U, 23U, 31U, 23U, 31U, 23U,
178 31U, 23U, 31U, 23U, 31U, 23U, 31U, 23U
181 aq_hw_write_reg_bit(aq_hw, itr_imr_txten_adr[tx],
182 itr_imr_txten_msk[tx],
183 itr_imr_txten_shift[tx],
187 void hw_atl_itr_irq_map_rx_set(struct aq_hw_s *aq_hw, u32 irq_map_rx, u32 rx)
189 /* register address for bitfield imr_rx{r}[4:0] */
190 static const u32 itr_imr_rxr_adr[32] = {
191 0x00002100U, 0x00002100U, 0x00002104U, 0x00002104U,
192 0x00002108U, 0x00002108U, 0x0000210CU, 0x0000210CU,
193 0x00002110U, 0x00002110U, 0x00002114U, 0x00002114U,
194 0x00002118U, 0x00002118U, 0x0000211CU, 0x0000211CU,
195 0x00002120U, 0x00002120U, 0x00002124U, 0x00002124U,
196 0x00002128U, 0x00002128U, 0x0000212CU, 0x0000212CU,
197 0x00002130U, 0x00002130U, 0x00002134U, 0x00002134U,
198 0x00002138U, 0x00002138U, 0x0000213CU, 0x0000213CU
201 /* bitmask for bitfield imr_rx{r}[4:0] */
202 static const u32 itr_imr_rxr_msk[32] = {
203 0x00001f00U, 0x0000001FU, 0x00001F00U, 0x0000001FU,
204 0x00001f00U, 0x0000001FU, 0x00001F00U, 0x0000001FU,
205 0x00001f00U, 0x0000001FU, 0x00001F00U, 0x0000001FU,
206 0x00001f00U, 0x0000001FU, 0x00001F00U, 0x0000001FU,
207 0x00001f00U, 0x0000001FU, 0x00001F00U, 0x0000001FU,
208 0x00001f00U, 0x0000001FU, 0x00001F00U, 0x0000001FU,
209 0x00001f00U, 0x0000001FU, 0x00001F00U, 0x0000001FU,
210 0x00001f00U, 0x0000001FU, 0x00001F00U, 0x0000001FU
213 /* lower bit position of bitfield imr_rx{r}[4:0] */
214 static const u32 itr_imr_rxr_shift[32] = {
215 8U, 0U, 8U, 0U, 8U, 0U, 8U, 0U,
216 8U, 0U, 8U, 0U, 8U, 0U, 8U, 0U,
217 8U, 0U, 8U, 0U, 8U, 0U, 8U, 0U,
218 8U, 0U, 8U, 0U, 8U, 0U, 8U, 0U
221 aq_hw_write_reg_bit(aq_hw, itr_imr_rxr_adr[rx],
223 itr_imr_rxr_shift[rx],
227 void hw_atl_itr_irq_map_tx_set(struct aq_hw_s *aq_hw, u32 irq_map_tx, u32 tx)
229 /* register address for bitfield imr_tx{t}[4:0] */
230 static const u32 itr_imr_txt_adr[32] = {
231 0x00002100U, 0x00002100U, 0x00002104U, 0x00002104U,
232 0x00002108U, 0x00002108U, 0x0000210CU, 0x0000210CU,
233 0x00002110U, 0x00002110U, 0x00002114U, 0x00002114U,
234 0x00002118U, 0x00002118U, 0x0000211CU, 0x0000211CU,
235 0x00002120U, 0x00002120U, 0x00002124U, 0x00002124U,
236 0x00002128U, 0x00002128U, 0x0000212CU, 0x0000212CU,
237 0x00002130U, 0x00002130U, 0x00002134U, 0x00002134U,
238 0x00002138U, 0x00002138U, 0x0000213CU, 0x0000213CU
241 /* bitmask for bitfield imr_tx{t}[4:0] */
242 static const u32 itr_imr_txt_msk[32] = {
243 0x1f000000U, 0x001F0000U, 0x1F000000U, 0x001F0000U,
244 0x1f000000U, 0x001F0000U, 0x1F000000U, 0x001F0000U,
245 0x1f000000U, 0x001F0000U, 0x1F000000U, 0x001F0000U,
246 0x1f000000U, 0x001F0000U, 0x1F000000U, 0x001F0000U,
247 0x1f000000U, 0x001F0000U, 0x1F000000U, 0x001F0000U,
248 0x1f000000U, 0x001F0000U, 0x1F000000U, 0x001F0000U,
249 0x1f000000U, 0x001F0000U, 0x1F000000U, 0x001F0000U,
250 0x1f000000U, 0x001F0000U, 0x1F000000U, 0x001F0000U
253 /* lower bit position of bitfield imr_tx{t}[4:0] */
254 static const u32 itr_imr_txt_shift[32] = {
255 24U, 16U, 24U, 16U, 24U, 16U, 24U, 16U,
256 24U, 16U, 24U, 16U, 24U, 16U, 24U, 16U,
257 24U, 16U, 24U, 16U, 24U, 16U, 24U, 16U,
258 24U, 16U, 24U, 16U, 24U, 16U, 24U, 16U
261 aq_hw_write_reg_bit(aq_hw, itr_imr_txt_adr[tx],
263 itr_imr_txt_shift[tx],
267 void hw_atl_itr_irq_msk_clearlsw_set(struct aq_hw_s *aq_hw,
268 u32 irq_msk_clearlsw)
270 aq_hw_write_reg(aq_hw, HW_ATL_ITR_IMCRLSW_ADR, irq_msk_clearlsw);
273 void hw_atl_itr_irq_msk_setlsw_set(struct aq_hw_s *aq_hw, u32 irq_msk_setlsw)
275 aq_hw_write_reg(aq_hw, HW_ATL_ITR_IMSRLSW_ADR, irq_msk_setlsw);
278 void hw_atl_itr_irq_reg_res_dis_set(struct aq_hw_s *aq_hw, u32 irq_reg_res_dis)
280 aq_hw_write_reg_bit(aq_hw, HW_ATL_ITR_REG_RES_DSBL_ADR,
281 HW_ATL_ITR_REG_RES_DSBL_MSK,
282 HW_ATL_ITR_REG_RES_DSBL_SHIFT, irq_reg_res_dis);
285 void hw_atl_itr_irq_status_clearlsw_set(struct aq_hw_s *aq_hw,
286 u32 irq_status_clearlsw)
288 aq_hw_write_reg(aq_hw, HW_ATL_ITR_ISCRLSW_ADR, irq_status_clearlsw);
291 u32 hw_atl_itr_irq_statuslsw_get(struct aq_hw_s *aq_hw)
293 return aq_hw_read_reg(aq_hw, HW_ATL_ITR_ISRLSW_ADR);
296 u32 hw_atl_itr_res_irq_get(struct aq_hw_s *aq_hw)
298 return aq_hw_read_reg_bit(aq_hw, HW_ATL_ITR_RES_ADR, HW_ATL_ITR_RES_MSK,
299 HW_ATL_ITR_RES_SHIFT);
302 void hw_atl_itr_res_irq_set(struct aq_hw_s *aq_hw, u32 res_irq)
304 aq_hw_write_reg_bit(aq_hw, HW_ATL_ITR_RES_ADR, HW_ATL_ITR_RES_MSK,
305 HW_ATL_ITR_RES_SHIFT, res_irq);
309 void hw_atl_rdm_cpu_id_set(struct aq_hw_s *aq_hw, u32 cpuid, u32 dca)
311 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DCADCPUID_ADR(dca),
312 HW_ATL_RDM_DCADCPUID_MSK,
313 HW_ATL_RDM_DCADCPUID_SHIFT, cpuid);
316 void hw_atl_rdm_rx_dca_en_set(struct aq_hw_s *aq_hw, u32 rx_dca_en)
318 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DCA_EN_ADR, HW_ATL_RDM_DCA_EN_MSK,
319 HW_ATL_RDM_DCA_EN_SHIFT, rx_dca_en);
322 void hw_atl_rdm_rx_dca_mode_set(struct aq_hw_s *aq_hw, u32 rx_dca_mode)
324 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DCA_MODE_ADR,
325 HW_ATL_RDM_DCA_MODE_MSK,
326 HW_ATL_RDM_DCA_MODE_SHIFT, rx_dca_mode);
329 void hw_atl_rdm_rx_desc_data_buff_size_set(struct aq_hw_s *aq_hw,
330 u32 rx_desc_data_buff_size,
333 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DESCDDATA_SIZE_ADR(descriptor),
334 HW_ATL_RDM_DESCDDATA_SIZE_MSK,
335 HW_ATL_RDM_DESCDDATA_SIZE_SHIFT,
336 rx_desc_data_buff_size);
339 void hw_atl_rdm_rx_desc_dca_en_set(struct aq_hw_s *aq_hw, u32 rx_desc_dca_en,
342 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DCADDESC_EN_ADR(dca),
343 HW_ATL_RDM_DCADDESC_EN_MSK,
344 HW_ATL_RDM_DCADDESC_EN_SHIFT,
348 void hw_atl_rdm_rx_desc_en_set(struct aq_hw_s *aq_hw, u32 rx_desc_en,
351 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DESCDEN_ADR(descriptor),
352 HW_ATL_RDM_DESCDEN_MSK,
353 HW_ATL_RDM_DESCDEN_SHIFT,
357 void hw_atl_rdm_rx_desc_head_buff_size_set(struct aq_hw_s *aq_hw,
358 u32 rx_desc_head_buff_size,
361 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DESCDHDR_SIZE_ADR(descriptor),
362 HW_ATL_RDM_DESCDHDR_SIZE_MSK,
363 HW_ATL_RDM_DESCDHDR_SIZE_SHIFT,
364 rx_desc_head_buff_size);
367 void hw_atl_rdm_rx_desc_head_splitting_set(struct aq_hw_s *aq_hw,
368 u32 rx_desc_head_splitting,
371 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DESCDHDR_SPLIT_ADR(descriptor),
372 HW_ATL_RDM_DESCDHDR_SPLIT_MSK,
373 HW_ATL_RDM_DESCDHDR_SPLIT_SHIFT,
374 rx_desc_head_splitting);
377 u32 hw_atl_rdm_rx_desc_head_ptr_get(struct aq_hw_s *aq_hw, u32 descriptor)
379 return aq_hw_read_reg_bit(aq_hw, HW_ATL_RDM_DESCDHD_ADR(descriptor),
380 HW_ATL_RDM_DESCDHD_MSK,
381 HW_ATL_RDM_DESCDHD_SHIFT);
384 void hw_atl_rdm_rx_desc_len_set(struct aq_hw_s *aq_hw, u32 rx_desc_len,
387 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DESCDLEN_ADR(descriptor),
388 HW_ATL_RDM_DESCDLEN_MSK, HW_ATL_RDM_DESCDLEN_SHIFT,
392 void hw_atl_rdm_rx_desc_res_set(struct aq_hw_s *aq_hw, u32 rx_desc_res,
395 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DESCDRESET_ADR(descriptor),
396 HW_ATL_RDM_DESCDRESET_MSK,
397 HW_ATL_RDM_DESCDRESET_SHIFT,
401 void hw_atl_rdm_rx_desc_wr_wb_irq_en_set(struct aq_hw_s *aq_hw,
402 u32 rx_desc_wr_wb_irq_en)
404 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_INT_DESC_WRB_EN_ADR,
405 HW_ATL_RDM_INT_DESC_WRB_EN_MSK,
406 HW_ATL_RDM_INT_DESC_WRB_EN_SHIFT,
407 rx_desc_wr_wb_irq_en);
410 void hw_atl_rdm_rx_head_dca_en_set(struct aq_hw_s *aq_hw, u32 rx_head_dca_en,
413 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DCADHDR_EN_ADR(dca),
414 HW_ATL_RDM_DCADHDR_EN_MSK,
415 HW_ATL_RDM_DCADHDR_EN_SHIFT,
419 void hw_atl_rdm_rx_pld_dca_en_set(struct aq_hw_s *aq_hw, u32 rx_pld_dca_en,
422 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_DCADPAY_EN_ADR(dca),
423 HW_ATL_RDM_DCADPAY_EN_MSK,
424 HW_ATL_RDM_DCADPAY_EN_SHIFT,
428 void hw_atl_rdm_rdm_intr_moder_en_set(struct aq_hw_s *aq_hw,
429 u32 rdm_intr_moder_en)
431 aq_hw_write_reg_bit(aq_hw, HW_ATL_RDM_INT_RIM_EN_ADR,
432 HW_ATL_RDM_INT_RIM_EN_MSK,
433 HW_ATL_RDM_INT_RIM_EN_SHIFT,
438 void hw_atl_reg_gen_irq_map_set(struct aq_hw_s *aq_hw, u32 gen_intr_map,
441 aq_hw_write_reg(aq_hw, HW_ATL_GEN_INTR_MAP_ADR(regidx), gen_intr_map);
444 u32 hw_atl_reg_gen_irq_status_get(struct aq_hw_s *aq_hw)
446 return aq_hw_read_reg(aq_hw, HW_ATL_GEN_INTR_STAT_ADR);
449 void hw_atl_reg_irq_glb_ctl_set(struct aq_hw_s *aq_hw, u32 intr_glb_ctl)
451 aq_hw_write_reg(aq_hw, HW_ATL_INTR_GLB_CTL_ADR, intr_glb_ctl);
454 void hw_atl_reg_irq_thr_set(struct aq_hw_s *aq_hw, u32 intr_thr, u32 throttle)
456 aq_hw_write_reg(aq_hw, HW_ATL_INTR_THR_ADR(throttle), intr_thr);
459 void hw_atl_reg_rx_dma_desc_base_addresslswset(struct aq_hw_s *aq_hw,
460 u32 rx_dma_desc_base_addrlsw,
463 aq_hw_write_reg(aq_hw, HW_ATL_RX_DMA_DESC_BASE_ADDRLSW_ADR(descriptor),
464 rx_dma_desc_base_addrlsw);
467 void hw_atl_reg_rx_dma_desc_base_addressmswset(struct aq_hw_s *aq_hw,
468 u32 rx_dma_desc_base_addrmsw,
471 aq_hw_write_reg(aq_hw, HW_ATL_RX_DMA_DESC_BASE_ADDRMSW_ADR(descriptor),
472 rx_dma_desc_base_addrmsw);
475 u32 hw_atl_reg_rx_dma_desc_status_get(struct aq_hw_s *aq_hw, u32 descriptor)
477 return aq_hw_read_reg(aq_hw, HW_ATL_RX_DMA_DESC_STAT_ADR(descriptor));
480 void hw_atl_reg_rx_dma_desc_tail_ptr_set(struct aq_hw_s *aq_hw,
481 u32 rx_dma_desc_tail_ptr,
484 aq_hw_write_reg(aq_hw, HW_ATL_RX_DMA_DESC_TAIL_PTR_ADR(descriptor),
485 rx_dma_desc_tail_ptr);
488 void hw_atl_reg_rx_flr_mcst_flr_msk_set(struct aq_hw_s *aq_hw,
489 u32 rx_flr_mcst_flr_msk)
491 aq_hw_write_reg(aq_hw, HW_ATL_RX_FLR_MCST_FLR_MSK_ADR,
492 rx_flr_mcst_flr_msk);
495 void hw_atl_reg_rx_flr_mcst_flr_set(struct aq_hw_s *aq_hw, u32 rx_flr_mcst_flr,
498 aq_hw_write_reg(aq_hw, HW_ATL_RX_FLR_MCST_FLR_ADR(filter),
502 void hw_atl_reg_rx_flr_rss_control1set(struct aq_hw_s *aq_hw,
503 u32 rx_flr_rss_control1)
505 aq_hw_write_reg(aq_hw, HW_ATL_RX_FLR_RSS_CONTROL1_ADR,
506 rx_flr_rss_control1);
509 void hw_atl_reg_rx_flr_control2_set(struct aq_hw_s *aq_hw,
510 u32 rx_filter_control2)
512 aq_hw_write_reg(aq_hw, HW_ATL_RX_FLR_CONTROL2_ADR, rx_filter_control2);
515 void hw_atl_reg_rx_intr_moder_ctrl_set(struct aq_hw_s *aq_hw,
516 u32 rx_intr_moderation_ctl,
519 aq_hw_write_reg(aq_hw, HW_ATL_RX_INTR_MODERATION_CTL_ADR(queue),
520 rx_intr_moderation_ctl);
523 void hw_atl_reg_tx_dma_debug_ctl_set(struct aq_hw_s *aq_hw,
524 u32 tx_dma_debug_ctl)
526 aq_hw_write_reg(aq_hw, HW_ATL_TX_DMA_DEBUG_CTL_ADR, tx_dma_debug_ctl);
529 void hw_atl_reg_tx_dma_desc_base_addresslswset(struct aq_hw_s *aq_hw,
530 u32 tx_dma_desc_base_addrlsw,
533 aq_hw_write_reg(aq_hw, HW_ATL_TX_DMA_DESC_BASE_ADDRLSW_ADR(descriptor),
534 tx_dma_desc_base_addrlsw);
537 void hw_atl_reg_tx_dma_desc_base_addressmswset(struct aq_hw_s *aq_hw,
538 u32 tx_dma_desc_base_addrmsw,
541 aq_hw_write_reg(aq_hw, HW_ATL_TX_DMA_DESC_BASE_ADDRMSW_ADR(descriptor),
542 tx_dma_desc_base_addrmsw);
545 void hw_atl_reg_tx_dma_desc_tail_ptr_set(struct aq_hw_s *aq_hw,
546 u32 tx_dma_desc_tail_ptr,
551 aq_hw_write_reg(aq_hw, HW_ATL_TX_DMA_DESC_TAIL_PTR_ADR(descriptor),
552 tx_dma_desc_tail_ptr);
555 void hw_atl_reg_tx_intr_moder_ctrl_set(struct aq_hw_s *aq_hw,
556 u32 tx_intr_moderation_ctl,
559 aq_hw_write_reg(aq_hw, HW_ATL_TX_INTR_MODERATION_CTL_ADR(queue),
560 tx_intr_moderation_ctl);
563 /* RPB: rx packet buffer */
564 void hw_atl_rpb_dma_sys_lbk_set(struct aq_hw_s *aq_hw, u32 dma_sys_lbk)
566 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPB_DMA_SYS_LBK_ADR,
567 HW_ATL_RPB_DMA_SYS_LBK_MSK,
568 HW_ATL_RPB_DMA_SYS_LBK_SHIFT, dma_sys_lbk);
571 void hw_atl_rpb_rpf_rx_traf_class_mode_set(struct aq_hw_s *aq_hw,
572 u32 rx_traf_class_mode)
574 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPB_RPF_RX_TC_MODE_ADR,
575 HW_ATL_RPB_RPF_RX_TC_MODE_MSK,
576 HW_ATL_RPB_RPF_RX_TC_MODE_SHIFT,
580 u32 hw_atl_rpb_rpf_rx_traf_class_mode_get(struct aq_hw_s *aq_hw)
582 return aq_hw_read_reg_bit(aq_hw, HW_ATL_RPB_RPF_RX_TC_MODE_ADR,
583 HW_ATL_RPB_RPF_RX_TC_MODE_MSK,
584 HW_ATL_RPB_RPF_RX_TC_MODE_SHIFT);
587 void hw_atl_rpb_rx_buff_en_set(struct aq_hw_s *aq_hw, u32 rx_buff_en)
589 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPB_RX_BUF_EN_ADR,
590 HW_ATL_RPB_RX_BUF_EN_MSK,
591 HW_ATL_RPB_RX_BUF_EN_SHIFT, rx_buff_en);
594 void hw_atl_rpb_rx_buff_hi_threshold_per_tc_set(struct aq_hw_s *aq_hw,
595 u32 rx_buff_hi_threshold_per_tc,
598 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPB_RXBHI_THRESH_ADR(buffer),
599 HW_ATL_RPB_RXBHI_THRESH_MSK,
600 HW_ATL_RPB_RXBHI_THRESH_SHIFT,
601 rx_buff_hi_threshold_per_tc);
604 void hw_atl_rpb_rx_buff_lo_threshold_per_tc_set(struct aq_hw_s *aq_hw,
605 u32 rx_buff_lo_threshold_per_tc,
608 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPB_RXBLO_THRESH_ADR(buffer),
609 HW_ATL_RPB_RXBLO_THRESH_MSK,
610 HW_ATL_RPB_RXBLO_THRESH_SHIFT,
611 rx_buff_lo_threshold_per_tc);
614 void hw_atl_rpb_rx_flow_ctl_mode_set(struct aq_hw_s *aq_hw,
615 u32 rx_flow_ctl_mode)
617 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPB_RX_FC_MODE_ADR,
618 HW_ATL_RPB_RX_FC_MODE_MSK,
619 HW_ATL_RPB_RX_FC_MODE_SHIFT, rx_flow_ctl_mode);
622 void hw_atl_rpb_rx_pkt_buff_size_per_tc_set(struct aq_hw_s *aq_hw,
623 u32 rx_pkt_buff_size_per_tc,
626 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPB_RXBBUF_SIZE_ADR(buffer),
627 HW_ATL_RPB_RXBBUF_SIZE_MSK,
628 HW_ATL_RPB_RXBBUF_SIZE_SHIFT,
629 rx_pkt_buff_size_per_tc);
632 void hw_atl_rpb_rx_xoff_en_per_tc_set(struct aq_hw_s *aq_hw,
633 u32 rx_xoff_en_per_tc,
636 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPB_RXBXOFF_EN_ADR(buffer),
637 HW_ATL_RPB_RXBXOFF_EN_MSK,
638 HW_ATL_RPB_RXBXOFF_EN_SHIFT,
644 void hw_atl_rpfl2broadcast_count_threshold_set(struct aq_hw_s *aq_hw,
645 u32 l2broadcast_count_threshold)
647 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPFL2BC_THRESH_ADR,
648 HW_ATL_RPFL2BC_THRESH_MSK,
649 HW_ATL_RPFL2BC_THRESH_SHIFT,
650 l2broadcast_count_threshold);
653 void hw_atl_rpfl2broadcast_en_set(struct aq_hw_s *aq_hw, u32 l2broadcast_en)
655 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPFL2BC_EN_ADR, HW_ATL_RPFL2BC_EN_MSK,
656 HW_ATL_RPFL2BC_EN_SHIFT, l2broadcast_en);
659 void hw_atl_rpfl2broadcast_flr_act_set(struct aq_hw_s *aq_hw,
660 u32 l2broadcast_flr_act)
662 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPFL2BC_ACT_ADR,
663 HW_ATL_RPFL2BC_ACT_MSK,
664 HW_ATL_RPFL2BC_ACT_SHIFT, l2broadcast_flr_act);
667 void hw_atl_rpfl2multicast_flr_en_set(struct aq_hw_s *aq_hw,
668 u32 l2multicast_flr_en,
671 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPFL2MC_ENF_ADR(filter),
672 HW_ATL_RPFL2MC_ENF_MSK,
673 HW_ATL_RPFL2MC_ENF_SHIFT, l2multicast_flr_en);
676 void hw_atl_rpfl2promiscuous_mode_en_set(struct aq_hw_s *aq_hw,
677 u32 l2promiscuous_mode_en)
679 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPFL2PROMIS_MODE_ADR,
680 HW_ATL_RPFL2PROMIS_MODE_MSK,
681 HW_ATL_RPFL2PROMIS_MODE_SHIFT,
682 l2promiscuous_mode_en);
685 void hw_atl_rpfl2unicast_flr_act_set(struct aq_hw_s *aq_hw,
686 u32 l2unicast_flr_act,
689 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPFL2UC_ACTF_ADR(filter),
690 HW_ATL_RPFL2UC_ACTF_MSK, HW_ATL_RPFL2UC_ACTF_SHIFT,
694 void hw_atl_rpfl2_uc_flr_en_set(struct aq_hw_s *aq_hw, u32 l2unicast_flr_en,
697 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPFL2UC_ENF_ADR(filter),
698 HW_ATL_RPFL2UC_ENF_MSK,
699 HW_ATL_RPFL2UC_ENF_SHIFT, l2unicast_flr_en);
702 void hw_atl_rpfl2unicast_dest_addresslsw_set(struct aq_hw_s *aq_hw,
703 u32 l2unicast_dest_addresslsw,
706 aq_hw_write_reg(aq_hw, HW_ATL_RPFL2UC_DAFLSW_ADR(filter),
707 l2unicast_dest_addresslsw);
710 void hw_atl_rpfl2unicast_dest_addressmsw_set(struct aq_hw_s *aq_hw,
711 u32 l2unicast_dest_addressmsw,
714 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPFL2UC_DAFMSW_ADR(filter),
715 HW_ATL_RPFL2UC_DAFMSW_MSK,
716 HW_ATL_RPFL2UC_DAFMSW_SHIFT,
717 l2unicast_dest_addressmsw);
720 void hw_atl_rpfl2_accept_all_mc_packets_set(struct aq_hw_s *aq_hw,
721 u32 l2_accept_all_mc_packets)
723 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPFL2MC_ACCEPT_ALL_ADR,
724 HW_ATL_RPFL2MC_ACCEPT_ALL_MSK,
725 HW_ATL_RPFL2MC_ACCEPT_ALL_SHIFT,
726 l2_accept_all_mc_packets);
729 void hw_atl_rpf_rpb_user_priority_tc_map_set(struct aq_hw_s *aq_hw,
730 u32 user_priority_tc_map, u32 tc)
732 /* register address for bitfield rx_tc_up{t}[2:0] */
733 static const u32 rpf_rpb_rx_tc_upt_adr[8] = {
734 0x000054c4U, 0x000054C4U, 0x000054C4U, 0x000054C4U,
735 0x000054c4U, 0x000054C4U, 0x000054C4U, 0x000054C4U
738 /* bitmask for bitfield rx_tc_up{t}[2:0] */
739 static const u32 rpf_rpb_rx_tc_upt_msk[8] = {
740 0x00000007U, 0x00000070U, 0x00000700U, 0x00007000U,
741 0x00070000U, 0x00700000U, 0x07000000U, 0x70000000U
744 /* lower bit position of bitfield rx_tc_up{t}[2:0] */
745 static const u32 rpf_rpb_rx_tc_upt_shft[8] = {
746 0U, 4U, 8U, 12U, 16U, 20U, 24U, 28U
749 aq_hw_write_reg_bit(aq_hw, rpf_rpb_rx_tc_upt_adr[tc],
750 rpf_rpb_rx_tc_upt_msk[tc],
751 rpf_rpb_rx_tc_upt_shft[tc],
752 user_priority_tc_map);
755 void hw_atl_rpf_rss_key_addr_set(struct aq_hw_s *aq_hw, u32 rss_key_addr)
757 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_RSS_KEY_ADDR_ADR,
758 HW_ATL_RPF_RSS_KEY_ADDR_MSK,
759 HW_ATL_RPF_RSS_KEY_ADDR_SHIFT,
763 void hw_atl_rpf_rss_key_wr_data_set(struct aq_hw_s *aq_hw, u32 rss_key_wr_data)
765 aq_hw_write_reg(aq_hw, HW_ATL_RPF_RSS_KEY_WR_DATA_ADR,
769 u32 hw_atl_rpf_rss_key_wr_en_get(struct aq_hw_s *aq_hw)
771 return aq_hw_read_reg_bit(aq_hw, HW_ATL_RPF_RSS_KEY_WR_ENI_ADR,
772 HW_ATL_RPF_RSS_KEY_WR_ENI_MSK,
773 HW_ATL_RPF_RSS_KEY_WR_ENI_SHIFT);
776 void hw_atl_rpf_rss_key_wr_en_set(struct aq_hw_s *aq_hw, u32 rss_key_wr_en)
778 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_RSS_KEY_WR_ENI_ADR,
779 HW_ATL_RPF_RSS_KEY_WR_ENI_MSK,
780 HW_ATL_RPF_RSS_KEY_WR_ENI_SHIFT,
784 void hw_atl_rpf_rss_redir_tbl_addr_set(struct aq_hw_s *aq_hw,
785 u32 rss_redir_tbl_addr)
787 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_RSS_REDIR_ADDR_ADR,
788 HW_ATL_RPF_RSS_REDIR_ADDR_MSK,
789 HW_ATL_RPF_RSS_REDIR_ADDR_SHIFT,
793 void hw_atl_rpf_rss_redir_tbl_wr_data_set(struct aq_hw_s *aq_hw,
794 u32 rss_redir_tbl_wr_data)
796 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_RSS_REDIR_WR_DATA_ADR,
797 HW_ATL_RPF_RSS_REDIR_WR_DATA_MSK,
798 HW_ATL_RPF_RSS_REDIR_WR_DATA_SHIFT,
799 rss_redir_tbl_wr_data);
802 u32 hw_atl_rpf_rss_redir_wr_en_get(struct aq_hw_s *aq_hw)
804 return aq_hw_read_reg_bit(aq_hw, HW_ATL_RPF_RSS_REDIR_WR_ENI_ADR,
805 HW_ATL_RPF_RSS_REDIR_WR_ENI_MSK,
806 HW_ATL_RPF_RSS_REDIR_WR_ENI_SHIFT);
809 void hw_atl_rpf_rss_redir_wr_en_set(struct aq_hw_s *aq_hw, u32 rss_redir_wr_en)
811 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_RSS_REDIR_WR_ENI_ADR,
812 HW_ATL_RPF_RSS_REDIR_WR_ENI_MSK,
813 HW_ATL_RPF_RSS_REDIR_WR_ENI_SHIFT, rss_redir_wr_en);
816 void hw_atl_rpf_tpo_to_rpf_sys_lbk_set(struct aq_hw_s *aq_hw,
817 u32 tpo_to_rpf_sys_lbk)
819 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_TPO_RPF_SYS_LBK_ADR,
820 HW_ATL_RPF_TPO_RPF_SYS_LBK_MSK,
821 HW_ATL_RPF_TPO_RPF_SYS_LBK_SHIFT,
825 void hw_atl_rpf_vlan_inner_etht_set(struct aq_hw_s *aq_hw, u32 vlan_inner_etht)
827 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_VL_INNER_TPID_ADR,
828 HW_ATL_RPF_VL_INNER_TPID_MSK,
829 HW_ATL_RPF_VL_INNER_TPID_SHIFT,
833 void hw_atl_rpf_vlan_outer_etht_set(struct aq_hw_s *aq_hw, u32 vlan_outer_etht)
835 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_VL_OUTER_TPID_ADR,
836 HW_ATL_RPF_VL_OUTER_TPID_MSK,
837 HW_ATL_RPF_VL_OUTER_TPID_SHIFT,
841 void hw_atl_rpf_vlan_prom_mode_en_set(struct aq_hw_s *aq_hw,
842 u32 vlan_prom_mode_en)
844 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_VL_PROMIS_MODE_ADR,
845 HW_ATL_RPF_VL_PROMIS_MODE_MSK,
846 HW_ATL_RPF_VL_PROMIS_MODE_SHIFT,
850 void hw_atl_rpf_vlan_accept_untagged_packets_set(struct aq_hw_s *aq_hw,
851 u32 vlan_acc_untagged_packets)
853 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_VL_ACCEPT_UNTAGGED_MODE_ADR,
854 HW_ATL_RPF_VL_ACCEPT_UNTAGGED_MODE_MSK,
855 HW_ATL_RPF_VL_ACCEPT_UNTAGGED_MODE_SHIFT,
856 vlan_acc_untagged_packets);
859 void hw_atl_rpf_vlan_untagged_act_set(struct aq_hw_s *aq_hw,
860 u32 vlan_untagged_act)
862 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_VL_UNTAGGED_ACT_ADR,
863 HW_ATL_RPF_VL_UNTAGGED_ACT_MSK,
864 HW_ATL_RPF_VL_UNTAGGED_ACT_SHIFT,
868 void hw_atl_rpf_vlan_flr_en_set(struct aq_hw_s *aq_hw, u32 vlan_flr_en,
871 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_VL_EN_F_ADR(filter),
872 HW_ATL_RPF_VL_EN_F_MSK,
873 HW_ATL_RPF_VL_EN_F_SHIFT,
877 void hw_atl_rpf_vlan_flr_act_set(struct aq_hw_s *aq_hw, u32 vlan_flr_act,
880 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_VL_ACT_F_ADR(filter),
881 HW_ATL_RPF_VL_ACT_F_MSK,
882 HW_ATL_RPF_VL_ACT_F_SHIFT,
886 void hw_atl_rpf_vlan_id_flr_set(struct aq_hw_s *aq_hw, u32 vlan_id_flr,
889 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_VL_ID_F_ADR(filter),
890 HW_ATL_RPF_VL_ID_F_MSK,
891 HW_ATL_RPF_VL_ID_F_SHIFT,
895 void hw_atl_rpf_etht_flr_en_set(struct aq_hw_s *aq_hw, u32 etht_flr_en,
898 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_ET_ENF_ADR(filter),
899 HW_ATL_RPF_ET_ENF_MSK,
900 HW_ATL_RPF_ET_ENF_SHIFT, etht_flr_en);
903 void hw_atl_rpf_etht_user_priority_en_set(struct aq_hw_s *aq_hw,
904 u32 etht_user_priority_en, u32 filter)
906 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_ET_UPFEN_ADR(filter),
907 HW_ATL_RPF_ET_UPFEN_MSK, HW_ATL_RPF_ET_UPFEN_SHIFT,
908 etht_user_priority_en);
911 void hw_atl_rpf_etht_rx_queue_en_set(struct aq_hw_s *aq_hw,
912 u32 etht_rx_queue_en,
915 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_ET_RXQFEN_ADR(filter),
916 HW_ATL_RPF_ET_RXQFEN_MSK,
917 HW_ATL_RPF_ET_RXQFEN_SHIFT,
921 void hw_atl_rpf_etht_user_priority_set(struct aq_hw_s *aq_hw,
922 u32 etht_user_priority,
925 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_ET_UPF_ADR(filter),
926 HW_ATL_RPF_ET_UPF_MSK,
927 HW_ATL_RPF_ET_UPF_SHIFT, etht_user_priority);
930 void hw_atl_rpf_etht_rx_queue_set(struct aq_hw_s *aq_hw, u32 etht_rx_queue,
933 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_ET_RXQF_ADR(filter),
934 HW_ATL_RPF_ET_RXQF_MSK,
935 HW_ATL_RPF_ET_RXQF_SHIFT, etht_rx_queue);
938 void hw_atl_rpf_etht_mgt_queue_set(struct aq_hw_s *aq_hw, u32 etht_mgt_queue,
941 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_ET_MNG_RXQF_ADR(filter),
942 HW_ATL_RPF_ET_MNG_RXQF_MSK,
943 HW_ATL_RPF_ET_MNG_RXQF_SHIFT,
947 void hw_atl_rpf_etht_flr_act_set(struct aq_hw_s *aq_hw, u32 etht_flr_act,
950 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_ET_ACTF_ADR(filter),
951 HW_ATL_RPF_ET_ACTF_MSK,
952 HW_ATL_RPF_ET_ACTF_SHIFT, etht_flr_act);
955 void hw_atl_rpf_etht_flr_set(struct aq_hw_s *aq_hw, u32 etht_flr, u32 filter)
957 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPF_ET_VALF_ADR(filter),
958 HW_ATL_RPF_ET_VALF_MSK,
959 HW_ATL_RPF_ET_VALF_SHIFT, etht_flr);
962 /* RPO: rx packet offload */
963 void hw_atl_rpo_ipv4header_crc_offload_en_set(struct aq_hw_s *aq_hw,
964 u32 ipv4header_crc_offload_en)
966 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPO_IPV4CHK_EN_ADR,
967 HW_ATL_RPO_IPV4CHK_EN_MSK,
968 HW_ATL_RPO_IPV4CHK_EN_SHIFT,
969 ipv4header_crc_offload_en);
972 void hw_atl_rpo_rx_desc_vlan_stripping_set(struct aq_hw_s *aq_hw,
973 u32 rx_desc_vlan_stripping,
976 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPO_DESCDVL_STRIP_ADR(descriptor),
977 HW_ATL_RPO_DESCDVL_STRIP_MSK,
978 HW_ATL_RPO_DESCDVL_STRIP_SHIFT,
979 rx_desc_vlan_stripping);
982 void hw_atl_rpo_tcp_udp_crc_offload_en_set(struct aq_hw_s *aq_hw,
983 u32 tcp_udp_crc_offload_en)
985 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPOL4CHK_EN_ADR,
986 HW_ATL_RPOL4CHK_EN_MSK,
987 HW_ATL_RPOL4CHK_EN_SHIFT, tcp_udp_crc_offload_en);
990 void hw_atl_rpo_lro_en_set(struct aq_hw_s *aq_hw, u32 lro_en)
992 aq_hw_write_reg(aq_hw, HW_ATL_RPO_LRO_EN_ADR, lro_en);
995 void hw_atl_rpo_lro_patch_optimization_en_set(struct aq_hw_s *aq_hw,
996 u32 lro_patch_optimization_en)
998 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPO_LRO_PTOPT_EN_ADR,
999 HW_ATL_RPO_LRO_PTOPT_EN_MSK,
1000 HW_ATL_RPO_LRO_PTOPT_EN_SHIFT,
1001 lro_patch_optimization_en);
1004 void hw_atl_rpo_lro_qsessions_lim_set(struct aq_hw_s *aq_hw,
1005 u32 lro_qsessions_lim)
1007 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPO_LRO_QSES_LMT_ADR,
1008 HW_ATL_RPO_LRO_QSES_LMT_MSK,
1009 HW_ATL_RPO_LRO_QSES_LMT_SHIFT,
1013 void hw_atl_rpo_lro_total_desc_lim_set(struct aq_hw_s *aq_hw,
1014 u32 lro_total_desc_lim)
1016 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPO_LRO_TOT_DSC_LMT_ADR,
1017 HW_ATL_RPO_LRO_TOT_DSC_LMT_MSK,
1018 HW_ATL_RPO_LRO_TOT_DSC_LMT_SHIFT,
1019 lro_total_desc_lim);
1022 void hw_atl_rpo_lro_min_pay_of_first_pkt_set(struct aq_hw_s *aq_hw,
1023 u32 lro_min_pld_of_first_pkt)
1025 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPO_LRO_PKT_MIN_ADR,
1026 HW_ATL_RPO_LRO_PKT_MIN_MSK,
1027 HW_ATL_RPO_LRO_PKT_MIN_SHIFT,
1028 lro_min_pld_of_first_pkt);
1031 void hw_atl_rpo_lro_pkt_lim_set(struct aq_hw_s *aq_hw, u32 lro_pkt_lim)
1033 aq_hw_write_reg(aq_hw, HW_ATL_RPO_LRO_RSC_MAX_ADR, lro_pkt_lim);
1036 void hw_atl_rpo_lro_max_num_of_descriptors_set(struct aq_hw_s *aq_hw,
1037 u32 lro_max_number_of_descriptors,
1040 /* Register address for bitfield lro{L}_des_max[1:0] */
1041 static const u32 rpo_lro_ldes_max_adr[32] = {
1042 0x000055A0U, 0x000055A0U, 0x000055A0U, 0x000055A0U,
1043 0x000055A0U, 0x000055A0U, 0x000055A0U, 0x000055A0U,
1044 0x000055A4U, 0x000055A4U, 0x000055A4U, 0x000055A4U,
1045 0x000055A4U, 0x000055A4U, 0x000055A4U, 0x000055A4U,
1046 0x000055A8U, 0x000055A8U, 0x000055A8U, 0x000055A8U,
1047 0x000055A8U, 0x000055A8U, 0x000055A8U, 0x000055A8U,
1048 0x000055ACU, 0x000055ACU, 0x000055ACU, 0x000055ACU,
1049 0x000055ACU, 0x000055ACU, 0x000055ACU, 0x000055ACU
1052 /* Bitmask for bitfield lro{L}_des_max[1:0] */
1053 static const u32 rpo_lro_ldes_max_msk[32] = {
1054 0x00000003U, 0x00000030U, 0x00000300U, 0x00003000U,
1055 0x00030000U, 0x00300000U, 0x03000000U, 0x30000000U,
1056 0x00000003U, 0x00000030U, 0x00000300U, 0x00003000U,
1057 0x00030000U, 0x00300000U, 0x03000000U, 0x30000000U,
1058 0x00000003U, 0x00000030U, 0x00000300U, 0x00003000U,
1059 0x00030000U, 0x00300000U, 0x03000000U, 0x30000000U,
1060 0x00000003U, 0x00000030U, 0x00000300U, 0x00003000U,
1061 0x00030000U, 0x00300000U, 0x03000000U, 0x30000000U
1064 /* Lower bit position of bitfield lro{L}_des_max[1:0] */
1065 static const u32 rpo_lro_ldes_max_shift[32] = {
1066 0U, 4U, 8U, 12U, 16U, 20U, 24U, 28U,
1067 0U, 4U, 8U, 12U, 16U, 20U, 24U, 28U,
1068 0U, 4U, 8U, 12U, 16U, 20U, 24U, 28U,
1069 0U, 4U, 8U, 12U, 16U, 20U, 24U, 28U
1072 aq_hw_write_reg_bit(aq_hw, rpo_lro_ldes_max_adr[lro],
1073 rpo_lro_ldes_max_msk[lro],
1074 rpo_lro_ldes_max_shift[lro],
1075 lro_max_number_of_descriptors);
1078 void hw_atl_rpo_lro_time_base_divider_set(struct aq_hw_s *aq_hw,
1079 u32 lro_time_base_divider)
1081 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPO_LRO_TB_DIV_ADR,
1082 HW_ATL_RPO_LRO_TB_DIV_MSK,
1083 HW_ATL_RPO_LRO_TB_DIV_SHIFT,
1084 lro_time_base_divider);
1087 void hw_atl_rpo_lro_inactive_interval_set(struct aq_hw_s *aq_hw,
1088 u32 lro_inactive_interval)
1090 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPO_LRO_INA_IVAL_ADR,
1091 HW_ATL_RPO_LRO_INA_IVAL_MSK,
1092 HW_ATL_RPO_LRO_INA_IVAL_SHIFT,
1093 lro_inactive_interval);
1096 void hw_atl_rpo_lro_max_coalescing_interval_set(struct aq_hw_s *aq_hw,
1097 u32 lro_max_coal_interval)
1099 aq_hw_write_reg_bit(aq_hw, HW_ATL_RPO_LRO_MAX_IVAL_ADR,
1100 HW_ATL_RPO_LRO_MAX_IVAL_MSK,
1101 HW_ATL_RPO_LRO_MAX_IVAL_SHIFT,
1102 lro_max_coal_interval);
1106 void hw_atl_rx_rx_reg_res_dis_set(struct aq_hw_s *aq_hw, u32 rx_reg_res_dis)
1108 aq_hw_write_reg_bit(aq_hw, HW_ATL_RX_REG_RES_DSBL_ADR,
1109 HW_ATL_RX_REG_RES_DSBL_MSK,
1110 HW_ATL_RX_REG_RES_DSBL_SHIFT,
1115 void hw_atl_tdm_cpu_id_set(struct aq_hw_s *aq_hw, u32 cpuid, u32 dca)
1117 aq_hw_write_reg_bit(aq_hw, HW_ATL_TDM_DCADCPUID_ADR(dca),
1118 HW_ATL_TDM_DCADCPUID_MSK,
1119 HW_ATL_TDM_DCADCPUID_SHIFT, cpuid);
1122 void hw_atl_tdm_large_send_offload_en_set(struct aq_hw_s *aq_hw,
1123 u32 large_send_offload_en)
1125 aq_hw_write_reg(aq_hw, HW_ATL_TDM_LSO_EN_ADR, large_send_offload_en);
1128 void hw_atl_tdm_tx_dca_en_set(struct aq_hw_s *aq_hw, u32 tx_dca_en)
1130 aq_hw_write_reg_bit(aq_hw, HW_ATL_TDM_DCA_EN_ADR, HW_ATL_TDM_DCA_EN_MSK,
1131 HW_ATL_TDM_DCA_EN_SHIFT, tx_dca_en);
1134 void hw_atl_tdm_tx_dca_mode_set(struct aq_hw_s *aq_hw, u32 tx_dca_mode)
1136 aq_hw_write_reg_bit(aq_hw, HW_ATL_TDM_DCA_MODE_ADR,
1137 HW_ATL_TDM_DCA_MODE_MSK,
1138 HW_ATL_TDM_DCA_MODE_SHIFT, tx_dca_mode);
1141 void hw_atl_tdm_tx_desc_dca_en_set(struct aq_hw_s *aq_hw, u32 tx_desc_dca_en,
1144 aq_hw_write_reg_bit(aq_hw, HW_ATL_TDM_DCADDESC_EN_ADR(dca),
1145 HW_ATL_TDM_DCADDESC_EN_MSK,
1146 HW_ATL_TDM_DCADDESC_EN_SHIFT,
1150 void hw_atl_tdm_tx_desc_en_set(struct aq_hw_s *aq_hw, u32 tx_desc_en,
1153 aq_hw_write_reg_bit(aq_hw, HW_ATL_TDM_DESCDEN_ADR(descriptor),
1154 HW_ATL_TDM_DESCDEN_MSK,
1155 HW_ATL_TDM_DESCDEN_SHIFT,
1159 u32 hw_atl_tdm_tx_desc_head_ptr_get(struct aq_hw_s *aq_hw, u32 descriptor)
1161 return aq_hw_read_reg_bit(aq_hw, HW_ATL_TDM_DESCDHD_ADR(descriptor),
1162 HW_ATL_TDM_DESCDHD_MSK,
1163 HW_ATL_TDM_DESCDHD_SHIFT);
1166 void hw_atl_tdm_tx_desc_len_set(struct aq_hw_s *aq_hw, u32 tx_desc_len,
1169 aq_hw_write_reg_bit(aq_hw, HW_ATL_TDM_DESCDLEN_ADR(descriptor),
1170 HW_ATL_TDM_DESCDLEN_MSK,
1171 HW_ATL_TDM_DESCDLEN_SHIFT,
1175 void hw_atl_tdm_tx_desc_wr_wb_irq_en_set(struct aq_hw_s *aq_hw,
1176 u32 tx_desc_wr_wb_irq_en)
1178 aq_hw_write_reg_bit(aq_hw, HW_ATL_TDM_INT_DESC_WRB_EN_ADR,
1179 HW_ATL_TDM_INT_DESC_WRB_EN_MSK,
1180 HW_ATL_TDM_INT_DESC_WRB_EN_SHIFT,
1181 tx_desc_wr_wb_irq_en);
1184 void hw_atl_tdm_tx_desc_wr_wb_threshold_set(struct aq_hw_s *aq_hw,
1185 u32 tx_desc_wr_wb_threshold,
1188 aq_hw_write_reg_bit(aq_hw, HW_ATL_TDM_DESCDWRB_THRESH_ADR(descriptor),
1189 HW_ATL_TDM_DESCDWRB_THRESH_MSK,
1190 HW_ATL_TDM_DESCDWRB_THRESH_SHIFT,
1191 tx_desc_wr_wb_threshold);
1194 void hw_atl_tdm_tdm_intr_moder_en_set(struct aq_hw_s *aq_hw,
1195 u32 tdm_irq_moderation_en)
1197 aq_hw_write_reg_bit(aq_hw, HW_ATL_TDM_INT_MOD_EN_ADR,
1198 HW_ATL_TDM_INT_MOD_EN_MSK,
1199 HW_ATL_TDM_INT_MOD_EN_SHIFT,
1200 tdm_irq_moderation_en);
1204 void hw_atl_thm_lso_tcp_flag_of_first_pkt_set(struct aq_hw_s *aq_hw,
1205 u32 lso_tcp_flag_of_first_pkt)
1207 aq_hw_write_reg_bit(aq_hw, HW_ATL_THM_LSO_TCP_FLAG_FIRST_ADR,
1208 HW_ATL_THM_LSO_TCP_FLAG_FIRST_MSK,
1209 HW_ATL_THM_LSO_TCP_FLAG_FIRST_SHIFT,
1210 lso_tcp_flag_of_first_pkt);
1213 void hw_atl_thm_lso_tcp_flag_of_last_pkt_set(struct aq_hw_s *aq_hw,
1214 u32 lso_tcp_flag_of_last_pkt)
1216 aq_hw_write_reg_bit(aq_hw, HW_ATL_THM_LSO_TCP_FLAG_LAST_ADR,
1217 HW_ATL_THM_LSO_TCP_FLAG_LAST_MSK,
1218 HW_ATL_THM_LSO_TCP_FLAG_LAST_SHIFT,
1219 lso_tcp_flag_of_last_pkt);
1222 void hw_atl_thm_lso_tcp_flag_of_middle_pkt_set(struct aq_hw_s *aq_hw,
1223 u32 lso_tcp_flag_of_middle_pkt)
1225 aq_hw_write_reg_bit(aq_hw, HW_ATL_THM_LSO_TCP_FLAG_MID_ADR,
1226 HW_ATL_THM_LSO_TCP_FLAG_MID_MSK,
1227 HW_ATL_THM_LSO_TCP_FLAG_MID_SHIFT,
1228 lso_tcp_flag_of_middle_pkt);
1231 /* TPB: tx packet buffer */
1232 void hw_atl_tpb_tx_buff_en_set(struct aq_hw_s *aq_hw, u32 tx_buff_en)
1234 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPB_TX_BUF_EN_ADR,
1235 HW_ATL_TPB_TX_BUF_EN_MSK,
1236 HW_ATL_TPB_TX_BUF_EN_SHIFT, tx_buff_en);
1239 u32 hw_atl_rpb_tps_tx_tc_mode_get(struct aq_hw_s *aq_hw)
1241 return aq_hw_read_reg_bit(aq_hw, HW_ATL_TPB_TX_TC_MODE_ADDR,
1242 HW_ATL_TPB_TX_TC_MODE_MSK,
1243 HW_ATL_TPB_TX_TC_MODE_SHIFT);
1246 void hw_atl_rpb_tps_tx_tc_mode_set(struct aq_hw_s *aq_hw,
1247 u32 tx_traf_class_mode)
1249 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPB_TX_TC_MODE_ADDR,
1250 HW_ATL_TPB_TX_TC_MODE_MSK,
1251 HW_ATL_TPB_TX_TC_MODE_SHIFT,
1252 tx_traf_class_mode);
1255 void hw_atl_tpb_tx_buff_hi_threshold_per_tc_set(struct aq_hw_s *aq_hw,
1256 u32 tx_buff_hi_threshold_per_tc,
1259 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPB_TXBHI_THRESH_ADR(buffer),
1260 HW_ATL_TPB_TXBHI_THRESH_MSK,
1261 HW_ATL_TPB_TXBHI_THRESH_SHIFT,
1262 tx_buff_hi_threshold_per_tc);
1265 void hw_atl_tpb_tx_buff_lo_threshold_per_tc_set(struct aq_hw_s *aq_hw,
1266 u32 tx_buff_lo_threshold_per_tc,
1269 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPB_TXBLO_THRESH_ADR(buffer),
1270 HW_ATL_TPB_TXBLO_THRESH_MSK,
1271 HW_ATL_TPB_TXBLO_THRESH_SHIFT,
1272 tx_buff_lo_threshold_per_tc);
1275 void hw_atl_tpb_tx_dma_sys_lbk_en_set(struct aq_hw_s *aq_hw,
1276 u32 tx_dma_sys_lbk_en)
1278 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPB_DMA_SYS_LBK_ADR,
1279 HW_ATL_TPB_DMA_SYS_LBK_MSK,
1280 HW_ATL_TPB_DMA_SYS_LBK_SHIFT,
1284 void hw_atl_tpb_tx_pkt_buff_size_per_tc_set(struct aq_hw_s *aq_hw,
1285 u32 tx_pkt_buff_size_per_tc,
1288 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPB_TXBBUF_SIZE_ADR(buffer),
1289 HW_ATL_TPB_TXBBUF_SIZE_MSK,
1290 HW_ATL_TPB_TXBBUF_SIZE_SHIFT,
1291 tx_pkt_buff_size_per_tc);
1294 void hw_atl_tpb_tx_path_scp_ins_en_set(struct aq_hw_s *aq_hw,
1295 u32 tx_path_scp_ins_en)
1297 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPB_TX_SCP_INS_EN_ADR,
1298 HW_ATL_TPB_TX_SCP_INS_EN_MSK,
1299 HW_ATL_TPB_TX_SCP_INS_EN_SHIFT,
1300 tx_path_scp_ins_en);
1303 /* TPO: tx packet offload */
1304 void hw_atl_tpo_ipv4header_crc_offload_en_set(struct aq_hw_s *aq_hw,
1305 u32 ipv4header_crc_offload_en)
1307 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPO_IPV4CHK_EN_ADR,
1308 HW_ATL_TPO_IPV4CHK_EN_MSK,
1309 HW_ATL_TPO_IPV4CHK_EN_SHIFT,
1310 ipv4header_crc_offload_en);
1313 void hw_atl_tpo_tcp_udp_crc_offload_en_set(struct aq_hw_s *aq_hw,
1314 u32 tcp_udp_crc_offload_en)
1316 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPOL4CHK_EN_ADR,
1317 HW_ATL_TPOL4CHK_EN_MSK,
1318 HW_ATL_TPOL4CHK_EN_SHIFT,
1319 tcp_udp_crc_offload_en);
1322 void hw_atl_tpo_tx_pkt_sys_lbk_en_set(struct aq_hw_s *aq_hw,
1323 u32 tx_pkt_sys_lbk_en)
1325 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPO_PKT_SYS_LBK_ADR,
1326 HW_ATL_TPO_PKT_SYS_LBK_MSK,
1327 HW_ATL_TPO_PKT_SYS_LBK_SHIFT,
1331 /* TPS: tx packet scheduler */
1332 void hw_atl_tps_tx_pkt_shed_data_arb_mode_set(struct aq_hw_s *aq_hw,
1333 u32 tx_pkt_shed_data_arb_mode)
1335 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPS_DATA_TC_ARB_MODE_ADR,
1336 HW_ATL_TPS_DATA_TC_ARB_MODE_MSK,
1337 HW_ATL_TPS_DATA_TC_ARB_MODE_SHIFT,
1338 tx_pkt_shed_data_arb_mode);
1341 void hw_atl_tps_tx_pkt_shed_desc_rate_curr_time_res_set(struct aq_hw_s *aq_hw,
1344 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPS_DESC_RATE_TA_RST_ADR,
1345 HW_ATL_TPS_DESC_RATE_TA_RST_MSK,
1346 HW_ATL_TPS_DESC_RATE_TA_RST_SHIFT,
1350 void hw_atl_tps_tx_pkt_shed_desc_rate_lim_set(struct aq_hw_s *aq_hw,
1351 u32 tx_pkt_shed_desc_rate_lim)
1353 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPS_DESC_RATE_LIM_ADR,
1354 HW_ATL_TPS_DESC_RATE_LIM_MSK,
1355 HW_ATL_TPS_DESC_RATE_LIM_SHIFT,
1356 tx_pkt_shed_desc_rate_lim);
1359 void hw_atl_tps_tx_pkt_shed_desc_tc_arb_mode_set(struct aq_hw_s *aq_hw,
1362 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPS_DESC_TC_ARB_MODE_ADR,
1363 HW_ATL_TPS_DESC_TC_ARB_MODE_MSK,
1364 HW_ATL_TPS_DESC_TC_ARB_MODE_SHIFT,
1368 void hw_atl_tps_tx_pkt_shed_desc_tc_max_credit_set(struct aq_hw_s *aq_hw,
1372 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPS_DESC_TCTCREDIT_MAX_ADR(tc),
1373 HW_ATL_TPS_DESC_TCTCREDIT_MAX_MSK,
1374 HW_ATL_TPS_DESC_TCTCREDIT_MAX_SHIFT,
1378 void hw_atl_tps_tx_pkt_shed_desc_tc_weight_set(struct aq_hw_s *aq_hw,
1379 u32 tx_pkt_shed_desc_tc_weight,
1382 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPS_DESC_TCTWEIGHT_ADR(tc),
1383 HW_ATL_TPS_DESC_TCTWEIGHT_MSK,
1384 HW_ATL_TPS_DESC_TCTWEIGHT_SHIFT,
1385 tx_pkt_shed_desc_tc_weight);
1388 void hw_atl_tps_tx_pkt_shed_desc_vm_arb_mode_set(struct aq_hw_s *aq_hw,
1391 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPS_DESC_VM_ARB_MODE_ADR,
1392 HW_ATL_TPS_DESC_VM_ARB_MODE_MSK,
1393 HW_ATL_TPS_DESC_VM_ARB_MODE_SHIFT,
1397 void hw_atl_tps_tx_pkt_shed_tc_data_max_credit_set(struct aq_hw_s *aq_hw,
1401 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPS_DATA_TCTCREDIT_MAX_ADR(tc),
1402 HW_ATL_TPS_DATA_TCTCREDIT_MAX_MSK,
1403 HW_ATL_TPS_DATA_TCTCREDIT_MAX_SHIFT,
1407 void hw_atl_tps_tx_pkt_shed_tc_data_weight_set(struct aq_hw_s *aq_hw,
1408 u32 tx_pkt_shed_tc_data_weight,
1411 aq_hw_write_reg_bit(aq_hw, HW_ATL_TPS_DATA_TCTWEIGHT_ADR(tc),
1412 HW_ATL_TPS_DATA_TCTWEIGHT_MSK,
1413 HW_ATL_TPS_DATA_TCTWEIGHT_SHIFT,
1414 tx_pkt_shed_tc_data_weight);
1418 void hw_atl_tx_tx_reg_res_dis_set(struct aq_hw_s *aq_hw, u32 tx_reg_res_dis)
1420 aq_hw_write_reg_bit(aq_hw, HW_ATL_TX_REG_RES_DSBL_ADR,
1421 HW_ATL_TX_REG_RES_DSBL_MSK,
1422 HW_ATL_TX_REG_RES_DSBL_SHIFT, tx_reg_res_dis);
1426 u32 hw_atl_msm_reg_access_status_get(struct aq_hw_s *aq_hw)
1428 return aq_hw_read_reg_bit(aq_hw, HW_ATL_MSM_REG_ACCESS_BUSY_ADR,
1429 HW_ATL_MSM_REG_ACCESS_BUSY_MSK,
1430 HW_ATL_MSM_REG_ACCESS_BUSY_SHIFT);
1433 void hw_atl_msm_reg_addr_for_indirect_addr_set(struct aq_hw_s *aq_hw,
1434 u32 reg_addr_for_indirect_addr)
1436 aq_hw_write_reg_bit(aq_hw, HW_ATL_MSM_REG_ADDR_ADR,
1437 HW_ATL_MSM_REG_ADDR_MSK,
1438 HW_ATL_MSM_REG_ADDR_SHIFT,
1439 reg_addr_for_indirect_addr);
1442 void hw_atl_msm_reg_rd_strobe_set(struct aq_hw_s *aq_hw, u32 reg_rd_strobe)
1444 aq_hw_write_reg_bit(aq_hw, HW_ATL_MSM_REG_RD_STROBE_ADR,
1445 HW_ATL_MSM_REG_RD_STROBE_MSK,
1446 HW_ATL_MSM_REG_RD_STROBE_SHIFT,
1450 u32 hw_atl_msm_reg_rd_data_get(struct aq_hw_s *aq_hw)
1452 return aq_hw_read_reg(aq_hw, HW_ATL_MSM_REG_RD_DATA_ADR);
1455 void hw_atl_msm_reg_wr_data_set(struct aq_hw_s *aq_hw, u32 reg_wr_data)
1457 aq_hw_write_reg(aq_hw, HW_ATL_MSM_REG_WR_DATA_ADR, reg_wr_data);
1460 void hw_atl_msm_reg_wr_strobe_set(struct aq_hw_s *aq_hw, u32 reg_wr_strobe)
1462 aq_hw_write_reg_bit(aq_hw, HW_ATL_MSM_REG_WR_STROBE_ADR,
1463 HW_ATL_MSM_REG_WR_STROBE_MSK,
1464 HW_ATL_MSM_REG_WR_STROBE_SHIFT,
1469 void hw_atl_pci_pci_reg_res_dis_set(struct aq_hw_s *aq_hw, u32 pci_reg_res_dis)
1471 aq_hw_write_reg_bit(aq_hw, HW_ATL_PCI_REG_RES_DSBL_ADR,
1472 HW_ATL_PCI_REG_RES_DSBL_MSK,
1473 HW_ATL_PCI_REG_RES_DSBL_SHIFT,
1477 void hw_atl_reg_glb_cpu_scratch_scp_set(struct aq_hw_s *aq_hw,
1478 u32 glb_cpu_scratch_scp,
1481 aq_hw_write_reg(aq_hw, HW_ATL_GLB_CPU_SCRATCH_SCP_ADR(scratch_scp),
1482 glb_cpu_scratch_scp);
1485 void hw_atl_mcp_up_force_intr_set(struct aq_hw_s *aq_hw, u32 up_force_intr)
1487 aq_hw_write_reg_bit(aq_hw, HW_ATL_MCP_UP_FORCE_INTERRUPT_ADR,
1488 HW_ATL_MCP_UP_FORCE_INTERRUPT_MSK,
1489 HW_ATL_MCP_UP_FORCE_INTERRUPT_SHIFT, up_force_intr);