Lines Matching refs:scn

83 	struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);  in hif_display_ctrl_traffic_pipes_state()  local
87 CE_state = scn->ce_id_to_state[2]; in hif_display_ctrl_traffic_pipes_state()
88 hal_get_sw_hptp(scn->hal_soc, in hif_display_ctrl_traffic_pipes_state()
96 CE_state = scn->ce_id_to_state[3]; in hif_display_ctrl_traffic_pipes_state()
97 hal_get_sw_hptp(scn->hal_soc, CE_state->src_ring->srng_ctx, &tp, &hp); in hif_display_ctrl_traffic_pipes_state()
102 void hif_record_ce_srng_desc_event(struct hif_softc *scn, int ce_id, in hif_record_ce_srng_desc_event() argument
110 struct ce_desc_hist *ce_hist = &scn->hif_ce_desc_hist; in hif_record_ce_srng_desc_event()
143 hal_get_sw_hptp(scn->hal_soc, hal_ring, &event->current_tp, in hif_record_ce_srng_desc_event()
150 hif_ce_desc_record_rx_paddr(scn, event, memory); in hif_record_ce_srng_desc_event()
175 struct hif_softc *scn = CE_state->scn; in ce_send_nolock_srng() local
177 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) in ce_send_nolock_srng()
179 if (unlikely(hal_srng_src_num_avail(scn->hal_soc, src_ring->srng_ctx, in ce_send_nolock_srng()
181 OL_ATH_CE_PKT_ERROR_COUNT_INCR(scn, CE_RING_DELTA_FAIL); in ce_send_nolock_srng()
182 Q_TARGET_ACCESS_END(scn); in ce_send_nolock_srng()
189 if (hal_srng_access_start(scn->hal_soc, src_ring->srng_ctx)) { in ce_send_nolock_srng()
190 Q_TARGET_ACCESS_END(scn); in ce_send_nolock_srng()
194 src_desc = hal_srng_src_get_next_reaped(scn->hal_soc, in ce_send_nolock_srng()
197 Q_TARGET_ACCESS_END(scn); in ce_send_nolock_srng()
225 hal_srng_access_end(scn->hal_soc, src_ring->srng_ctx); in ce_send_nolock_srng()
230 hif_record_ce_srng_desc_event(scn, CE_state->id, event_type, in ce_send_nolock_srng()
239 Q_TARGET_ACCESS_END(scn); in ce_send_nolock_srng()
255 struct hif_softc *scn = CE_state->scn; in ce_sendlist_send_srng() local
263 if (hal_srng_src_num_avail(scn->hal_soc, src_ring->srng_ctx, false) >= in ce_sendlist_send_srng()
335 struct hif_softc *scn = CE_state->scn; in ce_recv_buf_enqueue_srng() local
342 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) { in ce_recv_buf_enqueue_srng()
350 hal_srng_check_and_update_hptp(scn->hal_soc, dest_ring->srng_ctx, in ce_recv_buf_enqueue_srng()
353 if (hal_srng_access_start(scn->hal_soc, dest_ring->srng_ctx)) { in ce_recv_buf_enqueue_srng()
358 if ((hal_srng_src_num_avail(scn->hal_soc, in ce_recv_buf_enqueue_srng()
360 dest_desc = hal_srng_src_get_next(scn->hal_soc, in ce_recv_buf_enqueue_srng()
383 hal_srng_access_end(scn->hal_soc, dest_ring->srng_ctx); in ce_recv_buf_enqueue_srng()
384 hif_record_ce_srng_desc_event(scn, CE_state->id, in ce_recv_buf_enqueue_srng()
391 Q_TARGET_ACCESS_END(scn); in ce_recv_buf_enqueue_srng()
401 ce_recv_entries_done_nolock_srng(struct hif_softc *scn, in ce_recv_entries_done_nolock_srng() argument
406 return hal_srng_dst_num_valid(scn->hal_soc, in ce_recv_entries_done_nolock_srng()
415 ce_send_entries_done_nolock_srng(struct hif_softc *scn, in ce_send_entries_done_nolock_srng() argument
422 if (hal_srng_access_start(scn->hal_soc, src_ring->srng_ctx)) in ce_send_entries_done_nolock_srng()
425 count = hal_srng_src_done_val(scn->hal_soc, src_ring->srng_ctx); in ce_send_entries_done_nolock_srng()
427 hal_srng_access_end_reap(scn->hal_soc, src_ring->srng_ctx); in ce_send_entries_done_nolock_srng()
450 struct hif_softc *scn = CE_state->scn; in ce_completed_recv_next_nolock_srng() local
458 hal_srng_check_and_update_hptp(scn->hal_soc, status_ring->srng_ctx, in ce_completed_recv_next_nolock_srng()
461 if (hal_srng_access_start(scn->hal_soc, status_ring->srng_ctx)) in ce_completed_recv_next_nolock_srng()
464 dest_status = hal_srng_dst_peek(scn->hal_soc, status_ring->srng_ctx); in ce_completed_recv_next_nolock_srng()
466 hal_srng_access_end_reap(scn->hal_soc, status_ring->srng_ctx); in ce_completed_recv_next_nolock_srng()
485 hal_get_sw_hptp(scn->hal_soc, status_ring->srng_ctx, in ce_completed_recv_next_nolock_srng()
489 hal_srng_access_end_reap(scn->hal_soc, status_ring->srng_ctx); in ce_completed_recv_next_nolock_srng()
497 hal_srng_dst_get_next(scn->hal_soc, status_ring->srng_ctx); in ce_completed_recv_next_nolock_srng()
523 hal_srng_access_end(scn->hal_soc, status_ring->srng_ctx); in ce_completed_recv_next_nolock_srng()
524 hif_record_ce_srng_desc_event(scn, CE_state->id, in ce_completed_recv_next_nolock_srng()
533 hif_record_ce_srng_desc_event(scn, CE_state->id, in ce_completed_recv_next_nolock_srng()
600 struct hif_softc *scn = CE_state->scn; in ce_completed_send_next_nolock_srng() local
603 if (hal_srng_access_start(scn->hal_soc, src_ring->srng_ctx)) { in ce_completed_send_next_nolock_srng()
608 src_desc = hal_srng_src_reap_next(scn->hal_soc, src_ring->srng_ctx); in ce_completed_send_next_nolock_srng()
610 hif_record_ce_srng_desc_event(scn, CE_state->id, in ce_completed_send_next_nolock_srng()
642 hal_srng_access_end_reap(scn->hal_soc, src_ring->srng_ctx); in ce_completed_send_next_nolock_srng()
662 struct hif_softc *scn; in ce_cancel_send_next_srng() local
672 scn = CE_state->scn; in ce_cancel_send_next_srng()
674 if (hal_srng_access_start(scn->hal_soc, src_ring->srng_ctx)) { in ce_cancel_send_next_srng()
679 src_desc = hal_srng_src_pending_reap_next(scn->hal_soc, in ce_cancel_send_next_srng()
706 hal_srng_access_end_reap(scn->hal_soc, src_ring->srng_ctx); in ce_cancel_send_next_srng()
746 static void ce_srng_msi_ring_params_setup(struct hif_softc *scn, uint32_t ce_id, in ce_srng_msi_ring_params_setup() argument
757 ret = pld_get_user_msi_assignment(scn->qdf_dev->dev, "CE", in ce_srng_msi_ring_params_setup()
765 irq_id = scn->int_assignment->msi_idx[ce_id]; in ce_srng_msi_ring_params_setup()
766 pld_get_msi_address(scn->qdf_dev->dev, &addr_low, &addr_high); in ce_srng_msi_ring_params_setup()
777 static void ce_srng_src_ring_setup(struct hif_softc *scn, uint32_t ce_id, in ce_srng_src_ring_setup() argument
796 ce_srng_msi_ring_params_setup(scn, ce_id, &ring_params); in ce_srng_src_ring_setup()
803 src_ring->srng_ctx = hal_srng_setup(scn->hal_soc, CE_SRC, ce_id, 0, in ce_srng_src_ring_setup()
871 static void ce_srng_dest_ring_setup(struct hif_softc *scn, in ce_srng_dest_ring_setup() argument
886 ce_srng_msi_ring_params_setup(scn, ce_id, &ring_params); in ce_srng_dest_ring_setup()
899 dest_ring->srng_ctx = hal_srng_setup(scn->hal_soc, CE_DST, ce_id, 0, in ce_srng_dest_ring_setup()
913 void ce_status_ring_config_int_threshold(struct hif_softc *scn, in ce_status_ring_config_int_threshold() argument
917 scn->ini_cfg.ce_status_ring_timer_threshold; in ce_status_ring_config_int_threshold()
919 scn->ini_cfg.ce_status_ring_batch_count_threshold; in ce_status_ring_config_int_threshold()
923 void ce_status_ring_config_int_threshold(struct hif_softc *scn, in ce_status_ring_config_int_threshold() argument
931 static void ce_srng_status_ring_setup(struct hif_softc *scn, uint32_t ce_id, in ce_srng_status_ring_setup() argument
944 ce_srng_msi_ring_params_setup(scn, ce_id, &ring_params); in ce_srng_status_ring_setup()
945 ce_status_ring_config_int_threshold(scn, &ring_params); in ce_srng_status_ring_setup()
948 status_ring->srng_ctx = hal_srng_setup(scn->hal_soc, CE_DST_STATUS, in ce_srng_status_ring_setup()
952 static int ce_ring_setup_srng(struct hif_softc *scn, uint8_t ring_type, in ce_ring_setup_srng() argument
958 ce_srng_src_ring_setup(scn, ce_id, ring, attr); in ce_ring_setup_srng()
961 ce_srng_dest_ring_setup(scn, ce_id, ring, attr); in ce_ring_setup_srng()
964 ce_srng_status_ring_setup(scn, ce_id, ring, attr); in ce_ring_setup_srng()
974 static void ce_ring_cleanup_srng(struct hif_softc *scn, in ce_ring_cleanup_srng() argument
993 hal_srng_cleanup(scn->hal_soc, hal_srng, 0); in ce_ring_cleanup_srng()
996 static void ce_construct_shadow_config_srng(struct hif_softc *scn) in ce_construct_shadow_config_srng() argument
998 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in ce_construct_shadow_config_srng()
1001 for (ce_id = 0; ce_id < scn->ce_count; ce_id++) { in ce_construct_shadow_config_srng()
1003 hal_set_one_shadow_config(scn->hal_soc, in ce_construct_shadow_config_srng()
1007 hal_set_one_shadow_config(scn->hal_soc, in ce_construct_shadow_config_srng()
1010 hal_set_one_shadow_config(scn->hal_soc, in ce_construct_shadow_config_srng()
1016 static void ce_prepare_shadow_register_v2_cfg_srng(struct hif_softc *scn, in ce_prepare_shadow_register_v2_cfg_srng() argument
1020 if (!scn->hal_soc) { in ce_prepare_shadow_register_v2_cfg_srng()
1025 hal_get_shadow_config(scn->hal_soc, shadow_config, in ce_prepare_shadow_register_v2_cfg_srng()
1034 hal_construct_srng_shadow_regs(scn->hal_soc); in ce_prepare_shadow_register_v2_cfg_srng()
1035 ce_construct_shadow_config_srng(scn); in ce_prepare_shadow_register_v2_cfg_srng()
1036 hal_set_shadow_regs(scn->hal_soc); in ce_prepare_shadow_register_v2_cfg_srng()
1037 hal_construct_shadow_regs(scn->hal_soc); in ce_prepare_shadow_register_v2_cfg_srng()
1039 hal_get_shadow_config(scn->hal_soc, shadow_config, in ce_prepare_shadow_register_v2_cfg_srng()
1044 static void ce_prepare_shadow_register_v3_cfg_srng(struct hif_softc *scn, in ce_prepare_shadow_register_v3_cfg_srng() argument
1048 if (!scn->hal_soc) { in ce_prepare_shadow_register_v3_cfg_srng()
1053 hal_get_shadow_v3_config(scn->hal_soc, shadow_config, in ce_prepare_shadow_register_v3_cfg_srng()
1062 hal_construct_srng_shadow_regs(scn->hal_soc); in ce_prepare_shadow_register_v3_cfg_srng()
1063 ce_construct_shadow_config_srng(scn); in ce_prepare_shadow_register_v3_cfg_srng()
1064 hal_set_shadow_regs(scn->hal_soc); in ce_prepare_shadow_register_v3_cfg_srng()
1065 hal_construct_shadow_regs(scn->hal_soc); in ce_prepare_shadow_register_v3_cfg_srng()
1067 hal_get_shadow_v3_config(scn->hal_soc, shadow_config, in ce_prepare_shadow_register_v3_cfg_srng()
1082 int ce_get_index_info_srng(struct hif_softc *scn, void *ce_state, in ce_get_index_info_srng() argument
1090 hal_get_sw_hptp(scn->hal_soc, CE_state->src_ring->srng_ctx, in ce_get_index_info_srng()
1095 hal_get_sw_hptp(scn->hal_soc, CE_state->status_ring->srng_ctx, in ce_get_index_info_srng()
1099 hal_get_sw_hptp(scn->hal_soc, CE_state->dest_ring->srng_ctx, in ce_get_index_info_srng()
1121 ce_set_srng_msi_irq_config_by_ceid(struct hif_softc *scn, uint8_t ce_id, in ce_set_srng_msi_irq_config_by_ceid() argument
1128 ce_state = scn->ce_id_to_state[ce_id]; in ce_set_srng_msi_irq_config_by_ceid()
1144 ce_status_ring_config_int_threshold(scn, &ring_params); in ce_set_srng_msi_irq_config_by_ceid()
1146 hal_srng_set_msi_irq_config(scn->hal_soc, ring_hdl, in ce_set_srng_msi_irq_config_by_ceid()
1162 hal_srng_set_msi_irq_config(scn->hal_soc, ring_hdl, &ring_params); in ce_set_srng_msi_irq_config_by_ceid()
1168 uint16_t ce_get_direct_link_dest_srng_buffers(struct hif_softc *scn, in ce_get_direct_link_dest_srng_buffers() argument
1172 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in ce_get_direct_link_dest_srng_buffers()
1186 ce_state = scn->ce_id_to_state[tgt_svc_cfg[i].pipenum]; in ce_get_direct_link_dest_srng_buffers()
1193 QDF_ASSERT(scn->dl_recv_pages.dma_pages); in ce_get_direct_link_dest_srng_buffers()
1196 scn->dl_recv_pages.num_pages); in ce_get_direct_link_dest_srng_buffers()
1200 for (j = 0; j < scn->dl_recv_pages.num_pages; j++) in ce_get_direct_link_dest_srng_buffers()
1202 scn->dl_recv_pages.dma_pages[j].page_p_addr; in ce_get_direct_link_dest_srng_buffers()
1242 QDF_STATUS ce_get_direct_link_srng_info(struct hif_softc *scn, in ce_get_direct_link_srng_info() argument
1246 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in ce_get_direct_link_srng_info()
1258 ce_state = scn->ce_id_to_state[tgt_svc_cfg[i].pipenum]; in ce_get_direct_link_srng_info()
1272 ce_save_srng_info(scn, &info[ce_info_idx].ring_info, in ce_get_direct_link_srng_info()
1275 ce_save_srng_info(scn, &info[ce_info_idx].ring_info, in ce_get_direct_link_srng_info()
1289 ce_save_srng_info(scn, &info[ce_info_idx].ring_info, in ce_get_direct_link_srng_info()