Lines Matching +full:reo2host +full:- +full:destination +full:- +full:ring3

1 // SPDX-License-Identifier: BSD-3-Clause-Clear
3 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
11 #include <linux/dma-mapping.h>
26 { .compatible = "qcom,ipq8074-wifi",
29 { .compatible = "qcom,ipq6018-wifi",
32 { .compatible = "qcom,wcn6750-wifi",
43 "misc-pulse1",
44 "misc-latch",
45 "sw-exception",
59 "host2wbm-desc-feed",
60 "host2reo-re-injection",
61 "host2reo-command",
62 "host2rxdma-monitor-ring3",
63 "host2rxdma-monitor-ring2",
64 "host2rxdma-monitor-ring1",
65 "reo2ost-exception",
66 "wbm2host-rx-release",
67 "reo2host-status",
68 "reo2host-destination-ring4",
69 "reo2host-destination-ring3",
70 "reo2host-destination-ring2",
71 "reo2host-destination-ring1",
72 "rxdma2host-monitor-destination-mac3",
73 "rxdma2host-monitor-destination-mac2",
74 "rxdma2host-monitor-destination-mac1",
75 "ppdu-end-interrupts-mac3",
76 "ppdu-end-interrupts-mac2",
77 "ppdu-end-interrupts-mac1",
78 "rxdma2host-monitor-status-ring-mac3",
79 "rxdma2host-monitor-status-ring-mac2",
80 "rxdma2host-monitor-status-ring-mac1",
81 "host2rxdma-host-buf-ring-mac3",
82 "host2rxdma-host-buf-ring-mac2",
83 "host2rxdma-host-buf-ring-mac1",
84 "rxdma2host-destination-ring-mac3",
85 "rxdma2host-destination-ring-mac2",
86 "rxdma2host-destination-ring-mac1",
87 "host2tcl-input-ring4",
88 "host2tcl-input-ring3",
89 "host2tcl-input-ring2",
90 "host2tcl-input-ring1",
91 "wbm2host-tx-completions-ring3",
92 "wbm2host-tx-completions-ring2",
93 "wbm2host-tx-completions-ring1",
94 "tcl2host-status-ring",
97 /* enum ext_irq_num - irq numbers that can be used by external modules
142 return ab->pci.msi.irqs[vector]; in ath11k_ahb_get_msi_irq_wcn6750()
169 iowrite32(value, ab->mem + window_start + in ath11k_ahb_window_write32_wcn6750()
181 val = ioread32(ab->mem + window_start + in ath11k_ahb_window_read32_wcn6750()
196 return ioread32(ab->mem + offset); in ath11k_ahb_read32()
201 iowrite32(value, ab->mem + offset); in ath11k_ahb_write32()
208 for (i = 0; i < ab->hw_params.ce_count; i++) { in ath11k_ahb_kill_tasklets()
209 struct ath11k_ce_pipe *ce_pipe = &ab->ce.ce_pipe[i]; in ath11k_ahb_kill_tasklets()
214 tasklet_kill(&ce_pipe->intr_tq); in ath11k_ahb_kill_tasklets()
222 for (i = 0; i < irq_grp->num_irq; i++) in ath11k_ahb_ext_grp_disable()
223 disable_irq_nosync(irq_grp->ab->irq_num[irq_grp->irqs[i]]); in ath11k_ahb_ext_grp_disable()
231 struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; in __ath11k_ahb_ext_irq_disable()
235 if (irq_grp->napi_enabled) { in __ath11k_ahb_ext_irq_disable()
236 napi_synchronize(&irq_grp->napi); in __ath11k_ahb_ext_irq_disable()
237 napi_disable(&irq_grp->napi); in __ath11k_ahb_ext_irq_disable()
238 irq_grp->napi_enabled = false; in __ath11k_ahb_ext_irq_disable()
247 for (i = 0; i < irq_grp->num_irq; i++) in ath11k_ahb_ext_grp_enable()
248 enable_irq(irq_grp->ab->irq_num[irq_grp->irqs[i]]); in ath11k_ahb_ext_grp_enable()
271 ce_attr = &ab->hw_params.host_ce_config[ce_id]; in ath11k_ahb_ce_irq_enable()
272 if (ce_attr->src_nentries) in ath11k_ahb_ce_irq_enable()
275 if (ce_attr->dest_nentries) { in ath11k_ahb_ce_irq_enable()
286 ce_attr = &ab->hw_params.host_ce_config[ce_id]; in ath11k_ahb_ce_irq_disable()
287 if (ce_attr->src_nentries) in ath11k_ahb_ce_irq_disable()
290 if (ce_attr->dest_nentries) { in ath11k_ahb_ce_irq_disable()
302 for (i = 0; i < ab->hw_params.ce_count; i++) { in ath11k_ahb_sync_ce_irqs()
307 synchronize_irq(ab->irq_num[irq_idx]); in ath11k_ahb_sync_ce_irqs()
317 struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; in ath11k_ahb_sync_ext_irqs()
319 for (j = 0; j < irq_grp->num_irq; j++) { in ath11k_ahb_sync_ext_irqs()
320 irq_idx = irq_grp->irqs[j]; in ath11k_ahb_sync_ext_irqs()
321 synchronize_irq(ab->irq_num[irq_idx]); in ath11k_ahb_sync_ext_irqs()
330 for (i = 0; i < ab->hw_params.ce_count; i++) { in ath11k_ahb_ce_irqs_enable()
341 for (i = 0; i < ab->hw_params.ce_count; i++) { in ath11k_ahb_ce_irqs_disable()
361 struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; in ath11k_ahb_ext_irq_enable()
363 if (!irq_grp->napi_enabled) { in ath11k_ahb_ext_irq_enable()
364 dev_set_threaded(&irq_grp->napi_ndev, true); in ath11k_ahb_ext_irq_enable()
365 napi_enable(&irq_grp->napi); in ath11k_ahb_ext_irq_enable()
366 irq_grp->napi_enabled = true; in ath11k_ahb_ext_irq_enable()
380 if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags)) in ath11k_ahb_stop()
384 del_timer_sync(&ab->rx_replenish_retry); in ath11k_ahb_stop()
393 ret = rproc_boot(ab_ahb->tgt_rproc); in ath11k_ahb_power_up()
404 rproc_shutdown(ab_ahb->tgt_rproc); in ath11k_ahb_power_down()
411 if (ath11k_cold_boot_cal == 0 || ab->qmi.cal_done || in ath11k_ahb_fwreset_from_cold_boot()
412 ab->hw_params.cold_boot_calib == 0 || in ath11k_ahb_fwreset_from_cold_boot()
413 ab->hw_params.cbcal_restart_fw == 0) in ath11k_ahb_fwreset_from_cold_boot()
417 timeout = wait_event_timeout(ab->qmi.cold_boot_waitq, in ath11k_ahb_fwreset_from_cold_boot()
418 (ab->qmi.cal_done == 1), in ath11k_ahb_fwreset_from_cold_boot()
435 struct ath11k_qmi_ce_cfg *cfg = &ab->qmi.ce_cfg; in ath11k_ahb_init_qmi_ce_config()
437 cfg->tgt_ce_len = ab->hw_params.target_ce_count; in ath11k_ahb_init_qmi_ce_config()
438 cfg->tgt_ce = ab->hw_params.target_ce_config; in ath11k_ahb_init_qmi_ce_config()
439 cfg->svc_to_ce_map_len = ab->hw_params.svc_to_ce_map_len; in ath11k_ahb_init_qmi_ce_config()
440 cfg->svc_to_ce_map = ab->hw_params.svc_to_ce_map; in ath11k_ahb_init_qmi_ce_config()
441 ab->qmi.service_ins_id = ab->hw_params.qmi_service_ins_id; in ath11k_ahb_init_qmi_ce_config()
449 struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; in ath11k_ahb_free_ext_irq()
451 for (j = 0; j < irq_grp->num_irq; j++) in ath11k_ahb_free_ext_irq()
452 free_irq(ab->irq_num[irq_grp->irqs[j]], irq_grp); in ath11k_ahb_free_ext_irq()
454 netif_napi_del(&irq_grp->napi); in ath11k_ahb_free_ext_irq()
463 if (ab->hw_params.hybrid_bus_type) in ath11k_ahb_free_irq()
466 for (i = 0; i < ab->hw_params.ce_count; i++) { in ath11k_ahb_free_irq()
470 free_irq(ab->irq_num[irq_idx], &ab->ce.ce_pipe[i]); in ath11k_ahb_free_irq()
480 ath11k_ce_per_engine_service(ce_pipe->ab, ce_pipe->pipe_num); in ath11k_ahb_ce_tasklet()
482 ath11k_ahb_ce_irq_enable(ce_pipe->ab, ce_pipe->pipe_num); in ath11k_ahb_ce_tasklet()
490 ce_pipe->timestamp = jiffies; in ath11k_ahb_ce_interrupt_handler()
492 ath11k_ahb_ce_irq_disable(ce_pipe->ab, ce_pipe->pipe_num); in ath11k_ahb_ce_interrupt_handler()
494 tasklet_schedule(&ce_pipe->intr_tq); in ath11k_ahb_ce_interrupt_handler()
504 struct ath11k_base *ab = irq_grp->ab; in ath11k_ahb_ext_grp_napi_poll()
524 irq_grp->timestamp = jiffies; in ath11k_ahb_ext_interrupt_handler()
528 napi_schedule(&irq_grp->napi); in ath11k_ahb_ext_interrupt_handler()
535 struct ath11k_hw_params *hw = &ab->hw_params; in ath11k_ahb_config_ext_irq()
541 struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; in ath11k_ahb_config_ext_irq()
544 irq_grp->ab = ab; in ath11k_ahb_config_ext_irq()
545 irq_grp->grp_id = i; in ath11k_ahb_config_ext_irq()
546 init_dummy_netdev(&irq_grp->napi_ndev); in ath11k_ahb_config_ext_irq()
547 netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi, in ath11k_ahb_config_ext_irq()
551 if (ab->hw_params.ring_mask->tx[i] & BIT(j)) { in ath11k_ahb_config_ext_irq()
552 irq_grp->irqs[num_irq++] = in ath11k_ahb_config_ext_irq()
553 wbm2host_tx_completions_ring1 - j; in ath11k_ahb_config_ext_irq()
556 if (ab->hw_params.ring_mask->rx[i] & BIT(j)) { in ath11k_ahb_config_ext_irq()
557 irq_grp->irqs[num_irq++] = in ath11k_ahb_config_ext_irq()
558 reo2host_destination_ring1 - j; in ath11k_ahb_config_ext_irq()
561 if (ab->hw_params.ring_mask->rx_err[i] & BIT(j)) in ath11k_ahb_config_ext_irq()
562 irq_grp->irqs[num_irq++] = reo2host_exception; in ath11k_ahb_config_ext_irq()
564 if (ab->hw_params.ring_mask->rx_wbm_rel[i] & BIT(j)) in ath11k_ahb_config_ext_irq()
565 irq_grp->irqs[num_irq++] = wbm2host_rx_release; in ath11k_ahb_config_ext_irq()
567 if (ab->hw_params.ring_mask->reo_status[i] & BIT(j)) in ath11k_ahb_config_ext_irq()
568 irq_grp->irqs[num_irq++] = reo2host_status; in ath11k_ahb_config_ext_irq()
570 if (j < ab->hw_params.max_radios) { in ath11k_ahb_config_ext_irq()
571 if (ab->hw_params.ring_mask->rxdma2host[i] & BIT(j)) { in ath11k_ahb_config_ext_irq()
572 irq_grp->irqs[num_irq++] = in ath11k_ahb_config_ext_irq()
573 rxdma2host_destination_ring_mac1 - in ath11k_ahb_config_ext_irq()
577 if (ab->hw_params.ring_mask->host2rxdma[i] & BIT(j)) { in ath11k_ahb_config_ext_irq()
578 irq_grp->irqs[num_irq++] = in ath11k_ahb_config_ext_irq()
579 host2rxdma_host_buf_ring_mac1 - in ath11k_ahb_config_ext_irq()
583 if (ab->hw_params.ring_mask->rx_mon_status[i] & BIT(j)) { in ath11k_ahb_config_ext_irq()
584 irq_grp->irqs[num_irq++] = in ath11k_ahb_config_ext_irq()
585 ppdu_end_interrupts_mac1 - in ath11k_ahb_config_ext_irq()
587 irq_grp->irqs[num_irq++] = in ath11k_ahb_config_ext_irq()
588 rxdma2host_monitor_status_ring_mac1 - in ath11k_ahb_config_ext_irq()
593 irq_grp->num_irq = num_irq; in ath11k_ahb_config_ext_irq()
595 for (j = 0; j < irq_grp->num_irq; j++) { in ath11k_ahb_config_ext_irq()
596 int irq_idx = irq_grp->irqs[j]; in ath11k_ahb_config_ext_irq()
598 irq = platform_get_irq_byname(ab->pdev, in ath11k_ahb_config_ext_irq()
600 ab->irq_num[irq_idx] = irq; in ath11k_ahb_config_ext_irq()
620 if (ab->hw_params.hybrid_bus_type) in ath11k_ahb_config_irq()
624 for (i = 0; i < ab->hw_params.ce_count; i++) { in ath11k_ahb_config_irq()
625 struct ath11k_ce_pipe *ce_pipe = &ab->ce.ce_pipe[i]; in ath11k_ahb_config_irq()
632 tasklet_setup(&ce_pipe->intr_tq, ath11k_ahb_ce_tasklet); in ath11k_ahb_config_irq()
633 irq = platform_get_irq_byname(ab->pdev, irq_name[irq_idx]); in ath11k_ahb_config_irq()
640 ab->irq_num[irq_idx] = irq; in ath11k_ahb_config_irq()
656 for (i = 0; i < ab->hw_params.svc_to_ce_map_len; i++) { in ath11k_ahb_map_service_to_pipe()
657 entry = &ab->hw_params.svc_to_ce_map[i]; in ath11k_ahb_map_service_to_pipe()
659 if (__le32_to_cpu(entry->service_id) != service_id) in ath11k_ahb_map_service_to_pipe()
662 switch (__le32_to_cpu(entry->pipedir)) { in ath11k_ahb_map_service_to_pipe()
667 *dl_pipe = __le32_to_cpu(entry->pipenum); in ath11k_ahb_map_service_to_pipe()
672 *ul_pipe = __le32_to_cpu(entry->pipenum); in ath11k_ahb_map_service_to_pipe()
678 *dl_pipe = __le32_to_cpu(entry->pipenum); in ath11k_ahb_map_service_to_pipe()
679 *ul_pipe = __le32_to_cpu(entry->pipenum); in ath11k_ahb_map_service_to_pipe()
687 return -ENOENT; in ath11k_ahb_map_service_to_pipe()
699 if (!device_may_wakeup(ab->dev)) in ath11k_ahb_hif_suspend()
700 return -EPERM; in ath11k_ahb_hif_suspend()
702 wake_irq = ab->irq_num[ATH11K_PCI_IRQ_CE0_OFFSET + ATH11K_PCI_CE_WAKE_IRQ]; in ath11k_ahb_hif_suspend()
710 value = u32_encode_bits(ab_ahb->smp2p_info.seq_no++, in ath11k_ahb_hif_suspend()
715 ret = qcom_smem_state_update_bits(ab_ahb->smp2p_info.smem_state, in ath11k_ahb_hif_suspend()
734 if (!device_may_wakeup(ab->dev)) in ath11k_ahb_hif_resume()
735 return -EPERM; in ath11k_ahb_hif_resume()
737 wake_irq = ab->irq_num[ATH11K_PCI_IRQ_CE0_OFFSET + ATH11K_PCI_CE_WAKE_IRQ]; in ath11k_ahb_hif_resume()
745 reinit_completion(&ab->wow.wakeup_completed); in ath11k_ahb_hif_resume()
747 value = u32_encode_bits(ab_ahb->smp2p_info.seq_no++, in ath11k_ahb_hif_resume()
752 ret = qcom_smem_state_update_bits(ab_ahb->smp2p_info.smem_state, in ath11k_ahb_hif_resume()
759 ret = wait_for_completion_timeout(&ab->wow.wakeup_completed, 3 * HZ); in ath11k_ahb_hif_resume()
762 return -ETIMEDOUT; in ath11k_ahb_hif_resume()
805 struct device *dev = ab->dev; in ath11k_core_get_rproc()
809 if (of_property_read_u32(dev->of_node, "qcom,rproc", &rproc_phandle)) { in ath11k_core_get_rproc()
811 return -ENOENT; in ath11k_core_get_rproc()
817 return -EINVAL; in ath11k_core_get_rproc()
819 ab_ahb->tgt_rproc = prproc; in ath11k_core_get_rproc()
826 struct platform_device *pdev = ab->pdev; in ath11k_ahb_setup_msi_resources()
843 return -ENOENT; in ath11k_ahb_setup_msi_resources()
846 msi_addr_pa = res->start; in ath11k_ahb_setup_msi_resources()
847 msi_addr_iova = dma_map_resource(ab->dev, msi_addr_pa, PAGE_SIZE, in ath11k_ahb_setup_msi_resources()
849 if (dma_mapping_error(ab->dev, msi_addr_iova)) in ath11k_ahb_setup_msi_resources()
850 return -ENOMEM; in ath11k_ahb_setup_msi_resources()
852 ab->pci.msi.addr_lo = lower_32_bits(msi_addr_iova); in ath11k_ahb_setup_msi_resources()
853 ab->pci.msi.addr_hi = upper_32_bits(msi_addr_iova); in ath11k_ahb_setup_msi_resources()
855 ret = of_property_read_u32_index(ab->dev->of_node, "interrupts", 1, &int_prop); in ath11k_ahb_setup_msi_resources()
859 ab->pci.msi.ep_base_data = int_prop + 32; in ath11k_ahb_setup_msi_resources()
861 for (i = 0; i < ab->pci.msi.config->total_vectors; i++) { in ath11k_ahb_setup_msi_resources()
864 return -ENODEV; in ath11k_ahb_setup_msi_resources()
866 ab->pci.msi.irqs[i] = res->start; in ath11k_ahb_setup_msi_resources()
869 set_bit(ATH11K_FLAG_MULTI_MSI_VECTORS, &ab->dev_flags); in ath11k_ahb_setup_msi_resources()
878 if (!ab->hw_params.smp2p_wow_exit) in ath11k_ahb_setup_smp2p_handle()
881 ab_ahb->smp2p_info.smem_state = qcom_smem_state_get(ab->dev, "wlan-smp2p-out", in ath11k_ahb_setup_smp2p_handle()
882 &ab_ahb->smp2p_info.smem_bit); in ath11k_ahb_setup_smp2p_handle()
883 if (IS_ERR(ab_ahb->smp2p_info.smem_state)) { in ath11k_ahb_setup_smp2p_handle()
885 PTR_ERR(ab_ahb->smp2p_info.smem_state)); in ath11k_ahb_setup_smp2p_handle()
886 return PTR_ERR(ab_ahb->smp2p_info.smem_state); in ath11k_ahb_setup_smp2p_handle()
896 if (!ab->hw_params.smp2p_wow_exit) in ath11k_ahb_release_smp2p_handle()
899 qcom_smem_state_put(ab_ahb->smp2p_info.smem_state); in ath11k_ahb_release_smp2p_handle()
904 struct platform_device *pdev = ab->pdev; in ath11k_ahb_setup_resources()
908 if (ab->hw_params.hybrid_bus_type) in ath11k_ahb_setup_resources()
913 dev_err(&pdev->dev, "ioremap error\n"); in ath11k_ahb_setup_resources()
917 ab->mem = mem; in ath11k_ahb_setup_resources()
918 ab->mem_len = resource_size(mem_res); in ath11k_ahb_setup_resources()
926 struct device *dev = ab->dev; in ath11k_ahb_setup_msa_resources()
931 node = of_parse_phandle(dev->of_node, "memory-region", 0); in ath11k_ahb_setup_msa_resources()
933 return -ENOENT; in ath11k_ahb_setup_msa_resources()
942 ab_ahb->fw.msa_paddr = r.start; in ath11k_ahb_setup_msa_resources()
943 ab_ahb->fw.msa_size = resource_size(&r); in ath11k_ahb_setup_msa_resources()
945 node = of_parse_phandle(dev->of_node, "memory-region", 1); in ath11k_ahb_setup_msa_resources()
947 return -ENOENT; in ath11k_ahb_setup_msa_resources()
956 ab_ahb->fw.ce_paddr = r.start; in ath11k_ahb_setup_msa_resources()
957 ab_ahb->fw.ce_size = resource_size(&r); in ath11k_ahb_setup_msa_resources()
965 struct device *host_dev = ab->dev; in ath11k_ahb_fw_resources_init()
975 if (!ab->hw_params.fixed_fw_mem) in ath11k_ahb_fw_resources_init()
984 node = of_get_child_by_name(host_dev->of_node, "wifi-firmware"); in ath11k_ahb_fw_resources_init()
986 ab_ahb->fw.use_tz = true; in ath11k_ahb_fw_resources_init()
990 info.fwnode = &node->fwnode; in ath11k_ahb_fw_resources_init()
992 info.name = node->name; in ath11k_ahb_fw_resources_init()
1001 ret = of_dma_configure(&pdev->dev, node, true); in ath11k_ahb_fw_resources_init()
1007 ab_ahb->fw.dev = &pdev->dev; in ath11k_ahb_fw_resources_init()
1012 ret = -ENOMEM; in ath11k_ahb_fw_resources_init()
1016 ret = iommu_attach_device(iommu_dom, ab_ahb->fw.dev); in ath11k_ahb_fw_resources_init()
1022 ret = iommu_map(iommu_dom, ab_ahb->fw.msa_paddr, in ath11k_ahb_fw_resources_init()
1023 ab_ahb->fw.msa_paddr, ab_ahb->fw.msa_size, in ath11k_ahb_fw_resources_init()
1030 ret = iommu_map(iommu_dom, ab_ahb->fw.ce_paddr, in ath11k_ahb_fw_resources_init()
1031 ab_ahb->fw.ce_paddr, ab_ahb->fw.ce_size, in ath11k_ahb_fw_resources_init()
1038 ab_ahb->fw.use_tz = false; in ath11k_ahb_fw_resources_init()
1039 ab_ahb->fw.iommu_domain = iommu_dom; in ath11k_ahb_fw_resources_init()
1045 iommu_unmap(iommu_dom, ab_ahb->fw.msa_paddr, ab_ahb->fw.msa_size); in ath11k_ahb_fw_resources_init()
1048 iommu_detach_device(iommu_dom, ab_ahb->fw.dev); in ath11k_ahb_fw_resources_init()
1066 if (ab_ahb->fw.use_tz) in ath11k_ahb_fw_resource_deinit()
1069 iommu = ab_ahb->fw.iommu_domain; in ath11k_ahb_fw_resource_deinit()
1071 unmapped_size = iommu_unmap(iommu, ab_ahb->fw.msa_paddr, ab_ahb->fw.msa_size); in ath11k_ahb_fw_resource_deinit()
1072 if (unmapped_size != ab_ahb->fw.msa_size) in ath11k_ahb_fw_resource_deinit()
1076 unmapped_size = iommu_unmap(iommu, ab_ahb->fw.ce_paddr, ab_ahb->fw.ce_size); in ath11k_ahb_fw_resource_deinit()
1077 if (unmapped_size != ab_ahb->fw.ce_size) in ath11k_ahb_fw_resource_deinit()
1081 iommu_detach_device(iommu, ab_ahb->fw.dev); in ath11k_ahb_fw_resource_deinit()
1084 platform_device_unregister(to_platform_device(ab_ahb->fw.dev)); in ath11k_ahb_fw_resource_deinit()
1098 of_id = of_match_device(ath11k_ahb_of_match, &pdev->dev); in ath11k_ahb_probe()
1100 dev_err(&pdev->dev, "failed to find matching device tree id\n"); in ath11k_ahb_probe()
1101 return -EINVAL; in ath11k_ahb_probe()
1104 hw_rev = (enum ath11k_hw_rev)of_id->data; in ath11k_ahb_probe()
1117 dev_err(&pdev->dev, "unsupported device type %d\n", hw_rev); in ath11k_ahb_probe()
1118 return -EOPNOTSUPP; in ath11k_ahb_probe()
1121 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); in ath11k_ahb_probe()
1123 dev_err(&pdev->dev, "failed to set 32-bit consistent dma\n"); in ath11k_ahb_probe()
1127 ab = ath11k_core_alloc(&pdev->dev, sizeof(struct ath11k_ahb), in ath11k_ahb_probe()
1130 dev_err(&pdev->dev, "failed to allocate ath11k base\n"); in ath11k_ahb_probe()
1131 return -ENOMEM; in ath11k_ahb_probe()
1134 ab->hif.ops = hif_ops; in ath11k_ahb_probe()
1135 ab->pdev = pdev; in ath11k_ahb_probe()
1136 ab->hw_rev = hw_rev; in ath11k_ahb_probe()
1218 if (test_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags)) { in ath11k_ahb_remove_prepare()
1219 left = wait_for_completion_timeout(&ab->driver_recovery, in ath11k_ahb_remove_prepare()
1225 set_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags); in ath11k_ahb_remove_prepare()
1226 cancel_work_sync(&ab->restart_work); in ath11k_ahb_remove_prepare()
1227 cancel_work_sync(&ab->qmi.event_work); in ath11k_ahb_remove_prepare()
1232 struct platform_device *pdev = ab->pdev; in ath11k_ahb_free_resources()
1247 if (test_bit(ATH11K_FLAG_QMI_FAIL, &ab->dev_flags)) { in ath11k_ahb_remove()
1273 if (!(test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags))) in ath11k_ahb_shutdown()