Lines Matching refs:ar_snoc

476 	struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);  in ath10k_snoc_write32()  local
478 iowrite32(value, ar_snoc->mem + offset); in ath10k_snoc_write32()
483 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_read32() local
486 val = ioread32(ar_snoc->mem + offset); in ath10k_snoc_read32()
534 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_rx_post_pipe() local
553 mod_timer(&ar_snoc->rx_post_retry, jiffies + in ath10k_snoc_rx_post_pipe()
562 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_rx_post() local
566 ath10k_snoc_rx_post_pipe(&ar_snoc->pipe_info[i]); in ath10k_snoc_rx_post()
574 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_process_rx_cb() local
575 struct ath10k_snoc_pipe *pipe_info = &ar_snoc->pipe_info[ce_state->id]; in ath10k_snoc_process_rx_cb()
647 struct ath10k_snoc *ar_snoc = from_timer(ar_snoc, t, rx_post_retry); in ath10k_snoc_rx_replenish_retry() local
648 struct ath10k *ar = ar_snoc->ar; in ath10k_snoc_rx_replenish_retry()
689 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_tx_sg() local
695 snoc_pipe = &ar_snoc->pipe_info[pipe_id]; in ath10k_snoc_hif_tx_sg()
750 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_get_free_queue_number() local
754 return ath10k_ce_num_free_src_entries(ar_snoc->pipe_info[pipe].ce_hdl); in ath10k_snoc_hif_get_free_queue_number()
902 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_buffer_cleanup() local
906 del_timer_sync(&ar_snoc->rx_post_retry); in ath10k_snoc_buffer_cleanup()
908 pipe_info = &ar_snoc->pipe_info[pipe_num]; in ath10k_snoc_buffer_cleanup()
926 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_start() local
928 bitmap_clear(ar_snoc->pending_ce_irqs, 0, CE_COUNT_MAX); in ath10k_snoc_hif_start()
935 clear_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags); in ath10k_snoc_hif_start()
1010 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_hw_power_on() local
1015 ret = regulator_bulk_enable(ar_snoc->num_vregs, ar_snoc->vregs); in ath10k_hw_power_on()
1019 ret = clk_bulk_prepare_enable(ar_snoc->num_clks, ar_snoc->clks); in ath10k_hw_power_on()
1026 regulator_bulk_disable(ar_snoc->num_vregs, ar_snoc->vregs); in ath10k_hw_power_on()
1032 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_hw_power_off() local
1036 clk_bulk_disable_unprepare(ar_snoc->num_clks, ar_snoc->clks); in ath10k_hw_power_off()
1038 return regulator_bulk_disable(ar_snoc->num_vregs, ar_snoc->vregs); in ath10k_hw_power_off()
1043 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_wlan_disable() local
1052 !test_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags)) in ath10k_snoc_wlan_disable()
1121 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_suspend() local
1127 ret = enable_irq_wake(ar_snoc->ce_irqs[ATH10K_SNOC_WAKE_IRQ].irq_line); in ath10k_snoc_hif_suspend()
1140 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_resume() local
1146 ret = disable_irq_wake(ar_snoc->ce_irqs[ATH10K_SNOC_WAKE_IRQ].irq_line); in ath10k_snoc_hif_resume()
1186 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_get_ce_id_from_irq() local
1190 if (ar_snoc->ce_irqs[i].irq_line == irq) in ath10k_snoc_get_ce_id_from_irq()
1201 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_per_engine_handler() local
1204 if (ce_id < 0 || ce_id >= ARRAY_SIZE(ar_snoc->pipe_info)) { in ath10k_snoc_per_engine_handler()
1211 set_bit(ce_id, ar_snoc->pending_ce_irqs); in ath10k_snoc_per_engine_handler()
1221 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_napi_poll() local
1231 if (test_and_clear_bit(ce_id, ar_snoc->pending_ce_irqs)) { in ath10k_snoc_napi_poll()
1251 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_request_irq() local
1255 ret = request_irq(ar_snoc->ce_irqs[id].irq_line, in ath10k_snoc_request_irq()
1270 free_irq(ar_snoc->ce_irqs[id].irq_line, ar); in ath10k_snoc_request_irq()
1277 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_free_irq() local
1281 free_irq(ar_snoc->ce_irqs[id].irq_line, ar); in ath10k_snoc_free_irq()
1286 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_resource_init() local
1291 pdev = ar_snoc->dev; in ath10k_snoc_resource_init()
1298 ar_snoc->mem_pa = res->start; in ath10k_snoc_resource_init()
1299 ar_snoc->mem = devm_ioremap(&pdev->dev, ar_snoc->mem_pa, in ath10k_snoc_resource_init()
1301 if (!ar_snoc->mem) { in ath10k_snoc_resource_init()
1303 &ar_snoc->mem_pa); in ath10k_snoc_resource_init()
1308 ret = platform_get_irq(ar_snoc->dev, i); in ath10k_snoc_resource_init()
1311 ar_snoc->ce_irqs[i].irq_line = ret; in ath10k_snoc_resource_init()
1315 &ar_snoc->xo_cal_data); in ath10k_snoc_resource_init()
1318 ar_snoc->xo_cal_supported = true; in ath10k_snoc_resource_init()
1320 ar_snoc->xo_cal_data); in ath10k_snoc_resource_init()
1328 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_quirks_init() local
1329 struct device *dev = &ar_snoc->dev->dev; in ath10k_snoc_quirks_init()
1332 set_bit(ATH10K_SNOC_FLAG_8BIT_HOST_CAP_QUIRK, &ar_snoc->flags); in ath10k_snoc_quirks_init()
1337 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_fw_indication() local
1341 if (test_bit(ATH10K_SNOC_FLAG_UNREGISTERING, &ar_snoc->flags)) in ath10k_snoc_fw_indication()
1346 if (test_bit(ATH10K_SNOC_FLAG_REGISTERED, &ar_snoc->flags)) { in ath10k_snoc_fw_indication()
1352 bus_params.chip_id = ar_snoc->target_info.soc_version; in ath10k_snoc_fw_indication()
1359 set_bit(ATH10K_SNOC_FLAG_REGISTERED, &ar_snoc->flags); in ath10k_snoc_fw_indication()
1362 set_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags); in ath10k_snoc_fw_indication()
1375 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_setup_resource() local
1380 timer_setup(&ar_snoc->rx_post_retry, ath10k_snoc_rx_replenish_retry, 0); in ath10k_snoc_setup_resource()
1383 pipe = &ar_snoc->pipe_info[i]; in ath10k_snoc_setup_resource()
1478 struct ath10k_snoc *ar_snoc = container_of(nb, struct ath10k_snoc, nb); in ath10k_snoc_modem_notify() local
1479 struct ath10k *ar = ar_snoc->ar; in ath10k_snoc_modem_notify()
1485 clear_bit(ATH10K_SNOC_FLAG_MODEM_STOPPED, &ar_snoc->flags); in ath10k_snoc_modem_notify()
1496 set_bit(ATH10K_SNOC_FLAG_MODEM_STOPPED, &ar_snoc->flags); in ath10k_snoc_modem_notify()
1498 clear_bit(ATH10K_SNOC_FLAG_MODEM_STOPPED, &ar_snoc->flags); in ath10k_snoc_modem_notify()
1515 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_modem_init() local
1519 ar_snoc->nb.notifier_call = ath10k_snoc_modem_notify; in ath10k_modem_init()
1521 notifier = qcom_register_ssr_notifier("mpss", &ar_snoc->nb); in ath10k_modem_init()
1528 ar_snoc->notifier = notifier; in ath10k_modem_init()
1536 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_modem_deinit() local
1538 ret = qcom_unregister_ssr_notifier(ar_snoc->notifier, &ar_snoc->nb); in ath10k_modem_deinit()
1589 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_fw_init() local
1590 struct device *host_dev = &ar_snoc->dev->dev; in ath10k_fw_init()
1599 ar_snoc->use_tz = true; in ath10k_fw_init()
1623 ar_snoc->fw.dev = &pdev->dev; in ath10k_fw_init()
1632 ret = iommu_attach_device(iommu_dom, ar_snoc->fw.dev); in ath10k_fw_init()
1638 ar_snoc->fw.iommu_domain = iommu_dom; in ath10k_fw_init()
1639 ar_snoc->fw.fw_start_addr = ar->msa.paddr; in ath10k_fw_init()
1641 ret = iommu_map(iommu_dom, ar_snoc->fw.fw_start_addr, in ath10k_fw_init()
1654 iommu_detach_device(iommu_dom, ar_snoc->fw.dev); in ath10k_fw_init()
1668 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_fw_deinit() local
1669 const size_t mapped_size = ar_snoc->fw.mapped_mem_size; in ath10k_fw_deinit()
1673 if (ar_snoc->use_tz) in ath10k_fw_deinit()
1676 iommu = ar_snoc->fw.iommu_domain; in ath10k_fw_deinit()
1678 unmapped_size = iommu_unmap(iommu, ar_snoc->fw.fw_start_addr, in ath10k_fw_deinit()
1684 iommu_detach_device(iommu, ar_snoc->fw.dev); in ath10k_fw_deinit()
1687 platform_device_unregister(to_platform_device(ar_snoc->fw.dev)); in ath10k_fw_deinit()
1703 struct ath10k_snoc *ar_snoc; in ath10k_snoc_probe() local
1723 ar = ath10k_core_create(sizeof(*ar_snoc), dev, ATH10K_BUS_SNOC, in ath10k_snoc_probe()
1730 ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_probe()
1731 ar_snoc->dev = pdev; in ath10k_snoc_probe()
1733 ar_snoc->ar = ar; in ath10k_snoc_probe()
1734 ar_snoc->ce.bus_ops = &ath10k_snoc_bus_ops; in ath10k_snoc_probe()
1735 ar->ce_priv = &ar_snoc->ce; in ath10k_snoc_probe()
1757 ar_snoc->num_vregs = ARRAY_SIZE(ath10k_regulators); in ath10k_snoc_probe()
1758 ar_snoc->vregs = devm_kcalloc(&pdev->dev, ar_snoc->num_vregs, in ath10k_snoc_probe()
1759 sizeof(*ar_snoc->vregs), GFP_KERNEL); in ath10k_snoc_probe()
1760 if (!ar_snoc->vregs) { in ath10k_snoc_probe()
1764 for (i = 0; i < ar_snoc->num_vregs; i++) in ath10k_snoc_probe()
1765 ar_snoc->vregs[i].supply = ath10k_regulators[i]; in ath10k_snoc_probe()
1767 ret = devm_regulator_bulk_get(&pdev->dev, ar_snoc->num_vregs, in ath10k_snoc_probe()
1768 ar_snoc->vregs); in ath10k_snoc_probe()
1772 ar_snoc->num_clks = ARRAY_SIZE(ath10k_clocks); in ath10k_snoc_probe()
1773 ar_snoc->clks = devm_kcalloc(&pdev->dev, ar_snoc->num_clks, in ath10k_snoc_probe()
1774 sizeof(*ar_snoc->clks), GFP_KERNEL); in ath10k_snoc_probe()
1775 if (!ar_snoc->clks) { in ath10k_snoc_probe()
1780 for (i = 0; i < ar_snoc->num_clks; i++) in ath10k_snoc_probe()
1781 ar_snoc->clks[i].id = ath10k_clocks[i]; in ath10k_snoc_probe()
1783 ret = devm_clk_bulk_get_optional(&pdev->dev, ar_snoc->num_clks, in ath10k_snoc_probe()
1784 ar_snoc->clks); in ath10k_snoc_probe()
1834 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_free_resources() local
1838 set_bit(ATH10K_SNOC_FLAG_UNREGISTERING, &ar_snoc->flags); in ath10k_snoc_free_resources()
1854 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_remove() local
1860 if (test_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags)) in ath10k_snoc_remove()