Lines Matching refs:ar
467 static void ath10k_snoc_write32(struct ath10k *ar, u32 offset, u32 value) in ath10k_snoc_write32() argument
469 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_write32()
474 static u32 ath10k_snoc_read32(struct ath10k *ar, u32 offset) in ath10k_snoc_read32() argument
476 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_read32()
487 struct ath10k *ar = pipe->hif_ce_state; in __ath10k_snoc_rx_post_buf() local
488 struct ath10k_ce *ce = ath10k_ce_priv(ar); in __ath10k_snoc_rx_post_buf()
499 paddr = dma_map_single(ar->dev, skb->data, in __ath10k_snoc_rx_post_buf()
502 if (unlikely(dma_mapping_error(ar->dev, paddr))) { in __ath10k_snoc_rx_post_buf()
503 ath10k_warn(ar, "failed to dma map snoc rx buf\n"); in __ath10k_snoc_rx_post_buf()
514 dma_unmap_single(ar->dev, paddr, skb->len + skb_tailroom(skb), in __ath10k_snoc_rx_post_buf()
525 struct ath10k *ar = pipe->hif_ce_state; in ath10k_snoc_rx_post_pipe() local
526 struct ath10k_ce *ce = ath10k_ce_priv(ar); in ath10k_snoc_rx_post_pipe()
527 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_rx_post_pipe()
545 ath10k_warn(ar, "failed to post rx buf: %d\n", ret); in ath10k_snoc_rx_post_pipe()
553 static void ath10k_snoc_rx_post(struct ath10k *ar) in ath10k_snoc_rx_post() argument
555 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_rx_post()
563 void (*callback)(struct ath10k *ar, in ath10k_snoc_process_rx_cb() argument
566 struct ath10k *ar = ce_state->ar; in ath10k_snoc_process_rx_cb() local
567 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_process_rx_cb()
579 dma_unmap_single(ar->dev, ATH10K_SKB_RXCB(skb)->paddr, in ath10k_snoc_process_rx_cb()
583 ath10k_warn(ar, "rxed more than expected (nbytes %d, max %d)", in ath10k_snoc_process_rx_cb()
594 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc rx ce pipe %d len %d\n", in ath10k_snoc_process_rx_cb()
597 callback(ar, skb); in ath10k_snoc_process_rx_cb()
613 ath10k_ce_per_engine_service(ce_state->ar, CE_POLL_PIPE); in ath10k_snoc_htt_htc_rx_cb()
626 static void ath10k_snoc_htt_rx_deliver(struct ath10k *ar, struct sk_buff *skb) in ath10k_snoc_htt_rx_deliver() argument
629 ath10k_htt_t2h_msg_handler(ar, skb); in ath10k_snoc_htt_rx_deliver()
634 ath10k_ce_per_engine_service(ce_state->ar, CE_POLL_PIPE); in ath10k_snoc_htt_rx_cb()
641 struct ath10k *ar = ar_snoc->ar; in ath10k_snoc_rx_replenish_retry() local
643 ath10k_snoc_rx_post(ar); in ath10k_snoc_rx_replenish_retry()
648 struct ath10k *ar = ce_state->ar; in ath10k_snoc_htc_tx_cb() local
661 ath10k_htc_tx_completion_handler(ar, skb); in ath10k_snoc_htc_tx_cb()
666 struct ath10k *ar = ce_state->ar; in ath10k_snoc_htt_tx_cb() local
673 dma_unmap_single(ar->dev, ATH10K_SKB_CB(skb)->paddr, in ath10k_snoc_htt_tx_cb()
675 ath10k_htt_hif_tx_complete(ar, skb); in ath10k_snoc_htt_tx_cb()
679 static int ath10k_snoc_hif_tx_sg(struct ath10k *ar, u8 pipe_id, in ath10k_snoc_hif_tx_sg() argument
682 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_tx_sg()
683 struct ath10k_ce *ce = ath10k_ce_priv(ar); in ath10k_snoc_hif_tx_sg()
693 ath10k_dbg(ar, ATH10K_DBG_SNOC, in ath10k_snoc_hif_tx_sg()
707 ath10k_dbg(ar, ATH10K_DBG_SNOC, in ath10k_snoc_hif_tx_sg()
732 static int ath10k_snoc_hif_get_target_info(struct ath10k *ar, in ath10k_snoc_hif_get_target_info() argument
741 static u16 ath10k_snoc_hif_get_free_queue_number(struct ath10k *ar, u8 pipe) in ath10k_snoc_hif_get_free_queue_number() argument
743 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_get_free_queue_number()
745 ath10k_dbg(ar, ATH10K_DBG_SNOC, "hif get free queue number\n"); in ath10k_snoc_hif_get_free_queue_number()
750 static void ath10k_snoc_hif_send_complete_check(struct ath10k *ar, u8 pipe, in ath10k_snoc_hif_send_complete_check() argument
755 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc hif send complete check\n"); in ath10k_snoc_hif_send_complete_check()
758 resources = ath10k_snoc_hif_get_free_queue_number(ar, pipe); in ath10k_snoc_hif_send_complete_check()
763 ath10k_ce_per_engine_service(ar, pipe); in ath10k_snoc_hif_send_complete_check()
766 static int ath10k_snoc_hif_map_service_to_pipe(struct ath10k *ar, in ath10k_snoc_hif_map_service_to_pipe() argument
774 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc hif map service\n"); in ath10k_snoc_hif_map_service_to_pipe()
812 static void ath10k_snoc_hif_get_default_pipe(struct ath10k *ar, in ath10k_snoc_hif_get_default_pipe() argument
815 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc hif get default pipe\n"); in ath10k_snoc_hif_get_default_pipe()
817 (void)ath10k_snoc_hif_map_service_to_pipe(ar, in ath10k_snoc_hif_get_default_pipe()
822 static inline void ath10k_snoc_irq_disable(struct ath10k *ar) in ath10k_snoc_irq_disable() argument
824 ath10k_ce_disable_interrupts(ar); in ath10k_snoc_irq_disable()
827 static inline void ath10k_snoc_irq_enable(struct ath10k *ar) in ath10k_snoc_irq_enable() argument
829 ath10k_ce_enable_interrupts(ar); in ath10k_snoc_irq_enable()
837 struct ath10k *ar; in ath10k_snoc_rx_pipe_cleanup() local
840 ar = snoc_pipe->hif_ce_state; in ath10k_snoc_rx_pipe_cleanup()
857 dma_unmap_single(ar->dev, ATH10K_SKB_RXCB(skb)->paddr, in ath10k_snoc_rx_pipe_cleanup()
869 struct ath10k *ar; in ath10k_snoc_tx_pipe_cleanup() local
872 ar = snoc_pipe->hif_ce_state; in ath10k_snoc_tx_pipe_cleanup()
889 ath10k_htc_tx_completion_handler(ar, skb); in ath10k_snoc_tx_pipe_cleanup()
893 static void ath10k_snoc_buffer_cleanup(struct ath10k *ar) in ath10k_snoc_buffer_cleanup() argument
895 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_buffer_cleanup()
907 static void ath10k_snoc_hif_stop(struct ath10k *ar) in ath10k_snoc_hif_stop() argument
909 if (!test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags)) in ath10k_snoc_hif_stop()
910 ath10k_snoc_irq_disable(ar); in ath10k_snoc_hif_stop()
912 napi_synchronize(&ar->napi); in ath10k_snoc_hif_stop()
913 napi_disable(&ar->napi); in ath10k_snoc_hif_stop()
914 ath10k_snoc_buffer_cleanup(ar); in ath10k_snoc_hif_stop()
915 ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot hif stop\n"); in ath10k_snoc_hif_stop()
918 static int ath10k_snoc_hif_start(struct ath10k *ar) in ath10k_snoc_hif_start() argument
920 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_start()
922 napi_enable(&ar->napi); in ath10k_snoc_hif_start()
923 ath10k_snoc_irq_enable(ar); in ath10k_snoc_hif_start()
924 ath10k_snoc_rx_post(ar); in ath10k_snoc_hif_start()
928 ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot hif start\n"); in ath10k_snoc_hif_start()
933 static int ath10k_snoc_init_pipes(struct ath10k *ar) in ath10k_snoc_init_pipes() argument
938 ret = ath10k_ce_init_pipe(ar, i, &host_ce_config_wlan[i]); in ath10k_snoc_init_pipes()
940 ath10k_err(ar, "failed to initialize copy engine pipe %d: %d\n", in ath10k_snoc_init_pipes()
949 static int ath10k_snoc_wlan_enable(struct ath10k *ar, in ath10k_snoc_wlan_enable() argument
992 ath10k_err(ar, "invalid firmware mode %d\n", fw_mode); in ath10k_snoc_wlan_enable()
996 return ath10k_qmi_wlan_enable(ar, &cfg, mode, in ath10k_snoc_wlan_enable()
1000 static void ath10k_snoc_wlan_disable(struct ath10k *ar) in ath10k_snoc_wlan_disable() argument
1002 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_wlan_disable()
1010 if (!test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags) || in ath10k_snoc_wlan_disable()
1012 ath10k_qmi_wlan_disable(ar); in ath10k_snoc_wlan_disable()
1015 static void ath10k_snoc_hif_power_down(struct ath10k *ar) in ath10k_snoc_hif_power_down() argument
1017 ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot hif power down\n"); in ath10k_snoc_hif_power_down()
1019 ath10k_snoc_wlan_disable(ar); in ath10k_snoc_hif_power_down()
1020 ath10k_ce_free_rri(ar); in ath10k_snoc_hif_power_down()
1023 static int ath10k_snoc_hif_power_up(struct ath10k *ar, in ath10k_snoc_hif_power_up() argument
1028 ath10k_dbg(ar, ATH10K_DBG_SNOC, "%s:WCN3990 driver state = %d\n", in ath10k_snoc_hif_power_up()
1029 __func__, ar->state); in ath10k_snoc_hif_power_up()
1031 ret = ath10k_snoc_wlan_enable(ar, fw_mode); in ath10k_snoc_hif_power_up()
1033 ath10k_err(ar, "failed to enable wcn3990: %d\n", ret); in ath10k_snoc_hif_power_up()
1037 ath10k_ce_alloc_rri(ar); in ath10k_snoc_hif_power_up()
1039 ret = ath10k_snoc_init_pipes(ar); in ath10k_snoc_hif_power_up()
1041 ath10k_err(ar, "failed to initialize CE: %d\n", ret); in ath10k_snoc_hif_power_up()
1048 ath10k_snoc_wlan_disable(ar); in ath10k_snoc_hif_power_up()
1053 static int ath10k_snoc_hif_set_target_log_mode(struct ath10k *ar, in ath10k_snoc_hif_set_target_log_mode() argument
1063 return ath10k_qmi_set_fw_log_mode(ar, fw_dbg_mode); in ath10k_snoc_hif_set_target_log_mode()
1067 static int ath10k_snoc_hif_suspend(struct ath10k *ar) in ath10k_snoc_hif_suspend() argument
1069 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_suspend()
1072 if (!device_may_wakeup(ar->dev)) in ath10k_snoc_hif_suspend()
1077 ath10k_err(ar, "failed to enable wakeup irq :%d\n", ret); in ath10k_snoc_hif_suspend()
1081 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc device suspended\n"); in ath10k_snoc_hif_suspend()
1086 static int ath10k_snoc_hif_resume(struct ath10k *ar) in ath10k_snoc_hif_resume() argument
1088 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_hif_resume()
1091 if (!device_may_wakeup(ar->dev)) in ath10k_snoc_hif_resume()
1096 ath10k_err(ar, "failed to disable wakeup irq: %d\n", ret); in ath10k_snoc_hif_resume()
1100 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc device resumed\n"); in ath10k_snoc_hif_resume()
1132 static int ath10k_snoc_get_ce_id_from_irq(struct ath10k *ar, int irq) in ath10k_snoc_get_ce_id_from_irq() argument
1134 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_get_ce_id_from_irq()
1141 ath10k_err(ar, "No matching CE id for irq %d\n", irq); in ath10k_snoc_get_ce_id_from_irq()
1148 struct ath10k *ar = arg; in ath10k_snoc_per_engine_handler() local
1149 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_per_engine_handler()
1150 int ce_id = ath10k_snoc_get_ce_id_from_irq(ar, irq); in ath10k_snoc_per_engine_handler()
1153 ath10k_warn(ar, "unexpected/invalid irq %d ce_id %d\n", irq, in ath10k_snoc_per_engine_handler()
1158 ath10k_snoc_irq_disable(ar); in ath10k_snoc_per_engine_handler()
1159 napi_schedule(&ar->napi); in ath10k_snoc_per_engine_handler()
1166 struct ath10k *ar = container_of(ctx, struct ath10k, napi); in ath10k_snoc_napi_poll() local
1169 if (test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags)) { in ath10k_snoc_napi_poll()
1174 ath10k_ce_per_engine_service_any(ar); in ath10k_snoc_napi_poll()
1175 done = ath10k_htt_txrx_compl_task(ar, budget); in ath10k_snoc_napi_poll()
1179 ath10k_snoc_irq_enable(ar); in ath10k_snoc_napi_poll()
1185 static void ath10k_snoc_init_napi(struct ath10k *ar) in ath10k_snoc_init_napi() argument
1187 netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_snoc_napi_poll, in ath10k_snoc_init_napi()
1191 static int ath10k_snoc_request_irq(struct ath10k *ar) in ath10k_snoc_request_irq() argument
1193 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_request_irq()
1200 irqflags, ce_name[id], ar); in ath10k_snoc_request_irq()
1202 ath10k_err(ar, in ath10k_snoc_request_irq()
1213 free_irq(ar_snoc->ce_irqs[id].irq_line, ar); in ath10k_snoc_request_irq()
1218 static void ath10k_snoc_free_irq(struct ath10k *ar) in ath10k_snoc_free_irq() argument
1220 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_free_irq()
1224 free_irq(ar_snoc->ce_irqs[id].irq_line, ar); in ath10k_snoc_free_irq()
1227 static int ath10k_snoc_resource_init(struct ath10k *ar) in ath10k_snoc_resource_init() argument
1229 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_resource_init()
1237 ath10k_err(ar, "Memory base not found in DT\n"); in ath10k_snoc_resource_init()
1245 ath10k_err(ar, "Memory base ioremap failed with physical address %pa\n", in ath10k_snoc_resource_init()
1253 ath10k_err(ar, "failed to get IRQ%d\n", i); in ath10k_snoc_resource_init()
1264 static void ath10k_snoc_quirks_init(struct ath10k *ar) in ath10k_snoc_quirks_init() argument
1266 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_quirks_init()
1273 int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type) in ath10k_snoc_fw_indication() argument
1275 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_fw_indication()
1285 queue_work(ar->workqueue, &ar->restart_work); in ath10k_snoc_fw_indication()
1291 ret = ath10k_core_register(ar, &bus_params); in ath10k_snoc_fw_indication()
1293 ath10k_err(ar, "Failed to register driver core: %d\n", in ath10k_snoc_fw_indication()
1301 set_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags); in ath10k_snoc_fw_indication()
1304 ath10k_err(ar, "invalid fw indication: %llx\n", type); in ath10k_snoc_fw_indication()
1311 static int ath10k_snoc_setup_resource(struct ath10k *ar) in ath10k_snoc_setup_resource() argument
1313 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_setup_resource()
1314 struct ath10k_ce *ce = ath10k_ce_priv(ar); in ath10k_snoc_setup_resource()
1324 pipe->hif_ce_state = ar; in ath10k_snoc_setup_resource()
1326 ret = ath10k_ce_alloc_pipe(ar, i, &host_ce_config_wlan[i]); in ath10k_snoc_setup_resource()
1328 ath10k_err(ar, "failed to allocate copy engine pipe %d: %d\n", in ath10k_snoc_setup_resource()
1335 ath10k_snoc_init_napi(ar); in ath10k_snoc_setup_resource()
1340 static void ath10k_snoc_release_resource(struct ath10k *ar) in ath10k_snoc_release_resource() argument
1344 netif_napi_del(&ar->napi); in ath10k_snoc_release_resource()
1346 ath10k_ce_free_pipe(ar, i); in ath10k_snoc_release_resource()
1349 static int ath10k_get_vreg_info(struct ath10k *ar, struct device *dev, in ath10k_get_vreg_info() argument
1361 ath10k_err(ar, "EPROBE_DEFER for regulator: %s\n", in ath10k_get_vreg_info()
1366 ath10k_err(ar, "Regulator %s doesn't exist: %d\n", in ath10k_get_vreg_info()
1370 ath10k_dbg(ar, ATH10K_DBG_SNOC, in ath10k_get_vreg_info()
1379 ath10k_dbg(ar, ATH10K_DBG_SNOC, in ath10k_get_vreg_info()
1387 static int ath10k_get_clk_info(struct ath10k *ar, struct device *dev, in ath10k_get_clk_info() argument
1397 ath10k_err(ar, "snoc clock %s isn't available: %d\n", in ath10k_get_clk_info()
1401 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc ignoring clock %s: %d\n", in ath10k_get_clk_info()
1407 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc clock %s freq %u\n", in ath10k_get_clk_info()
1415 static int __ath10k_snoc_vreg_on(struct ath10k *ar, in __ath10k_snoc_vreg_on() argument
1420 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc regulator %s being enabled\n", in __ath10k_snoc_vreg_on()
1426 ath10k_err(ar, in __ath10k_snoc_vreg_on()
1435 ath10k_err(ar, "failed to set regulator %s load: %d\n", in __ath10k_snoc_vreg_on()
1443 ath10k_err(ar, "failed to enable regulator %s\n", in __ath10k_snoc_vreg_on()
1461 static int __ath10k_snoc_vreg_off(struct ath10k *ar, in __ath10k_snoc_vreg_off() argument
1466 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc regulator %s being disabled\n", in __ath10k_snoc_vreg_off()
1471 ath10k_err(ar, "failed to disable regulator %s\n", in __ath10k_snoc_vreg_off()
1476 ath10k_err(ar, "failed to set load %s\n", vreg_info->name); in __ath10k_snoc_vreg_off()
1480 ath10k_err(ar, "failed to set voltage %s\n", vreg_info->name); in __ath10k_snoc_vreg_off()
1485 static int ath10k_snoc_vreg_on(struct ath10k *ar) in ath10k_snoc_vreg_on() argument
1487 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_vreg_on()
1498 ret = __ath10k_snoc_vreg_on(ar, vreg_info); in ath10k_snoc_vreg_on()
1512 __ath10k_snoc_vreg_off(ar, vreg_info); in ath10k_snoc_vreg_on()
1518 static int ath10k_snoc_vreg_off(struct ath10k *ar) in ath10k_snoc_vreg_off() argument
1520 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_vreg_off()
1531 ret = __ath10k_snoc_vreg_off(ar, vreg_info); in ath10k_snoc_vreg_off()
1537 static int ath10k_snoc_clk_init(struct ath10k *ar) in ath10k_snoc_clk_init() argument
1539 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_clk_init()
1550 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc clock %s being enabled\n", in ath10k_snoc_clk_init()
1557 ath10k_err(ar, "failed to set clock %s freq %u\n", in ath10k_snoc_clk_init()
1565 ath10k_err(ar, "failed to enable clock %s\n", in ath10k_snoc_clk_init()
1586 static int ath10k_snoc_clk_deinit(struct ath10k *ar) in ath10k_snoc_clk_deinit() argument
1588 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_clk_deinit()
1598 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc clock %s being disabled\n", in ath10k_snoc_clk_deinit()
1607 static int ath10k_hw_power_on(struct ath10k *ar) in ath10k_hw_power_on() argument
1611 ath10k_dbg(ar, ATH10K_DBG_SNOC, "soc power on\n"); in ath10k_hw_power_on()
1613 ret = ath10k_snoc_vreg_on(ar); in ath10k_hw_power_on()
1617 ret = ath10k_snoc_clk_init(ar); in ath10k_hw_power_on()
1624 ath10k_snoc_vreg_off(ar); in ath10k_hw_power_on()
1628 static int ath10k_hw_power_off(struct ath10k *ar) in ath10k_hw_power_off() argument
1632 ath10k_dbg(ar, ATH10K_DBG_SNOC, "soc power off\n"); in ath10k_hw_power_off()
1634 ath10k_snoc_clk_deinit(ar); in ath10k_hw_power_off()
1636 ret = ath10k_snoc_vreg_off(ar); in ath10k_hw_power_off()
1655 struct ath10k *ar; in ath10k_snoc_probe() local
1675 ar = ath10k_core_create(sizeof(*ar_snoc), dev, ATH10K_BUS_SNOC, in ath10k_snoc_probe()
1677 if (!ar) { in ath10k_snoc_probe()
1682 ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_probe()
1684 platform_set_drvdata(pdev, ar); in ath10k_snoc_probe()
1685 ar_snoc->ar = ar; in ath10k_snoc_probe()
1687 ar->ce_priv = &ar_snoc->ce; in ath10k_snoc_probe()
1690 ath10k_snoc_quirks_init(ar); in ath10k_snoc_probe()
1692 ret = ath10k_snoc_resource_init(ar); in ath10k_snoc_probe()
1694 ath10k_warn(ar, "failed to initialize resource: %d\n", ret); in ath10k_snoc_probe()
1698 ret = ath10k_snoc_setup_resource(ar); in ath10k_snoc_probe()
1700 ath10k_warn(ar, "failed to setup resource: %d\n", ret); in ath10k_snoc_probe()
1703 ret = ath10k_snoc_request_irq(ar); in ath10k_snoc_probe()
1705 ath10k_warn(ar, "failed to request irqs: %d\n", ret); in ath10k_snoc_probe()
1711 ret = ath10k_get_vreg_info(ar, dev, &ar_snoc->vreg[i]); in ath10k_snoc_probe()
1718 ret = ath10k_get_clk_info(ar, dev, &ar_snoc->clk[i]); in ath10k_snoc_probe()
1723 ret = ath10k_hw_power_on(ar); in ath10k_snoc_probe()
1725 ath10k_err(ar, "failed to power on device: %d\n", ret); in ath10k_snoc_probe()
1729 ret = ath10k_qmi_init(ar, msa_size); in ath10k_snoc_probe()
1731 ath10k_warn(ar, "failed to register wlfw qmi client: %d\n", ret); in ath10k_snoc_probe()
1735 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc probe\n"); in ath10k_snoc_probe()
1740 ath10k_snoc_free_irq(ar); in ath10k_snoc_probe()
1743 ath10k_snoc_release_resource(ar); in ath10k_snoc_probe()
1746 ath10k_core_destroy(ar); in ath10k_snoc_probe()
1753 struct ath10k *ar = platform_get_drvdata(pdev); in ath10k_snoc_remove() local
1754 struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); in ath10k_snoc_remove()
1756 ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc remove\n"); in ath10k_snoc_remove()
1758 reinit_completion(&ar->driver_recovery); in ath10k_snoc_remove()
1761 wait_for_completion_timeout(&ar->driver_recovery, 3 * HZ); in ath10k_snoc_remove()
1765 ath10k_core_unregister(ar); in ath10k_snoc_remove()
1766 ath10k_hw_power_off(ar); in ath10k_snoc_remove()
1767 ath10k_snoc_free_irq(ar); in ath10k_snoc_remove()
1768 ath10k_snoc_release_resource(ar); in ath10k_snoc_remove()
1769 ath10k_qmi_deinit(ar); in ath10k_snoc_remove()
1770 ath10k_core_destroy(ar); in ath10k_snoc_remove()