Lines Matching refs:scn
133 void hif_ahb_disable_isr(struct hif_softc *scn) in hif_ahb_disable_isr() argument
135 struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn); in hif_ahb_disable_isr()
136 hif_exec_kill(&scn->osc); in hif_ahb_disable_isr()
137 hif_nointrs(scn); in hif_ahb_disable_isr()
138 ce_tasklet_kill(scn); in hif_ahb_disable_isr()
140 qdf_atomic_set(&scn->active_tasklet_cnt, 0); in hif_ahb_disable_isr()
141 qdf_atomic_set(&scn->active_grp_tasklet_cnt, 0); in hif_ahb_disable_isr()
155 struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx); in hif_ahb_dump_registers() local
157 status = hif_dump_ce_registers(scn); in hif_ahb_dump_registers()
173 void hif_ahb_close(struct hif_softc *scn) in hif_ahb_close() argument
175 hif_ce_close(scn); in hif_ahb_close()
204 int hif_ahb_bus_configure(struct hif_softc *scn) in hif_ahb_bus_configure() argument
206 return hif_pci_bus_configure(scn); in hif_ahb_bus_configure()
227 struct hif_softc *scn = HIF_GET_SOFTC(sc); in hif_ahb_get_soc_cmem_info_pld() local
231 scn->cmem_start = info.dev_mem_info[0].start; in hif_ahb_get_soc_cmem_info_pld()
232 scn->cmem_size = info.dev_mem_info[0].size; in hif_ahb_get_soc_cmem_info_pld()
235 int hif_ahb_configure_irq_by_ceid(struct hif_softc *scn, int ce_id) in hif_ahb_configure_irq_by_ceid() argument
238 struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn); in hif_ahb_configure_irq_by_ceid()
240 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in hif_ahb_configure_irq_by_ceid()
266 hif_ahb_irq_enable(scn, ce_id); in hif_ahb_configure_irq_by_ceid()
275 struct hif_softc *scn = HIF_GET_SOFTC(sc); in hif_ahb_configure_irq() local
276 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in hif_ahb_configure_irq()
281 for (i = 0; i < scn->ce_count; i++) { in hif_ahb_configure_irq()
288 ret = hif_ahb_configure_irq_by_ceid(scn, i); in hif_ahb_configure_irq()
297 int hif_ahb_configure_grp_irq(struct hif_softc *scn, in hif_ahb_configure_grp_irq() argument
301 struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn); in hif_ahb_configure_grp_irq()
332 ret = pfrm_request_irq(scn->qdf_dev->dev, in hif_ahb_configure_grp_irq()
351 void hif_ahb_deconfigure_grp_irq(struct hif_softc *scn) in hif_ahb_deconfigure_grp_irq() argument
353 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in hif_ahb_deconfigure_grp_irq()
380 pfrm_free_irq(scn->qdf_dev->dev, in hif_ahb_deconfigure_grp_irq()
401 void hif_ahb_disable_bus(struct hif_softc *scn) in hif_ahb_disable_bus() argument
403 struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn); in hif_ahb_disable_bus()
412 tgt_info = &scn->target_info; in hif_ahb_disable_bus()
416 scn->qdf_dev->dev, in hif_ahb_disable_bus()
431 scn->mem_ce = NULL; in hif_ahb_disable_bus()
436 scn->mem_pmm_base = NULL; in hif_ahb_disable_bus()
441 scn->mem_cmem = NULL; in hif_ahb_disable_bus()
446 pfrm_devm_release_mem_region(&pdev->dev, scn->mem_pa, in hif_ahb_disable_bus()
452 scn->mem = NULL; in hif_ahb_disable_bus()
580 struct hif_softc *scn = HIF_GET_SOFTC(sc); in hif_ahb_enable_bus() local
592 struct hif_softc *scn = HIF_GET_SOFTC(sc); in hif_ahb_enable_bus() local
634 void hif_ahb_nointrs(struct hif_softc *scn) in hif_ahb_nointrs() argument
637 struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn); in hif_ahb_nointrs()
638 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in hif_ahb_nointrs()
641 scn->free_irq_done = true; in hif_ahb_nointrs()
644 if (scn->request_irq_done == false) in hif_ahb_nointrs()
650 pfrm_free_irq(scn->qdf_dev->dev, sc->irq + i, sc); in hif_ahb_nointrs()
654 if (!scn->per_ce_irq) { in hif_ahb_nointrs()
655 pfrm_free_irq(scn->qdf_dev->dev, sc->irq, sc); in hif_ahb_nointrs()
657 for (i = 0; i < scn->ce_count; i++) { in hif_ahb_nointrs()
664 scn->qdf_dev->dev, in hif_ahb_nointrs()
668 hif_ahb_deconfigure_grp_irq(scn); in hif_ahb_nointrs()
671 scn->request_irq_done = false; in hif_ahb_nointrs()
684 void hif_ahb_irq_enable(struct hif_softc *scn, int ce_id) in hif_ahb_irq_enable() argument
688 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in hif_ahb_irq_enable()
690 struct hif_target_info *tgt_info = &scn->target_info; in hif_ahb_irq_enable()
691 void *mem = scn->mem_ce ? scn->mem_ce : scn->mem; in hif_ahb_irq_enable()
693 if (scn->per_ce_irq) { in hif_ahb_irq_enable()
697 regval = hif_read32_mb(scn, mem + reg_offset); in hif_ahb_irq_enable()
699 hif_write32_mb(scn, mem + reg_offset, regval); in hif_ahb_irq_enable()
705 regval = hif_read32_mb(scn, mem + reg_offset); in hif_ahb_irq_enable()
707 hif_write32_mb(scn, mem + reg_offset, regval); in hif_ahb_irq_enable()
717 regval = hif_read32_mb(scn, mem + in hif_ahb_irq_enable()
721 hif_write32_mb(scn, mem + in hif_ahb_irq_enable()
727 hif_pci_irq_enable(scn, ce_id); in hif_ahb_irq_enable()
738 void hif_ahb_irq_disable(struct hif_softc *scn, int ce_id) in hif_ahb_irq_disable() argument
742 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in hif_ahb_irq_disable()
744 struct hif_target_info *tgt_info = &scn->target_info; in hif_ahb_irq_disable()
745 void *mem = scn->mem_ce ? scn->mem_ce : scn->mem; in hif_ahb_irq_disable()
747 if (scn->per_ce_irq) { in hif_ahb_irq_disable()
751 regval = hif_read32_mb(scn, mem + reg_offset); in hif_ahb_irq_disable()
753 hif_write32_mb(scn, mem + reg_offset, regval); in hif_ahb_irq_disable()
759 regval = hif_read32_mb(scn, mem + reg_offset); in hif_ahb_irq_disable()
761 hif_write32_mb(scn, mem + reg_offset, regval); in hif_ahb_irq_disable()
771 regval = hif_read32_mb(scn, mem + in hif_ahb_irq_disable()
775 hif_write32_mb(scn, mem + in hif_ahb_irq_disable()
817 bool hif_ahb_needs_bmi(struct hif_softc *scn) in hif_ahb_needs_bmi() argument
819 return !ce_srng_based(scn); in hif_ahb_needs_bmi()
829 void hif_display_ahb_irq_regs(struct hif_softc *scn) in hif_display_ahb_irq_regs() argument
832 void *mem = scn->mem_ce ? scn->mem_ce : scn->mem; in hif_display_ahb_irq_regs()
833 struct hif_target_info *tgt_info = &scn->target_info; in hif_display_ahb_irq_regs()
840 if (scn->per_ce_irq) { in hif_display_ahb_irq_regs()
841 regval = hif_read32_mb(scn, mem + HOST_IE_ADDRESS); in hif_display_ahb_irq_regs()
844 regval = hif_read32_mb(scn, mem + HOST_IE_ADDRESS_2); in hif_display_ahb_irq_regs()
853 regval = hif_read32_mb(scn, mem + in hif_display_ahb_irq_regs()
861 void hif_ahb_display_stats(struct hif_softc *scn) in hif_ahb_display_stats() argument
863 if (!scn) { in hif_ahb_display_stats()
867 hif_display_ahb_irq_regs(scn); in hif_ahb_display_stats()
868 hif_display_ce_stats(scn); in hif_ahb_display_stats()
871 void hif_ahb_clear_stats(struct hif_softc *scn) in hif_ahb_clear_stats() argument
873 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in hif_ahb_clear_stats()