Lines Matching refs:plat_priv

25 enum cnss_dev_bus_type cnss_get_bus_type(struct cnss_plat_data *plat_priv)  in cnss_get_bus_type()  argument
31 if (plat_priv->dt_type == CNSS_DTT_MULTIEXCHG) { in cnss_get_bus_type()
32 dev = &plat_priv->plat_dev->dev; in cnss_get_bus_type()
47 switch (plat_priv->device_id) { in cnss_get_bus_type()
58 cnss_pr_err("Unknown device_id: 0x%lx\n", plat_priv->device_id); in cnss_get_bus_type()
95 int cnss_bus_init(struct cnss_plat_data *plat_priv) in cnss_bus_init() argument
97 if (!plat_priv) in cnss_bus_init()
100 switch (plat_priv->bus_type) { in cnss_bus_init()
102 return cnss_pci_init(plat_priv); in cnss_bus_init()
105 plat_priv->bus_type); in cnss_bus_init()
110 void cnss_bus_deinit(struct cnss_plat_data *plat_priv) in cnss_bus_deinit() argument
112 if (!plat_priv) in cnss_bus_deinit()
115 switch (plat_priv->bus_type) { in cnss_bus_deinit()
117 return cnss_pci_deinit(plat_priv); in cnss_bus_deinit()
120 plat_priv->bus_type); in cnss_bus_deinit()
125 void cnss_bus_add_fw_prefix_name(struct cnss_plat_data *plat_priv, in cnss_bus_add_fw_prefix_name() argument
128 if (!plat_priv) in cnss_bus_add_fw_prefix_name()
131 switch (plat_priv->bus_type) { in cnss_bus_add_fw_prefix_name()
133 return cnss_pci_add_fw_prefix_name(plat_priv->bus_priv, in cnss_bus_add_fw_prefix_name()
137 plat_priv->bus_type); in cnss_bus_add_fw_prefix_name()
142 int cnss_bus_load_tme_patch(struct cnss_plat_data *plat_priv) in cnss_bus_load_tme_patch() argument
144 if (!plat_priv) in cnss_bus_load_tme_patch()
147 switch (plat_priv->bus_type) { in cnss_bus_load_tme_patch()
149 return cnss_pci_load_tme_patch(plat_priv->bus_priv); in cnss_bus_load_tme_patch()
152 plat_priv->bus_type); in cnss_bus_load_tme_patch()
157 int cnss_bus_load_tme_opt_file(struct cnss_plat_data *plat_priv, in cnss_bus_load_tme_opt_file() argument
160 if (!plat_priv) in cnss_bus_load_tme_opt_file()
163 switch (plat_priv->bus_type) { in cnss_bus_load_tme_opt_file()
165 return cnss_pci_load_tme_opt_file(plat_priv->bus_priv, file); in cnss_bus_load_tme_opt_file()
168 plat_priv->bus_type); in cnss_bus_load_tme_opt_file()
173 int cnss_bus_load_m3(struct cnss_plat_data *plat_priv) in cnss_bus_load_m3() argument
175 if (!plat_priv) in cnss_bus_load_m3()
178 switch (plat_priv->bus_type) { in cnss_bus_load_m3()
180 return cnss_pci_load_m3(plat_priv->bus_priv); in cnss_bus_load_m3()
183 plat_priv->bus_type); in cnss_bus_load_m3()
188 int cnss_bus_load_aux(struct cnss_plat_data *plat_priv) in cnss_bus_load_aux() argument
190 if (!plat_priv) in cnss_bus_load_aux()
193 switch (plat_priv->bus_type) { in cnss_bus_load_aux()
195 return cnss_pci_load_aux(plat_priv->bus_priv); in cnss_bus_load_aux()
198 plat_priv->bus_type); in cnss_bus_load_aux()
203 int cnss_bus_handle_dev_sol_irq(struct cnss_plat_data *plat_priv) in cnss_bus_handle_dev_sol_irq() argument
205 if (!plat_priv) in cnss_bus_handle_dev_sol_irq()
208 switch (plat_priv->bus_type) { in cnss_bus_handle_dev_sol_irq()
210 return cnss_pci_handle_dev_sol_irq(plat_priv->bus_priv); in cnss_bus_handle_dev_sol_irq()
213 plat_priv->bus_type); in cnss_bus_handle_dev_sol_irq()
218 int cnss_bus_alloc_fw_mem(struct cnss_plat_data *plat_priv) in cnss_bus_alloc_fw_mem() argument
220 if (!plat_priv) in cnss_bus_alloc_fw_mem()
223 switch (plat_priv->bus_type) { in cnss_bus_alloc_fw_mem()
225 return cnss_pci_alloc_fw_mem(plat_priv->bus_priv); in cnss_bus_alloc_fw_mem()
228 plat_priv->bus_type); in cnss_bus_alloc_fw_mem()
233 int cnss_bus_alloc_qdss_mem(struct cnss_plat_data *plat_priv) in cnss_bus_alloc_qdss_mem() argument
235 if (!plat_priv) in cnss_bus_alloc_qdss_mem()
238 switch (plat_priv->bus_type) { in cnss_bus_alloc_qdss_mem()
240 return cnss_pci_alloc_qdss_mem(plat_priv->bus_priv); in cnss_bus_alloc_qdss_mem()
243 plat_priv->bus_type); in cnss_bus_alloc_qdss_mem()
248 void cnss_bus_free_qdss_mem(struct cnss_plat_data *plat_priv) in cnss_bus_free_qdss_mem() argument
250 if (!plat_priv) in cnss_bus_free_qdss_mem()
253 switch (plat_priv->bus_type) { in cnss_bus_free_qdss_mem()
255 cnss_pci_free_qdss_mem(plat_priv->bus_priv); in cnss_bus_free_qdss_mem()
259 plat_priv->bus_type); in cnss_bus_free_qdss_mem()
264 u32 cnss_bus_get_wake_irq(struct cnss_plat_data *plat_priv) in cnss_bus_get_wake_irq() argument
266 if (!plat_priv) in cnss_bus_get_wake_irq()
269 switch (plat_priv->bus_type) { in cnss_bus_get_wake_irq()
271 return cnss_pci_get_wake_msi(plat_priv->bus_priv); in cnss_bus_get_wake_irq()
274 plat_priv->bus_type); in cnss_bus_get_wake_irq()
279 int cnss_bus_force_fw_assert_hdlr(struct cnss_plat_data *plat_priv) in cnss_bus_force_fw_assert_hdlr() argument
281 if (!plat_priv) in cnss_bus_force_fw_assert_hdlr()
284 switch (plat_priv->bus_type) { in cnss_bus_force_fw_assert_hdlr()
286 return cnss_pci_force_fw_assert_hdlr(plat_priv->bus_priv); in cnss_bus_force_fw_assert_hdlr()
289 plat_priv->bus_type); in cnss_bus_force_fw_assert_hdlr()
294 int cnss_bus_qmi_send_get(struct cnss_plat_data *plat_priv) in cnss_bus_qmi_send_get() argument
296 if (!plat_priv) in cnss_bus_qmi_send_get()
299 switch (plat_priv->bus_type) { in cnss_bus_qmi_send_get()
301 return cnss_pci_qmi_send_get(plat_priv->bus_priv); in cnss_bus_qmi_send_get()
304 plat_priv->bus_type); in cnss_bus_qmi_send_get()
309 int cnss_bus_qmi_send_put(struct cnss_plat_data *plat_priv) in cnss_bus_qmi_send_put() argument
311 if (!plat_priv) in cnss_bus_qmi_send_put()
314 switch (plat_priv->bus_type) { in cnss_bus_qmi_send_put()
316 return cnss_pci_qmi_send_put(plat_priv->bus_priv); in cnss_bus_qmi_send_put()
319 plat_priv->bus_type); in cnss_bus_qmi_send_put()
326 struct cnss_plat_data *plat_priv = in cnss_bus_fw_boot_timeout_hdlr() local
327 from_timer(plat_priv, t, fw_boot_timer); in cnss_bus_fw_boot_timeout_hdlr()
329 if (!plat_priv) in cnss_bus_fw_boot_timeout_hdlr()
332 switch (plat_priv->bus_type) { in cnss_bus_fw_boot_timeout_hdlr()
334 return cnss_pci_fw_boot_timeout_hdlr(plat_priv->bus_priv); in cnss_bus_fw_boot_timeout_hdlr()
337 plat_priv->bus_type); in cnss_bus_fw_boot_timeout_hdlr()
342 void cnss_bus_collect_dump_info(struct cnss_plat_data *plat_priv, bool in_panic) in cnss_bus_collect_dump_info() argument
344 if (!plat_priv) in cnss_bus_collect_dump_info()
347 switch (plat_priv->bus_type) { in cnss_bus_collect_dump_info()
349 return cnss_pci_collect_dump_info(plat_priv->bus_priv, in cnss_bus_collect_dump_info()
353 plat_priv->bus_type); in cnss_bus_collect_dump_info()
358 void cnss_bus_device_crashed(struct cnss_plat_data *plat_priv) in cnss_bus_device_crashed() argument
360 if (!plat_priv) in cnss_bus_device_crashed()
363 switch (plat_priv->bus_type) { in cnss_bus_device_crashed()
365 return cnss_pci_device_crashed(plat_priv->bus_priv); in cnss_bus_device_crashed()
368 plat_priv->bus_type); in cnss_bus_device_crashed()
373 int cnss_bus_call_driver_probe(struct cnss_plat_data *plat_priv) in cnss_bus_call_driver_probe() argument
375 if (!plat_priv) in cnss_bus_call_driver_probe()
378 switch (plat_priv->bus_type) { in cnss_bus_call_driver_probe()
380 return cnss_pci_call_driver_probe(plat_priv->bus_priv); in cnss_bus_call_driver_probe()
383 plat_priv->bus_type); in cnss_bus_call_driver_probe()
388 int cnss_bus_call_driver_remove(struct cnss_plat_data *plat_priv) in cnss_bus_call_driver_remove() argument
390 if (!plat_priv) in cnss_bus_call_driver_remove()
393 switch (plat_priv->bus_type) { in cnss_bus_call_driver_remove()
395 return cnss_pci_call_driver_remove(plat_priv->bus_priv); in cnss_bus_call_driver_remove()
398 plat_priv->bus_type); in cnss_bus_call_driver_remove()
403 int cnss_bus_dev_powerup(struct cnss_plat_data *plat_priv) in cnss_bus_dev_powerup() argument
405 if (!plat_priv) in cnss_bus_dev_powerup()
408 switch (plat_priv->bus_type) { in cnss_bus_dev_powerup()
410 return cnss_pci_dev_powerup(plat_priv->bus_priv); in cnss_bus_dev_powerup()
413 plat_priv->bus_type); in cnss_bus_dev_powerup()
418 int cnss_bus_dev_shutdown(struct cnss_plat_data *plat_priv) in cnss_bus_dev_shutdown() argument
420 if (!plat_priv) in cnss_bus_dev_shutdown()
423 switch (plat_priv->bus_type) { in cnss_bus_dev_shutdown()
425 return cnss_pci_dev_shutdown(plat_priv->bus_priv); in cnss_bus_dev_shutdown()
428 plat_priv->bus_type); in cnss_bus_dev_shutdown()
433 int cnss_bus_dev_crash_shutdown(struct cnss_plat_data *plat_priv) in cnss_bus_dev_crash_shutdown() argument
435 if (!plat_priv) in cnss_bus_dev_crash_shutdown()
438 switch (plat_priv->bus_type) { in cnss_bus_dev_crash_shutdown()
440 return cnss_pci_dev_crash_shutdown(plat_priv->bus_priv); in cnss_bus_dev_crash_shutdown()
443 plat_priv->bus_type); in cnss_bus_dev_crash_shutdown()
448 int cnss_bus_dev_ramdump(struct cnss_plat_data *plat_priv) in cnss_bus_dev_ramdump() argument
450 if (!plat_priv) in cnss_bus_dev_ramdump()
453 switch (plat_priv->bus_type) { in cnss_bus_dev_ramdump()
455 return cnss_pci_dev_ramdump(plat_priv->bus_priv); in cnss_bus_dev_ramdump()
458 plat_priv->bus_type); in cnss_bus_dev_ramdump()
463 int cnss_bus_register_driver_hdlr(struct cnss_plat_data *plat_priv, void *data) in cnss_bus_register_driver_hdlr() argument
465 if (!plat_priv) in cnss_bus_register_driver_hdlr()
468 switch (plat_priv->bus_type) { in cnss_bus_register_driver_hdlr()
470 return cnss_pci_register_driver_hdlr(plat_priv->bus_priv, data); in cnss_bus_register_driver_hdlr()
473 plat_priv->bus_type); in cnss_bus_register_driver_hdlr()
478 int cnss_bus_runtime_pm_get_sync(struct cnss_plat_data *plat_priv) in cnss_bus_runtime_pm_get_sync() argument
480 if (!plat_priv) in cnss_bus_runtime_pm_get_sync()
483 switch (plat_priv->bus_type) { in cnss_bus_runtime_pm_get_sync()
485 return cnss_pci_pm_runtime_get_sync(plat_priv->bus_priv, RTPM_ID_CNSS); in cnss_bus_runtime_pm_get_sync()
488 plat_priv->bus_type); in cnss_bus_runtime_pm_get_sync()
493 void cnss_bus_runtime_pm_put(struct cnss_plat_data *plat_priv) in cnss_bus_runtime_pm_put() argument
495 if (!plat_priv) in cnss_bus_runtime_pm_put()
498 switch (plat_priv->bus_type) { in cnss_bus_runtime_pm_put()
500 cnss_pci_pm_runtime_mark_last_busy(plat_priv->bus_priv); in cnss_bus_runtime_pm_put()
501 cnss_pci_pm_runtime_put_autosuspend(plat_priv->bus_priv, RTPM_ID_CNSS); in cnss_bus_runtime_pm_put()
505 plat_priv->bus_type); in cnss_bus_runtime_pm_put()
509 int cnss_bus_unregister_driver_hdlr(struct cnss_plat_data *plat_priv) in cnss_bus_unregister_driver_hdlr() argument
511 if (!plat_priv) in cnss_bus_unregister_driver_hdlr()
514 switch (plat_priv->bus_type) { in cnss_bus_unregister_driver_hdlr()
516 return cnss_pci_unregister_driver_hdlr(plat_priv->bus_priv); in cnss_bus_unregister_driver_hdlr()
519 plat_priv->bus_type); in cnss_bus_unregister_driver_hdlr()
524 int cnss_bus_call_driver_modem_status(struct cnss_plat_data *plat_priv, in cnss_bus_call_driver_modem_status() argument
527 if (!plat_priv) in cnss_bus_call_driver_modem_status()
530 switch (plat_priv->bus_type) { in cnss_bus_call_driver_modem_status()
532 return cnss_pci_call_driver_modem_status(plat_priv->bus_priv, in cnss_bus_call_driver_modem_status()
536 plat_priv->bus_type); in cnss_bus_call_driver_modem_status()
541 int cnss_bus_update_status(struct cnss_plat_data *plat_priv, in cnss_bus_update_status() argument
544 if (!plat_priv) in cnss_bus_update_status()
547 switch (plat_priv->bus_type) { in cnss_bus_update_status()
549 return cnss_pci_update_status(plat_priv->bus_priv, status); in cnss_bus_update_status()
552 plat_priv->bus_type); in cnss_bus_update_status()
557 int cnss_bus_update_uevent(struct cnss_plat_data *plat_priv, in cnss_bus_update_uevent() argument
560 if (!plat_priv) in cnss_bus_update_uevent()
563 switch (plat_priv->bus_type) { in cnss_bus_update_uevent()
565 return cnss_pci_call_driver_uevent(plat_priv->bus_priv, in cnss_bus_update_uevent()
569 plat_priv->bus_type); in cnss_bus_update_uevent()
574 int cnss_bus_is_device_down(struct cnss_plat_data *plat_priv) in cnss_bus_is_device_down() argument
576 if (!plat_priv) in cnss_bus_is_device_down()
579 switch (plat_priv->bus_type) { in cnss_bus_is_device_down()
581 return cnss_pcie_is_device_down(plat_priv->bus_priv); in cnss_bus_is_device_down()
584 plat_priv->bus_type); in cnss_bus_is_device_down()
589 int cnss_bus_shutdown_cleanup(struct cnss_plat_data *plat_priv) in cnss_bus_shutdown_cleanup() argument
591 if (!plat_priv) in cnss_bus_shutdown_cleanup()
594 switch (plat_priv->bus_type) { in cnss_bus_shutdown_cleanup()
596 return cnss_pci_shutdown_cleanup(plat_priv->bus_priv); in cnss_bus_shutdown_cleanup()
599 plat_priv->bus_type); in cnss_bus_shutdown_cleanup()
604 int cnss_bus_check_link_status(struct cnss_plat_data *plat_priv) in cnss_bus_check_link_status() argument
606 if (!plat_priv) in cnss_bus_check_link_status()
609 switch (plat_priv->bus_type) { in cnss_bus_check_link_status()
611 return cnss_pci_check_link_status(plat_priv->bus_priv); in cnss_bus_check_link_status()
614 plat_priv->bus_type); in cnss_bus_check_link_status()
619 int cnss_bus_recover_link_down(struct cnss_plat_data *plat_priv) in cnss_bus_recover_link_down() argument
621 if (!plat_priv) in cnss_bus_recover_link_down()
624 switch (plat_priv->bus_type) { in cnss_bus_recover_link_down()
626 return cnss_pci_recover_link_down(plat_priv->bus_priv); in cnss_bus_recover_link_down()
629 plat_priv->bus_type); in cnss_bus_recover_link_down()
634 int cnss_bus_debug_reg_read(struct cnss_plat_data *plat_priv, u32 offset, in cnss_bus_debug_reg_read() argument
637 if (!plat_priv) in cnss_bus_debug_reg_read()
640 switch (plat_priv->bus_type) { in cnss_bus_debug_reg_read()
642 return cnss_pci_debug_reg_read(plat_priv->bus_priv, offset, in cnss_bus_debug_reg_read()
646 plat_priv->bus_type); in cnss_bus_debug_reg_read()
651 int cnss_bus_debug_reg_write(struct cnss_plat_data *plat_priv, u32 offset, in cnss_bus_debug_reg_write() argument
654 if (!plat_priv) in cnss_bus_debug_reg_write()
657 switch (plat_priv->bus_type) { in cnss_bus_debug_reg_write()
659 return cnss_pci_debug_reg_write(plat_priv->bus_priv, offset, in cnss_bus_debug_reg_write()
663 plat_priv->bus_type); in cnss_bus_debug_reg_write()
668 int cnss_bus_get_iova(struct cnss_plat_data *plat_priv, u64 *addr, u64 *size) in cnss_bus_get_iova() argument
670 if (!plat_priv) in cnss_bus_get_iova()
673 switch (plat_priv->bus_type) { in cnss_bus_get_iova()
675 return cnss_pci_get_iova(plat_priv->bus_priv, addr, size); in cnss_bus_get_iova()
678 plat_priv->bus_type); in cnss_bus_get_iova()
683 int cnss_bus_get_iova_ipa(struct cnss_plat_data *plat_priv, u64 *addr, in cnss_bus_get_iova_ipa() argument
686 if (!plat_priv) in cnss_bus_get_iova_ipa()
689 switch (plat_priv->bus_type) { in cnss_bus_get_iova_ipa()
691 return cnss_pci_get_iova_ipa(plat_priv->bus_priv, addr, size); in cnss_bus_get_iova_ipa()
694 plat_priv->bus_type); in cnss_bus_get_iova_ipa()
699 bool cnss_bus_is_smmu_s1_enabled(struct cnss_plat_data *plat_priv) in cnss_bus_is_smmu_s1_enabled() argument
701 if (!plat_priv) in cnss_bus_is_smmu_s1_enabled()
704 switch (plat_priv->bus_type) { in cnss_bus_is_smmu_s1_enabled()
706 return cnss_pci_is_smmu_s1_enabled(plat_priv->bus_priv); in cnss_bus_is_smmu_s1_enabled()
709 plat_priv->bus_type); in cnss_bus_is_smmu_s1_enabled()
714 int cnss_bus_update_time_sync_period(struct cnss_plat_data *plat_priv, in cnss_bus_update_time_sync_period() argument
717 if (!plat_priv) in cnss_bus_update_time_sync_period()
720 switch (plat_priv->bus_type) { in cnss_bus_update_time_sync_period()
722 return cnss_pci_update_time_sync_period(plat_priv->bus_priv, in cnss_bus_update_time_sync_period()
726 plat_priv->bus_type); in cnss_bus_update_time_sync_period()
731 int cnss_bus_set_therm_cdev_state(struct cnss_plat_data *plat_priv, in cnss_bus_set_therm_cdev_state() argument
735 if (!plat_priv) in cnss_bus_set_therm_cdev_state()
738 switch (plat_priv->bus_type) { in cnss_bus_set_therm_cdev_state()
740 return cnss_pci_set_therm_cdev_state(plat_priv->bus_priv, in cnss_bus_set_therm_cdev_state()
744 cnss_pr_err("Unsupported bus type: %d\n", plat_priv->bus_type); in cnss_bus_set_therm_cdev_state()
749 int cnss_bus_get_msi_assignment(struct cnss_plat_data *plat_priv, in cnss_bus_get_msi_assignment() argument
755 if (!plat_priv) in cnss_bus_get_msi_assignment()
758 switch (plat_priv->bus_type) { in cnss_bus_get_msi_assignment()
760 return cnss_pci_get_user_msi_assignment(plat_priv->bus_priv, in cnss_bus_get_msi_assignment()
766 cnss_pr_err("Unsupported bus type: %d\n", plat_priv->bus_type); in cnss_bus_get_msi_assignment()
772 void cnss_bus_disable_mhi_satellite_cfg(struct cnss_plat_data *plat_priv) in cnss_bus_disable_mhi_satellite_cfg() argument
776 pci_priv = plat_priv->bus_priv; in cnss_bus_disable_mhi_satellite_cfg()
782 switch (plat_priv->bus_type) { in cnss_bus_disable_mhi_satellite_cfg()
787 if (plat_priv->device_id == KIWI_DEVICE_ID && in cnss_bus_disable_mhi_satellite_cfg()
788 plat_priv->device_version.major_version == FW_V2_NUMBER) { in cnss_bus_disable_mhi_satellite_cfg()
795 plat_priv->bus_type); in cnss_bus_disable_mhi_satellite_cfg()