Lines Matching full:ab

193 static int ath11k_hal_alloc_cont_rdp(struct ath11k_base *ab)  in ath11k_hal_alloc_cont_rdp()  argument
195 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_alloc_cont_rdp()
199 hal->rdp.vaddr = dma_alloc_coherent(ab->dev, size, &hal->rdp.paddr, in ath11k_hal_alloc_cont_rdp()
207 static void ath11k_hal_free_cont_rdp(struct ath11k_base *ab) in ath11k_hal_free_cont_rdp() argument
209 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_free_cont_rdp()
216 dma_free_coherent(ab->dev, size, in ath11k_hal_free_cont_rdp()
221 static int ath11k_hal_alloc_cont_wrp(struct ath11k_base *ab) in ath11k_hal_alloc_cont_wrp() argument
223 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_alloc_cont_wrp()
227 hal->wrp.vaddr = dma_alloc_coherent(ab->dev, size, &hal->wrp.paddr, in ath11k_hal_alloc_cont_wrp()
235 static void ath11k_hal_free_cont_wrp(struct ath11k_base *ab) in ath11k_hal_free_cont_wrp() argument
237 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_free_cont_wrp()
244 dma_free_coherent(ab->dev, size, in ath11k_hal_free_cont_wrp()
249 static void ath11k_hal_ce_dst_setup(struct ath11k_base *ab, in ath11k_hal_ce_dst_setup() argument
252 struct hal_srng_config *srng_config = &ab->hal.srng_config[HAL_CE_DST]; in ath11k_hal_ce_dst_setup()
260 val = ath11k_hif_read32(ab, addr); in ath11k_hal_ce_dst_setup()
264 ath11k_hif_write32(ab, addr, val); in ath11k_hal_ce_dst_setup()
267 static void ath11k_hal_srng_dst_hw_init(struct ath11k_base *ab, in ath11k_hal_srng_dst_hw_init() argument
270 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_dst_hw_init()
278 ath11k_hif_write32(ab, reg_base + in ath11k_hal_srng_dst_hw_init()
279 HAL_REO1_RING_MSI1_BASE_LSB_OFFSET(ab), in ath11k_hal_srng_dst_hw_init()
286 ath11k_hif_write32(ab, reg_base + in ath11k_hal_srng_dst_hw_init()
287 HAL_REO1_RING_MSI1_BASE_MSB_OFFSET(ab), val); in ath11k_hal_srng_dst_hw_init()
289 ath11k_hif_write32(ab, in ath11k_hal_srng_dst_hw_init()
290 reg_base + HAL_REO1_RING_MSI1_DATA_OFFSET(ab), in ath11k_hal_srng_dst_hw_init()
294 ath11k_hif_write32(ab, reg_base, srng->ring_base_paddr); in ath11k_hal_srng_dst_hw_init()
301 ath11k_hif_write32(ab, reg_base + HAL_REO1_RING_BASE_MSB_OFFSET(ab), val); in ath11k_hal_srng_dst_hw_init()
305 ath11k_hif_write32(ab, reg_base + HAL_REO1_RING_ID_OFFSET(ab), val); in ath11k_hal_srng_dst_hw_init()
315 ath11k_hif_write32(ab, in ath11k_hal_srng_dst_hw_init()
316 reg_base + HAL_REO1_RING_PRODUCER_INT_SETUP_OFFSET(ab), in ath11k_hal_srng_dst_hw_init()
322 ath11k_hif_write32(ab, reg_base + HAL_REO1_RING_HP_ADDR_LSB_OFFSET(ab), in ath11k_hal_srng_dst_hw_init()
324 ath11k_hif_write32(ab, reg_base + HAL_REO1_RING_HP_ADDR_MSB_OFFSET(ab), in ath11k_hal_srng_dst_hw_init()
329 ath11k_hif_write32(ab, reg_base, 0); in ath11k_hal_srng_dst_hw_init()
330 ath11k_hif_write32(ab, reg_base + HAL_REO1_RING_TP_OFFSET(ab), 0); in ath11k_hal_srng_dst_hw_init()
343 ath11k_hif_write32(ab, reg_base + HAL_REO1_RING_MISC_OFFSET(ab), val); in ath11k_hal_srng_dst_hw_init()
346 static void ath11k_hal_srng_src_hw_init(struct ath11k_base *ab, in ath11k_hal_srng_src_hw_init() argument
349 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_src_hw_init()
357 ath11k_hif_write32(ab, reg_base + in ath11k_hal_srng_src_hw_init()
358 HAL_TCL1_RING_MSI1_BASE_LSB_OFFSET(ab), in ath11k_hal_srng_src_hw_init()
365 ath11k_hif_write32(ab, reg_base + in ath11k_hal_srng_src_hw_init()
366 HAL_TCL1_RING_MSI1_BASE_MSB_OFFSET(ab), in ath11k_hal_srng_src_hw_init()
369 ath11k_hif_write32(ab, reg_base + in ath11k_hal_srng_src_hw_init()
370 HAL_TCL1_RING_MSI1_DATA_OFFSET(ab), in ath11k_hal_srng_src_hw_init()
374 ath11k_hif_write32(ab, reg_base, srng->ring_base_paddr); in ath11k_hal_srng_src_hw_init()
381 ath11k_hif_write32(ab, reg_base + HAL_TCL1_RING_BASE_MSB_OFFSET(ab), val); in ath11k_hal_srng_src_hw_init()
384 ath11k_hif_write32(ab, reg_base + HAL_TCL1_RING_ID_OFFSET(ab), val); in ath11k_hal_srng_src_hw_init()
387 ath11k_hif_write32(ab, reg_base, (u32)srng->ring_base_paddr); in ath11k_hal_srng_src_hw_init()
393 ath11k_hif_write32(ab, reg_base + HAL_TCL1_RING_BASE_MSB_OFFSET(ab), val); in ath11k_hal_srng_src_hw_init()
407 ath11k_hif_write32(ab, in ath11k_hal_srng_src_hw_init()
408 reg_base + HAL_TCL1_RING_CONSR_INT_SETUP_IX0_OFFSET(ab), in ath11k_hal_srng_src_hw_init()
416 ath11k_hif_write32(ab, in ath11k_hal_srng_src_hw_init()
417 reg_base + HAL_TCL1_RING_CONSR_INT_SETUP_IX1_OFFSET(ab), in ath11k_hal_srng_src_hw_init()
424 ath11k_hif_write32(ab, in ath11k_hal_srng_src_hw_init()
425 reg_base + HAL_TCL1_RING_TP_ADDR_LSB_OFFSET(ab), in ath11k_hal_srng_src_hw_init()
427 ath11k_hif_write32(ab, in ath11k_hal_srng_src_hw_init()
428 reg_base + HAL_TCL1_RING_TP_ADDR_MSB_OFFSET(ab), in ath11k_hal_srng_src_hw_init()
434 ath11k_hif_write32(ab, reg_base, 0); in ath11k_hal_srng_src_hw_init()
435 ath11k_hif_write32(ab, reg_base + HAL_TCL1_RING_TP_OFFSET, 0); in ath11k_hal_srng_src_hw_init()
452 ath11k_hif_write32(ab, reg_base + HAL_TCL1_RING_MISC_OFFSET(ab), val); in ath11k_hal_srng_src_hw_init()
455 static void ath11k_hal_srng_hw_init(struct ath11k_base *ab, in ath11k_hal_srng_hw_init() argument
459 ath11k_hal_srng_src_hw_init(ab, srng); in ath11k_hal_srng_hw_init()
461 ath11k_hal_srng_dst_hw_init(ab, srng); in ath11k_hal_srng_hw_init()
464 static int ath11k_hal_srng_get_ring_id(struct ath11k_base *ab, in ath11k_hal_srng_get_ring_id() argument
468 struct hal_srng_config *srng_config = &ab->hal.srng_config[type]; in ath11k_hal_srng_get_ring_id()
472 ath11k_warn(ab, "invalid ring number :%d\n", ring_num); in ath11k_hal_srng_get_ring_id()
486 int ath11k_hal_srng_get_entrysize(struct ath11k_base *ab, u32 ring_type) in ath11k_hal_srng_get_entrysize() argument
493 srng_config = &ab->hal.srng_config[ring_type]; in ath11k_hal_srng_get_entrysize()
498 int ath11k_hal_srng_get_max_entries(struct ath11k_base *ab, u32 ring_type) in ath11k_hal_srng_get_max_entries() argument
505 srng_config = &ab->hal.srng_config[ring_type]; in ath11k_hal_srng_get_max_entries()
510 void ath11k_hal_srng_get_params(struct ath11k_base *ab, struct hal_srng *srng, in ath11k_hal_srng_get_params() argument
525 dma_addr_t ath11k_hal_srng_get_hp_addr(struct ath11k_base *ab, in ath11k_hal_srng_get_hp_addr() argument
532 return ab->hal.wrp.paddr + in ath11k_hal_srng_get_hp_addr()
534 (unsigned long)ab->hal.wrp.vaddr); in ath11k_hal_srng_get_hp_addr()
536 return ab->hal.rdp.paddr + in ath11k_hal_srng_get_hp_addr()
538 (unsigned long)ab->hal.rdp.vaddr); in ath11k_hal_srng_get_hp_addr()
541 dma_addr_t ath11k_hal_srng_get_tp_addr(struct ath11k_base *ab, in ath11k_hal_srng_get_tp_addr() argument
548 return ab->hal.rdp.paddr + in ath11k_hal_srng_get_tp_addr()
550 (unsigned long)ab->hal.rdp.vaddr); in ath11k_hal_srng_get_tp_addr()
552 return ab->hal.wrp.paddr + in ath11k_hal_srng_get_tp_addr()
554 (unsigned long)ab->hal.wrp.vaddr); in ath11k_hal_srng_get_tp_addr()
619 u32 *ath11k_hal_srng_dst_peek(struct ath11k_base *ab, struct hal_srng *srng) in ath11k_hal_srng_dst_peek() argument
629 static u32 *ath11k_hal_srng_dst_peek_with_dma(struct ath11k_base *ab, in ath11k_hal_srng_dst_peek_with_dma() argument
643 static void ath11k_hal_srng_prefetch_desc(struct ath11k_base *ab, in ath11k_hal_srng_prefetch_desc() argument
650 desc = ath11k_hal_srng_dst_peek_with_dma(ab, srng, &desc_paddr); in ath11k_hal_srng_prefetch_desc()
652 dma_sync_single_for_cpu(ab->dev, desc_paddr, in ath11k_hal_srng_prefetch_desc()
659 u32 *ath11k_hal_srng_dst_get_next_entry(struct ath11k_base *ab, in ath11k_hal_srng_dst_get_next_entry() argument
679 ath11k_hal_srng_prefetch_desc(ab, srng); in ath11k_hal_srng_dst_get_next_entry()
684 int ath11k_hal_srng_dst_num_free(struct ath11k_base *ab, struct hal_srng *srng, in ath11k_hal_srng_dst_num_free() argument
707 int ath11k_hal_srng_src_num_free(struct ath11k_base *ab, struct hal_srng *srng, in ath11k_hal_srng_src_num_free() argument
729 u32 *ath11k_hal_srng_src_get_next_entry(struct ath11k_base *ab, in ath11k_hal_srng_src_get_next_entry() argument
762 u32 *ath11k_hal_srng_src_reap_next(struct ath11k_base *ab, in ath11k_hal_srng_src_reap_next() argument
782 u32 *ath11k_hal_srng_src_get_next_reaped(struct ath11k_base *ab, in ath11k_hal_srng_src_get_next_reaped() argument
799 u32 *ath11k_hal_srng_src_next_peek(struct ath11k_base *ab, struct hal_srng *srng) in ath11k_hal_srng_src_next_peek() argument
813 u32 *ath11k_hal_srng_src_peek(struct ath11k_base *ab, struct hal_srng *srng) in ath11k_hal_srng_src_peek() argument
824 void ath11k_hal_srng_access_begin(struct ath11k_base *ab, struct hal_srng *srng) in ath11k_hal_srng_access_begin() argument
836 ath11k_hal_srng_prefetch_desc(ab, srng); in ath11k_hal_srng_access_begin()
843 void ath11k_hal_srng_access_end(struct ath11k_base *ab, struct hal_srng *srng) in ath11k_hal_srng_access_end() argument
864 ath11k_hif_write32(ab, in ath11k_hal_srng_access_end()
866 (unsigned long)ab->mem, in ath11k_hal_srng_access_end()
870 ath11k_hif_write32(ab, in ath11k_hal_srng_access_end()
872 (unsigned long)ab->mem, in ath11k_hal_srng_access_end()
880 void ath11k_hal_setup_link_idle_list(struct ath11k_base *ab, in ath11k_hal_setup_link_idle_list() argument
904 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
908 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
912 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
917 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
928 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
933 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
942 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
948 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
953 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
961 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
967 ath11k_hif_write32(ab, in ath11k_hal_setup_link_idle_list()
969 HAL_WBM_IDLE_LINK_RING_MISC_ADDR(ab), 0x40); in ath11k_hal_setup_link_idle_list()
972 int ath11k_hal_srng_setup(struct ath11k_base *ab, enum hal_ring_type type, in ath11k_hal_srng_setup() argument
976 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_setup()
977 struct hal_srng_config *srng_config = &ab->hal.srng_config[type]; in ath11k_hal_srng_setup()
984 ring_id = ath11k_hal_srng_get_ring_id(ab, type, ring_num, mac_id); in ath11k_hal_srng_setup()
1035 if (!ab->hw_params.supports_shadow_regs) in ath11k_hal_srng_setup()
1037 (u32 *)((unsigned long)ab->mem + reg_base); in ath11k_hal_srng_setup()
1039 ath11k_dbg(ab, ATH11K_DBG_HAL, in ath11k_hal_srng_setup()
1044 (unsigned long)ab->mem); in ath11k_hal_srng_setup()
1068 if (!ab->hw_params.supports_shadow_regs) in ath11k_hal_srng_setup()
1070 (u32 *)((unsigned long)ab->mem + reg_base + in ath11k_hal_srng_setup()
1071 (HAL_REO1_RING_TP(ab) - HAL_REO1_RING_HP(ab))); in ath11k_hal_srng_setup()
1073 ath11k_dbg(ab, ATH11K_DBG_HAL, in ath11k_hal_srng_setup()
1076 reg_base + (HAL_REO1_RING_TP(ab) - in ath11k_hal_srng_setup()
1077 HAL_REO1_RING_HP(ab)), in ath11k_hal_srng_setup()
1079 (unsigned long)ab->mem); in ath11k_hal_srng_setup()
1086 ath11k_hal_srng_hw_init(ab, srng); in ath11k_hal_srng_setup()
1090 ath11k_hal_ce_dst_setup(ab, srng, ring_num); in ath11k_hal_srng_setup()
1096 static void ath11k_hal_srng_update_hp_tp_addr(struct ath11k_base *ab, in ath11k_hal_srng_update_hp_tp_addr() argument
1102 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_update_hp_tp_addr()
1106 ring_id = ath11k_hal_srng_get_ring_id(ab, ring_type, ring_num, 0); in ath11k_hal_srng_update_hp_tp_addr()
1113 srng->u.dst_ring.tp_addr = (u32 *)(HAL_SHADOW_REG(ab, shadow_cfg_idx) + in ath11k_hal_srng_update_hp_tp_addr()
1114 (unsigned long)ab->mem); in ath11k_hal_srng_update_hp_tp_addr()
1116 srng->u.src_ring.hp_addr = (u32 *)(HAL_SHADOW_REG(ab, shadow_cfg_idx) + in ath11k_hal_srng_update_hp_tp_addr()
1117 (unsigned long)ab->mem); in ath11k_hal_srng_update_hp_tp_addr()
1120 int ath11k_hal_srng_update_shadow_config(struct ath11k_base *ab, in ath11k_hal_srng_update_shadow_config() argument
1124 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_update_shadow_config()
1145 ath11k_hal_srng_update_hp_tp_addr(ab, shadow_cfg_idx, ring_type, in ath11k_hal_srng_update_shadow_config()
1148 ath11k_dbg(ab, ATH11K_DBG_HAL, in ath11k_hal_srng_update_shadow_config()
1151 HAL_SHADOW_REG(ab, shadow_cfg_idx), in ath11k_hal_srng_update_shadow_config()
1158 void ath11k_hal_srng_shadow_config(struct ath11k_base *ab) in ath11k_hal_srng_shadow_config() argument
1160 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_shadow_config()
1176 ath11k_hal_srng_update_shadow_config(ab, ring_type, ring_num); in ath11k_hal_srng_shadow_config()
1180 void ath11k_hal_srng_get_shadow_config(struct ath11k_base *ab, in ath11k_hal_srng_get_shadow_config() argument
1183 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_get_shadow_config()
1189 void ath11k_hal_srng_shadow_update_hp_tp(struct ath11k_base *ab, in ath11k_hal_srng_shadow_update_hp_tp() argument
1199 ath11k_hal_srng_access_end(ab, srng); in ath11k_hal_srng_shadow_update_hp_tp()
1202 static int ath11k_hal_srng_create_config(struct ath11k_base *ab) in ath11k_hal_srng_create_config() argument
1204 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_create_config()
1214 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO1_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1215 s->reg_start[1] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO1_RING_HP(ab); in ath11k_hal_srng_create_config()
1216 s->reg_size[0] = HAL_REO2_RING_BASE_LSB(ab) - HAL_REO1_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1217 s->reg_size[1] = HAL_REO2_RING_HP(ab) - HAL_REO1_RING_HP(ab); in ath11k_hal_srng_create_config()
1220 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO_TCL_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1221 s->reg_start[1] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO_TCL_RING_HP(ab); in ath11k_hal_srng_create_config()
1224 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_SW2REO_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1225 s->reg_start[1] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_SW2REO_RING_HP(ab); in ath11k_hal_srng_create_config()
1228 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO_CMD_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1229 s->reg_start[1] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO_CMD_HP(ab); in ath11k_hal_srng_create_config()
1232 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO_STATUS_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1233 s->reg_start[1] = HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO_STATUS_HP(ab); in ath11k_hal_srng_create_config()
1236 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_TCL_REG + HAL_TCL1_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1238 s->reg_size[0] = HAL_TCL2_RING_BASE_LSB(ab) - HAL_TCL1_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1242 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_TCL_REG + HAL_TCL_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1246 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_TCL_REG + HAL_TCL_STATUS_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1250 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_CE0_SRC_REG(ab) + HAL_CE_DST_RING_BASE_LSB + in ath11k_hal_srng_create_config()
1251 ATH11K_CE_OFFSET(ab); in ath11k_hal_srng_create_config()
1252 s->reg_start[1] = HAL_SEQ_WCSS_UMAC_CE0_SRC_REG(ab) + HAL_CE_DST_RING_HP + in ath11k_hal_srng_create_config()
1253 ATH11K_CE_OFFSET(ab); in ath11k_hal_srng_create_config()
1254 s->reg_size[0] = HAL_SEQ_WCSS_UMAC_CE1_SRC_REG(ab) - in ath11k_hal_srng_create_config()
1255 HAL_SEQ_WCSS_UMAC_CE0_SRC_REG(ab); in ath11k_hal_srng_create_config()
1256 s->reg_size[1] = HAL_SEQ_WCSS_UMAC_CE1_SRC_REG(ab) - in ath11k_hal_srng_create_config()
1257 HAL_SEQ_WCSS_UMAC_CE0_SRC_REG(ab); in ath11k_hal_srng_create_config()
1260 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab) + HAL_CE_DST_RING_BASE_LSB + in ath11k_hal_srng_create_config()
1261 ATH11K_CE_OFFSET(ab); in ath11k_hal_srng_create_config()
1262 s->reg_start[1] = HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab) + HAL_CE_DST_RING_HP + in ath11k_hal_srng_create_config()
1263 ATH11K_CE_OFFSET(ab); in ath11k_hal_srng_create_config()
1264 s->reg_size[0] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) - in ath11k_hal_srng_create_config()
1265 HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab); in ath11k_hal_srng_create_config()
1266 s->reg_size[1] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) - in ath11k_hal_srng_create_config()
1267 HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab); in ath11k_hal_srng_create_config()
1270 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab) + in ath11k_hal_srng_create_config()
1271 HAL_CE_DST_STATUS_RING_BASE_LSB + ATH11K_CE_OFFSET(ab); in ath11k_hal_srng_create_config()
1272 s->reg_start[1] = HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab) + HAL_CE_DST_STATUS_RING_HP + in ath11k_hal_srng_create_config()
1273 ATH11K_CE_OFFSET(ab); in ath11k_hal_srng_create_config()
1274 s->reg_size[0] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) - in ath11k_hal_srng_create_config()
1275 HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab); in ath11k_hal_srng_create_config()
1276 s->reg_size[1] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) - in ath11k_hal_srng_create_config()
1277 HAL_SEQ_WCSS_UMAC_CE0_DST_REG(ab); in ath11k_hal_srng_create_config()
1280 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_WBM_REG + HAL_WBM_IDLE_LINK_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1284 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_WBM_REG + HAL_WBM_RELEASE_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1288 s->reg_start[0] = HAL_SEQ_WCSS_UMAC_WBM_REG + HAL_WBM0_RELEASE_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1290 s->reg_size[0] = HAL_WBM1_RELEASE_RING_BASE_LSB(ab) - in ath11k_hal_srng_create_config()
1291 HAL_WBM0_RELEASE_RING_BASE_LSB(ab); in ath11k_hal_srng_create_config()
1297 static void ath11k_hal_register_srng_key(struct ath11k_base *ab) in ath11k_hal_register_srng_key() argument
1299 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_register_srng_key()
1306 static void ath11k_hal_unregister_srng_key(struct ath11k_base *ab) in ath11k_hal_unregister_srng_key() argument
1308 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_unregister_srng_key()
1315 int ath11k_hal_srng_init(struct ath11k_base *ab) in ath11k_hal_srng_init() argument
1317 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_init()
1322 ret = ath11k_hal_srng_create_config(ab); in ath11k_hal_srng_init()
1326 ret = ath11k_hal_alloc_cont_rdp(ab); in ath11k_hal_srng_init()
1330 ret = ath11k_hal_alloc_cont_wrp(ab); in ath11k_hal_srng_init()
1334 ath11k_hal_register_srng_key(ab); in ath11k_hal_srng_init()
1339 ath11k_hal_free_cont_rdp(ab); in ath11k_hal_srng_init()
1346 void ath11k_hal_srng_deinit(struct ath11k_base *ab) in ath11k_hal_srng_deinit() argument
1348 struct ath11k_hal *hal = &ab->hal; in ath11k_hal_srng_deinit()
1350 ath11k_hal_unregister_srng_key(ab); in ath11k_hal_srng_deinit()
1351 ath11k_hal_free_cont_rdp(ab); in ath11k_hal_srng_deinit()
1352 ath11k_hal_free_cont_wrp(ab); in ath11k_hal_srng_deinit()
1357 void ath11k_hal_dump_srng_stats(struct ath11k_base *ab) in ath11k_hal_dump_srng_stats() argument
1364 ath11k_err(ab, "Last interrupt received for each CE:\n"); in ath11k_hal_dump_srng_stats()
1365 for (i = 0; i < ab->hw_params.ce_count; i++) { in ath11k_hal_dump_srng_stats()
1366 ce_pipe = &ab->ce.ce_pipe[i]; in ath11k_hal_dump_srng_stats()
1368 if (ath11k_ce_get_attr_flags(ab, i) & CE_ATTR_DIS_INTR) in ath11k_hal_dump_srng_stats()
1371 ath11k_err(ab, "CE_id %d pipe_num %d %ums before\n", in ath11k_hal_dump_srng_stats()
1376 ath11k_err(ab, "\nLast interrupt received for each group:\n"); in ath11k_hal_dump_srng_stats()
1378 irq_grp = &ab->ext_irq_grp[i]; in ath11k_hal_dump_srng_stats()
1379 ath11k_err(ab, "group_id %d %ums before\n", in ath11k_hal_dump_srng_stats()
1385 srng = &ab->hal.srng_list[i]; in ath11k_hal_dump_srng_stats()
1391 ath11k_err(ab, in ath11k_hal_dump_srng_stats()
1399 ath11k_err(ab, in ath11k_hal_dump_srng_stats()