Lines Matching refs:plat_priv
79 #define MHI_TIMEOUT_OVERWRITE_MS (plat_priv->ctrl_params.mhi_timeout)
80 #define MHI_M2_TIMEOUT_MS (plat_priv->ctrl_params.mhi_m2_timeout)
1141 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_select_window() local
1147 if (plat_priv->device_id == QCN7605_DEVICE_ID) in cnss_pci_select_window()
1150 if (plat_priv->device_id == PEACH_DEVICE_ID) { in cnss_pci_select_window()
1165 if (plat_priv->device_id == PEACH_DEVICE_ID) { in cnss_pci_select_window()
1176 !test_bit(CNSS_IN_PANIC, &plat_priv->driver_state)) in cnss_pci_select_window()
1185 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_reg_read() local
1203 if (test_bit(CNSS_IN_PANIC, &plat_priv->driver_state)) { in cnss_pci_reg_read()
1222 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_reg_write() local
1237 if (test_bit(CNSS_IN_PANIC, &plat_priv->driver_state)) { in cnss_pci_reg_write()
1298 static int cnss_setup_bus_bandwidth(struct cnss_plat_data *plat_priv, in cnss_setup_bus_bandwidth() argument
1304 if (!plat_priv->icc.path_count) in cnss_setup_bus_bandwidth()
1307 if (bw >= plat_priv->icc.bus_bw_cfg_count) { in cnss_setup_bus_bandwidth()
1314 list_for_each_entry(bus_bw_info, &plat_priv->icc.list_head, list) { in cnss_setup_bus_bandwidth()
1327 plat_priv->icc.current_bw_vote = bw; in cnss_setup_bus_bandwidth()
1333 struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(dev); in cnss_request_bus_bandwidth() local
1335 if (!plat_priv) in cnss_request_bus_bandwidth()
1341 return cnss_setup_bus_bandwidth(plat_priv, (u32)bandwidth, true); in cnss_request_bus_bandwidth()
1344 static int cnss_setup_bus_bandwidth(struct cnss_plat_data *plat_priv, in cnss_setup_bus_bandwidth() argument
1440 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_set_pci_config_space() local
1443 if (!plat_priv) in cnss_set_pci_config_space()
1447 (test_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state)); in cnss_set_pci_config_space()
1475 struct cnss_plat_data *plat_priv; in cnss_update_supported_link_info() local
1483 plat_priv = pci_priv->plat_priv; in cnss_update_supported_link_info()
1495 &plat_priv->supported_link_speed); in cnss_update_supported_link_info()
1498 plat_priv->supported_link_speed); in cnss_update_supported_link_info()
1500 plat_priv->supported_link_speed = 0; in cnss_update_supported_link_info()
1718 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_handle_linkdown() local
1723 &plat_priv->ctrl_params.quirks)) in cnss_pci_handle_linkdown()
1758 struct cnss_plat_data *plat_priv = NULL; in cnss_pci_link_down() local
1766 plat_priv = pci_priv->plat_priv; in cnss_pci_link_down()
1767 if (!plat_priv) { in cnss_pci_link_down()
1778 of_property_read_bool(plat_priv->plat_dev->dev.of_node, in cnss_pci_link_down()
1780 plat_priv->ctrl_params.quirks |= BIT(LINK_DOWN_SELF_RECOVERY); in cnss_pci_link_down()
1815 struct cnss_plat_data *plat_priv; in cnss_pcie_is_device_down() local
1822 plat_priv = pci_priv->plat_priv; in cnss_pcie_is_device_down()
1823 if (!plat_priv) { in cnss_pcie_is_device_down()
1828 return test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state) | in cnss_pcie_is_device_down()
1870 struct cnss_plat_data *plat_priv = NULL; in cnss_get_pci_slot() local
1877 plat_priv = pci_priv->plat_priv; in cnss_get_pci_slot()
1878 if (!plat_priv) { in cnss_get_pci_slot()
1883 return plat_priv->rc_num; in cnss_get_pci_slot()
2002 struct cnss_plat_data *plat_priv; in cnss_pci_dump_sram() local
2006 plat_priv = pci_priv->plat_priv; in cnss_pci_dump_sram()
2008 if (plat_priv->device_id != QCA6490_DEVICE_ID || in cnss_pci_dump_sram()
2012 if (!plat_priv->sram_dump) { in cnss_pci_dump_sram()
2020 cnss_pr_dbg("Dumping SRAM at 0x%lx\n", plat_priv->sram_dump); in cnss_pci_dump_sram()
2024 dump_ptr = (u32 *)(plat_priv->sram_dump + i); in cnss_pci_dump_sram()
2038 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_handle_mhi_poweron_timeout() local
2043 cnss_get_dev_sol_value(plat_priv) > 0) { in cnss_pci_handle_mhi_poweron_timeout()
2048 if (!test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state) && in cnss_pci_handle_mhi_poweron_timeout()
2353 struct cnss_plat_data *plat_priv; in cnss_pci_config_msi_addr() local
2361 plat_priv = pci_priv->plat_priv; in cnss_pci_config_msi_addr()
2362 if (!plat_priv) { in cnss_pci_config_msi_addr()
2367 ret = of_property_read_u32(plat_priv->plat_dev->dev.of_node, in cnss_pci_config_msi_addr()
2486 struct cnss_plat_data *plat_priv; in cnss_pci_store_qrtr_node_id() local
2493 plat_priv = pci_priv->plat_priv; in cnss_pci_store_qrtr_node_id()
2508 if (plat_priv->device_id == QCA6390_DEVICE_ID && in cnss_pci_store_qrtr_node_id()
2509 plat_priv->qrtr_node_id) { in cnss_pci_store_qrtr_node_id()
2513 plat_priv->qrtr_node_id); in cnss_pci_store_qrtr_node_id()
2515 plat_priv->qrtr_node_id); in cnss_pci_store_qrtr_node_id()
2528 if (val != plat_priv->qrtr_node_id) { in cnss_pci_store_qrtr_node_id()
2552 struct cnss_plat_data *plat_priv; in cnss_pci_start_mhi() local
2561 plat_priv = pci_priv->plat_priv; in cnss_pci_start_mhi()
2562 if (test_bit(FBC_BYPASS, &plat_priv->ctrl_params.quirks)) in cnss_pci_start_mhi()
2623 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_power_off_mhi() local
2625 if (test_bit(FBC_BYPASS, &plat_priv->ctrl_params.quirks)) in cnss_pci_power_off_mhi()
2644 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_deinit_mhi() local
2646 if (test_bit(FBC_BYPASS, &plat_priv->ctrl_params.quirks)) in cnss_pci_deinit_mhi()
2661 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_set_wlaon_pwr_ctrl() local
2665 if (!plat_priv->set_wlaon_pwr_ctrl) in cnss_pci_set_wlaon_pwr_ctrl()
2718 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_get_device_timestamp() local
2722 if (!plat_priv->device_freq_hz) { in cnss_pci_get_device_timestamp()
2741 do_div(device_ticks, plat_priv->device_freq_hz / 100000); in cnss_pci_get_device_timestamp()
2790 (pci_priv->plat_priv->num_shadow_regs_v3 * in cnss_pci_time_sync_reg_update()
2812 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_update_timestamp() local
2830 host_time_us = cnss_get_host_timestamp(plat_priv); in cnss_pci_update_timestamp()
2865 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_time_sync_work_hdlr() local
2867 plat_priv->ctrl_params.time_sync_period; in cnss_pci_time_sync_work_hdlr()
2869 if (test_bit(DISABLE_TIME_SYNC, &plat_priv->ctrl_params.quirks)) { in cnss_pci_time_sync_work_hdlr()
2898 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_start_time_sync_update() local
2911 if (!plat_priv->device_freq_hz) { in cnss_pci_start_time_sync_update()
2959 struct cnss_plat_data *plat_priv; in cnss_pci_update_time_sync_period() local
2964 plat_priv = pci_priv->plat_priv; in cnss_pci_update_time_sync_period()
2967 plat_priv->ctrl_params.time_sync_period = time_sync_period; in cnss_pci_update_time_sync_period()
2970 plat_priv->ctrl_params.time_sync_period); in cnss_pci_update_time_sync_period()
2978 struct cnss_plat_data *plat_priv; in cnss_pci_call_driver_probe() local
2983 plat_priv = pci_priv->plat_priv; in cnss_pci_call_driver_probe()
2984 if (test_bit(CNSS_IN_REBOOT, &plat_priv->driver_state)) { in cnss_pci_call_driver_probe()
2989 if (test_bit(CNSS_DRIVER_DEBUG, &plat_priv->driver_state)) { in cnss_pci_call_driver_probe()
2990 clear_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state); in cnss_pci_call_driver_probe()
3001 if (test_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state) && in cnss_pci_call_driver_probe()
3002 test_bit(CNSS_DRIVER_PROBED, &plat_priv->driver_state)) { in cnss_pci_call_driver_probe()
3010 complete(&plat_priv->recovery_complete); in cnss_pci_call_driver_probe()
3011 } else if (test_bit(CNSS_DRIVER_LOADING, &plat_priv->driver_state)) { in cnss_pci_call_driver_probe()
3017 complete_all(&plat_priv->power_up_complete); in cnss_pci_call_driver_probe()
3020 clear_bit(CNSS_DRIVER_LOADING, &plat_priv->driver_state); in cnss_pci_call_driver_probe()
3021 set_bit(CNSS_DRIVER_PROBED, &plat_priv->driver_state); in cnss_pci_call_driver_probe()
3023 complete_all(&plat_priv->power_up_complete); in cnss_pci_call_driver_probe()
3025 &plat_priv->driver_state)) { in cnss_pci_call_driver_probe()
3031 plat_priv->power_up_error = ret; in cnss_pci_call_driver_probe()
3032 complete_all(&plat_priv->power_up_complete); in cnss_pci_call_driver_probe()
3035 clear_bit(CNSS_DRIVER_IDLE_RESTART, &plat_priv->driver_state); in cnss_pci_call_driver_probe()
3036 complete_all(&plat_priv->power_up_complete); in cnss_pci_call_driver_probe()
3038 complete(&plat_priv->power_up_complete); in cnss_pci_call_driver_probe()
3041 if (test_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state)) { in cnss_pci_call_driver_probe()
3042 clear_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state); in cnss_pci_call_driver_probe()
3043 __pm_relax(plat_priv->recovery_ws); in cnss_pci_call_driver_probe()
3056 struct cnss_plat_data *plat_priv; in cnss_pci_call_driver_remove() local
3062 plat_priv = pci_priv->plat_priv; in cnss_pci_call_driver_remove()
3064 if (test_bit(CNSS_IN_COLD_BOOT_CAL, &plat_priv->driver_state) || in cnss_pci_call_driver_remove()
3065 test_bit(CNSS_FW_BOOT_RECOVERY, &plat_priv->driver_state) || in cnss_pci_call_driver_remove()
3066 test_bit(CNSS_DRIVER_DEBUG, &plat_priv->driver_state)) { in cnss_pci_call_driver_remove()
3078 if (test_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state) && in cnss_pci_call_driver_remove()
3079 test_bit(CNSS_DRIVER_PROBED, &plat_priv->driver_state)) { in cnss_pci_call_driver_remove()
3080 complete(&plat_priv->rddm_complete); in cnss_pci_call_driver_remove()
3082 } else if (test_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state)) { in cnss_pci_call_driver_remove()
3084 clear_bit(CNSS_DRIVER_PROBED, &plat_priv->driver_state); in cnss_pci_call_driver_remove()
3086 &plat_priv->driver_state)) { in cnss_pci_call_driver_remove()
3090 &plat_priv->driver_state); in cnss_pci_call_driver_remove()
3095 plat_priv->get_info_cb_ctx = NULL; in cnss_pci_call_driver_remove()
3096 plat_priv->get_info_cb = NULL; in cnss_pci_call_driver_remove()
3097 plat_priv->get_driver_async_data_ctx = NULL; in cnss_pci_call_driver_remove()
3098 plat_priv->get_driver_async_data_cb = NULL; in cnss_pci_call_driver_remove()
3144 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_misc_reg_dump() local
3159 if (!test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state)) in cnss_pci_misc_reg_dump()
3266 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_qca6174_powerup() local
3268 ret = cnss_power_on_device(plat_priv, false); in cnss_qca6174_powerup()
3288 cnss_power_off_device(plat_priv); in cnss_qca6174_powerup()
3296 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_qca6174_shutdown() local
3304 cnss_request_bus_bandwidth(&plat_priv->plat_dev->dev, in cnss_qca6174_shutdown()
3313 cnss_power_off_device(plat_priv); in cnss_qca6174_shutdown()
3315 clear_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state); in cnss_qca6174_shutdown()
3316 clear_bit(CNSS_DRIVER_IDLE_SHUTDOWN, &plat_priv->driver_state); in cnss_qca6174_shutdown()
3330 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_qca6174_ramdump() local
3333 ramdump_info = &plat_priv->ramdump_info; in cnss_qca6174_ramdump()
3337 return cnss_do_ramdump(plat_priv); in cnss_qca6174_ramdump()
3343 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_qca6290_powerup() local
3345 int retry = 0, bt_en_gpio = plat_priv->pinctrl_info.bt_en_gpio; in cnss_qca6290_powerup()
3346 int sw_ctrl_gpio = plat_priv->pinctrl_info.sw_ctrl_gpio; in cnss_qca6290_powerup()
3348 if (plat_priv->ramdump_info_v2.dump_data_valid) { in cnss_qca6290_powerup()
3353 cnss_power_off_device(plat_priv); in cnss_qca6290_powerup()
3359 plat_priv->power_up_error = 0; in cnss_qca6290_powerup()
3361 ret = cnss_power_on_device(plat_priv, false); in cnss_qca6290_powerup()
3371 cnss_get_input_gpio_value(plat_priv, sw_ctrl_gpio)); in cnss_qca6290_powerup()
3373 &plat_priv->ctrl_params.quirks)) { in cnss_qca6290_powerup()
3379 cnss_power_off_device(plat_priv); in cnss_qca6290_powerup()
3391 cnss_get_input_gpio_value(plat_priv, in cnss_qca6290_powerup()
3402 timeout = cnss_get_timeout(plat_priv, CNSS_TIMEOUT_QMI); in cnss_qca6290_powerup()
3407 if (!test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state) && in cnss_qca6290_powerup()
3416 if (test_bit(USE_CORE_ONLY_FW, &plat_priv->ctrl_params.quirks)) { in cnss_qca6290_powerup()
3417 clear_bit(CNSS_FW_BOOT_RECOVERY, &plat_priv->driver_state); in cnss_qca6290_powerup()
3418 clear_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state); in cnss_qca6290_powerup()
3422 cnss_set_pin_connect_status(plat_priv); in cnss_qca6290_powerup()
3424 if (test_bit(QMI_BYPASS, &plat_priv->ctrl_params.quirks)) { in cnss_qca6290_powerup()
3429 if (test_bit(CNSS_IN_COLD_BOOT_CAL, &plat_priv->driver_state)) in cnss_qca6290_powerup()
3433 mod_timer(&plat_priv->fw_boot_timer, in cnss_qca6290_powerup()
3445 cnss_power_off_device(plat_priv); in cnss_qca6290_powerup()
3453 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_qca6290_shutdown() local
3462 cnss_request_bus_bandwidth(&plat_priv->plat_dev->dev, in cnss_qca6290_shutdown()
3467 if ((test_bit(CNSS_DRIVER_LOADING, &plat_priv->driver_state) || in cnss_qca6290_shutdown()
3468 test_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state) || in cnss_qca6290_shutdown()
3469 test_bit(CNSS_DRIVER_IDLE_RESTART, &plat_priv->driver_state) || in cnss_qca6290_shutdown()
3470 test_bit(CNSS_DRIVER_IDLE_SHUTDOWN, &plat_priv->driver_state) || in cnss_qca6290_shutdown()
3471 test_bit(CNSS_IN_COLD_BOOT_CAL, &plat_priv->driver_state)) && in cnss_qca6290_shutdown()
3472 test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state)) { in cnss_qca6290_shutdown()
3476 if (!plat_priv->recovery_enabled) in cnss_qca6290_shutdown()
3480 if (!cnss_is_device_powered_on(plat_priv)) { in cnss_qca6290_shutdown()
3485 if (test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state)) in cnss_qca6290_shutdown()
3492 if (plat_priv->ramdump_info_v2.dump_data_valid) in cnss_qca6290_shutdown()
3500 cnss_power_off_device(plat_priv); in cnss_qca6290_shutdown()
3505 clear_bit(CNSS_FW_READY, &plat_priv->driver_state); in cnss_qca6290_shutdown()
3506 clear_bit(CNSS_FW_MEM_READY, &plat_priv->driver_state); in cnss_qca6290_shutdown()
3507 if (test_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state) || in cnss_qca6290_shutdown()
3508 test_bit(CNSS_DRIVER_IDLE_SHUTDOWN, &plat_priv->driver_state)) { in cnss_qca6290_shutdown()
3509 clear_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state); in cnss_qca6290_shutdown()
3512 clear_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state); in cnss_qca6290_shutdown()
3513 clear_bit(CNSS_DRIVER_IDLE_SHUTDOWN, &plat_priv->driver_state); in cnss_qca6290_shutdown()
3522 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_qca6290_crash_shutdown() local
3524 set_bit(CNSS_IN_PANIC, &plat_priv->driver_state); in cnss_qca6290_crash_shutdown()
3526 plat_priv->driver_state); in cnss_qca6290_crash_shutdown()
3529 clear_bit(CNSS_IN_PANIC, &plat_priv->driver_state); in cnss_qca6290_crash_shutdown()
3534 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_qca6290_ramdump() local
3535 struct cnss_ramdump_info_v2 *info_v2 = &plat_priv->ramdump_info_v2; in cnss_qca6290_ramdump()
3544 ret = cnss_do_elf_ramdump(plat_priv); in cnss_qca6290_ramdump()
3550 cnss_power_off_device(plat_priv); in cnss_qca6290_ramdump()
3692 struct cnss_plat_data *plat_priv = in cnss_wlan_reg_driver_work() local
3694 struct cnss_pci_data *pci_priv = plat_priv->bus_priv; in cnss_wlan_reg_driver_work()
3698 if (test_bit(CNSS_WLAN_HW_DISABLED, &plat_priv->driver_state)) in cnss_wlan_reg_driver_work()
3701 if (test_bit(CNSS_COLD_BOOT_CAL_DONE, &plat_priv->driver_state)) { in cnss_wlan_reg_driver_work()
3704 if (plat_priv->charger_mode) { in cnss_wlan_reg_driver_work()
3709 &plat_priv->driver_state)) { in cnss_wlan_reg_driver_work()
3710 timeout = cnss_get_timeout(plat_priv, in cnss_wlan_reg_driver_work()
3714 schedule_delayed_work(&plat_priv->wlan_reg_driver_work, in cnss_wlan_reg_driver_work()
3719 del_timer(&plat_priv->fw_boot_timer); in cnss_wlan_reg_driver_work()
3720 if (test_bit(CNSS_IN_COLD_BOOT_CAL, &plat_priv->driver_state) && in cnss_wlan_reg_driver_work()
3721 !test_bit(CNSS_IN_REBOOT, &plat_priv->driver_state)) { in cnss_wlan_reg_driver_work()
3729 cnss_driver_event_post(plat_priv, in cnss_wlan_reg_driver_work()
3734 if (test_bit(CNSS_IN_REBOOT, &plat_priv->driver_state)) { in cnss_wlan_reg_driver_work()
3738 reinit_completion(&plat_priv->power_up_complete); in cnss_wlan_reg_driver_work()
3739 cnss_driver_event_post(plat_priv, in cnss_wlan_reg_driver_work()
3748 struct cnss_plat_data *plat_priv; in cnss_wlan_register_driver() local
3758 plat_priv = cnss_get_plat_priv_by_driver_ops(driver_ops); in cnss_wlan_register_driver()
3760 if (!plat_priv) { in cnss_wlan_register_driver()
3765 pci_priv = plat_priv->bus_priv; in cnss_wlan_register_driver()
3766 if (test_bit(CNSS_WLAN_HW_DISABLED, &plat_priv->driver_state)) { in cnss_wlan_register_driver()
3768 if (plat_priv->device_id == id_table->device) { in cnss_wlan_register_driver()
3769 if (plat_priv->device_id == KIWI_DEVICE_ID && in cnss_wlan_register_driver()
3776 plat_priv->driver_ops = driver_ops; in cnss_wlan_register_driver()
3784 if (!test_bit(CNSS_PCI_PROBE_DONE, &plat_priv->driver_state)) { in cnss_wlan_register_driver()
3789 if (test_bit(CNSS_DRIVER_REGISTERED, &plat_priv->driver_state)) { in cnss_wlan_register_driver()
3794 if (test_bit(CNSS_IN_REBOOT, &plat_priv->driver_state)) { in cnss_wlan_register_driver()
3815 driver_ops->chip_version != plat_priv->device_version.major_version) { in cnss_wlan_register_driver()
3818 plat_priv->device_version.major_version); in cnss_wlan_register_driver()
3821 set_bit(CNSS_DRIVER_REGISTER, &plat_priv->driver_state); in cnss_wlan_register_driver()
3823 if (!plat_priv->cbc_enabled || in cnss_wlan_register_driver()
3824 test_bit(CNSS_COLD_BOOT_CAL_DONE, &plat_priv->driver_state)) in cnss_wlan_register_driver()
3833 timeout = cnss_get_timeout(plat_priv, CNSS_TIMEOUT_CALIBRATION); in cnss_wlan_register_driver()
3834 INIT_DELAYED_WORK(&plat_priv->wlan_reg_driver_work, in cnss_wlan_register_driver()
3836 schedule_delayed_work(&plat_priv->wlan_reg_driver_work, in cnss_wlan_register_driver()
3841 reinit_completion(&plat_priv->power_up_complete); in cnss_wlan_register_driver()
3842 ret = cnss_driver_event_post(plat_priv, in cnss_wlan_register_driver()
3853 struct cnss_plat_data *plat_priv; in cnss_wlan_unregister_driver() local
3857 plat_priv = cnss_get_plat_priv_by_driver_ops(driver_ops); in cnss_wlan_unregister_driver()
3858 if (!plat_priv) { in cnss_wlan_unregister_driver()
3863 mutex_lock(&plat_priv->driver_ops_lock); in cnss_wlan_unregister_driver()
3865 if (plat_priv->device_id == QCA6174_DEVICE_ID) in cnss_wlan_unregister_driver()
3868 timeout = cnss_get_timeout(plat_priv, CNSS_TIMEOUT_WLAN_WATCHDOG); in cnss_wlan_unregister_driver()
3869 ret = wait_for_completion_timeout(&plat_priv->power_up_complete, in cnss_wlan_unregister_driver()
3878 if (!test_bit(CNSS_DRIVER_RECOVERY, &plat_priv->driver_state) && in cnss_wlan_unregister_driver()
3879 !test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state)) in cnss_wlan_unregister_driver()
3882 reinit_completion(&plat_priv->recovery_complete); in cnss_wlan_unregister_driver()
3883 timeout = cnss_get_timeout(plat_priv, CNSS_TIMEOUT_RECOVERY); in cnss_wlan_unregister_driver()
3884 ret = wait_for_completion_timeout(&plat_priv->recovery_complete, in cnss_wlan_unregister_driver()
3893 cnss_driver_event_post(plat_priv, in cnss_wlan_unregister_driver()
3897 mutex_unlock(&plat_priv->driver_ops_lock); in cnss_wlan_unregister_driver()
3905 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_register_driver_hdlr() local
3907 if (test_bit(CNSS_IN_REBOOT, &plat_priv->driver_state)) { in cnss_pci_register_driver_hdlr()
3912 set_bit(CNSS_DRIVER_LOADING, &plat_priv->driver_state); in cnss_pci_register_driver_hdlr()
3917 clear_bit(CNSS_DRIVER_LOADING, &plat_priv->driver_state); in cnss_pci_register_driver_hdlr()
3920 set_bit(CNSS_DRIVER_REGISTERED, &plat_priv->driver_state); in cnss_pci_register_driver_hdlr()
3928 struct cnss_plat_data *plat_priv; in cnss_pci_unregister_driver_hdlr() local
3933 plat_priv = pci_priv->plat_priv; in cnss_pci_unregister_driver_hdlr()
3934 set_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state); in cnss_pci_unregister_driver_hdlr()
3937 clear_bit(CNSS_DRIVER_REGISTERED, &plat_priv->driver_state); in cnss_pci_unregister_driver_hdlr()
3947 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_suspend_driver() local
3951 if (test_bit(CNSS_DRIVER_REGISTERED, &plat_priv->driver_state) && in cnss_pci_suspend_driver()
3969 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_resume_driver() local
3971 if (test_bit(CNSS_DRIVER_REGISTERED, &plat_priv->driver_state) && in cnss_pci_resume_driver()
4071 struct cnss_plat_data *plat_priv; in cnss_pci_suspend() local
4076 plat_priv = pci_priv->plat_priv; in cnss_pci_suspend()
4077 if (!plat_priv) in cnss_pci_suspend()
4080 if (!cnss_is_device_powered_on(plat_priv)) in cnss_pci_suspend()
4097 cnss_power_off_device(plat_priv); in cnss_pci_suspend()
4102 if (!test_bit(DISABLE_DRV, &plat_priv->ctrl_params.quirks) && in cnss_pci_suspend()
4113 set_bit(CNSS_IN_SUSPEND_RESUME, &plat_priv->driver_state); in cnss_pci_suspend()
4135 clear_bit(CNSS_IN_SUSPEND_RESUME, &plat_priv->driver_state); in cnss_pci_suspend()
4145 struct cnss_plat_data *plat_priv; in cnss_pci_resume() local
4150 plat_priv = pci_priv->plat_priv; in cnss_pci_resume()
4151 if (!plat_priv) in cnss_pci_resume()
4157 if (!cnss_is_device_powered_on(pci_priv->plat_priv)) in cnss_pci_resume()
4171 clear_bit(CNSS_IN_SUSPEND_RESUME, &plat_priv->driver_state); in cnss_pci_resume()
4183 struct cnss_plat_data *plat_priv; in cnss_pci_suspend_noirq() local
4188 if (!cnss_is_device_powered_on(pci_priv->plat_priv)) in cnss_pci_suspend_noirq()
4192 plat_priv = pci_priv->plat_priv; in cnss_pci_suspend_noirq()
4193 if (test_bit(CNSS_DRIVER_REGISTERED, &plat_priv->driver_state) && in cnss_pci_suspend_noirq()
4198 !pci_priv->plat_priv->use_pm_domain) in cnss_pci_suspend_noirq()
4211 struct cnss_plat_data *plat_priv; in cnss_pci_resume_noirq() local
4216 if (!cnss_is_device_powered_on(pci_priv->plat_priv)) in cnss_pci_resume_noirq()
4219 plat_priv = pci_priv->plat_priv; in cnss_pci_resume_noirq()
4221 if (test_bit(CNSS_DRIVER_REGISTERED, &plat_priv->driver_state) && in cnss_pci_resume_noirq()
4235 struct cnss_plat_data *plat_priv; in cnss_pci_runtime_suspend() local
4241 plat_priv = pci_priv->plat_priv; in cnss_pci_runtime_suspend()
4242 if (!plat_priv) in cnss_pci_runtime_suspend()
4245 if (!cnss_is_device_powered_on(pci_priv->plat_priv)) in cnss_pci_runtime_suspend()
4253 if (!test_bit(DISABLE_DRV, &plat_priv->ctrl_params.quirks) && in cnss_pci_runtime_suspend()
4290 if (!cnss_is_device_powered_on(pci_priv->plat_priv)) in cnss_pci_runtime_resume()
4350 cnss_get_host_timestamp(pci_priv->plat_priv); in cnss_pci_pm_runtime_get_record()
4362 cnss_get_host_timestamp(pci_priv->plat_priv); in cnss_pci_pm_runtime_put_record()
4518 struct cnss_plat_data *plat_priv; in cnss_auto_suspend() local
4523 plat_priv = pci_priv->plat_priv; in cnss_auto_suspend()
4524 if (!plat_priv) in cnss_auto_suspend()
4545 cnss_setup_bus_bandwidth(plat_priv, CNSS_BUS_WIDTH_NONE, false); in cnss_auto_suspend()
4555 struct cnss_plat_data *plat_priv; in cnss_auto_resume() local
4560 plat_priv = pci_priv->plat_priv; in cnss_auto_resume()
4561 if (!plat_priv) in cnss_auto_resume()
4574 cnss_request_bus_bandwidth(dev, plat_priv->icc.current_bw_vote); in cnss_auto_resume()
4585 struct cnss_plat_data *plat_priv; in cnss_pci_force_wake_request_sync() local
4606 plat_priv = pci_priv->plat_priv; in cnss_pci_force_wake_request_sync()
4607 if (!plat_priv) in cnss_pci_force_wake_request_sync()
4610 if (test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state)) in cnss_pci_force_wake_request_sync()
4628 struct cnss_plat_data *plat_priv; in cnss_pci_force_wake_request() local
4649 plat_priv = pci_priv->plat_priv; in cnss_pci_force_wake_request()
4650 if (!plat_priv) in cnss_pci_force_wake_request()
4653 if (test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state)) in cnss_pci_force_wake_request()
4694 struct cnss_plat_data *plat_priv; in cnss_pci_force_wake_release() local
4715 plat_priv = pci_priv->plat_priv; in cnss_pci_force_wake_release()
4716 if (!plat_priv) in cnss_pci_force_wake_release()
4719 if (test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state)) in cnss_pci_force_wake_release()
4771 struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(dev); in cnss_send_buffer_to_afcmem() local
4777 if (!plat_priv) in cnss_send_buffer_to_afcmem()
4780 fw_mem = plat_priv->fw_mem; in cnss_send_buffer_to_afcmem()
4792 for (i = 0; i < plat_priv->fw_mem_seg_len; i++) { in cnss_send_buffer_to_afcmem()
4820 struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(dev); in cnss_reset_afcmem() local
4825 if (!plat_priv) in cnss_reset_afcmem()
4828 fw_mem = plat_priv->fw_mem; in cnss_reset_afcmem()
4835 for (i = 0; i < plat_priv->fw_mem_seg_len; i++) { in cnss_reset_afcmem()
4858 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_alloc_fw_mem() local
4859 struct cnss_fw_mem *fw_mem = plat_priv->fw_mem; in cnss_pci_alloc_fw_mem()
4863 for (i = 0; i < plat_priv->fw_mem_seg_len; i++) { in cnss_pci_alloc_fw_mem()
4894 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_free_fw_mem() local
4895 struct cnss_fw_mem *fw_mem = plat_priv->fw_mem; in cnss_pci_free_fw_mem()
4899 for (i = 0; i < plat_priv->fw_mem_seg_len; i++) { in cnss_pci_free_fw_mem()
4914 plat_priv->fw_mem_seg_len = 0; in cnss_pci_free_fw_mem()
4919 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_alloc_qdss_mem() local
4920 struct cnss_fw_mem *qdss_mem = plat_priv->qdss_mem; in cnss_pci_alloc_qdss_mem()
4923 for (i = 0; i < plat_priv->qdss_mem_seg_len; i++) { in cnss_pci_alloc_qdss_mem()
4940 if (i < plat_priv->qdss_mem_seg_len) { in cnss_pci_alloc_qdss_mem()
4941 for (j = i; j < plat_priv->qdss_mem_seg_len; j++) { in cnss_pci_alloc_qdss_mem()
4945 plat_priv->qdss_mem_seg_len = i; in cnss_pci_alloc_qdss_mem()
4953 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_free_qdss_mem() local
4954 struct cnss_fw_mem *qdss_mem = plat_priv->qdss_mem; in cnss_pci_free_qdss_mem()
4957 for (i = 0; i < plat_priv->qdss_mem_seg_len; i++) { in cnss_pci_free_qdss_mem()
4971 plat_priv->qdss_mem_seg_len = 0; in cnss_pci_free_qdss_mem()
4976 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_load_tme_patch() local
4977 struct cnss_fw_mem *tme_lite_mem = &plat_priv->tme_lite_mem; in cnss_pci_load_tme_patch()
4985 if (plat_priv->device_version.major_version == FW_V1_NUMBER) in cnss_pci_load_tme_patch()
4987 else if (plat_priv->device_version.major_version == FW_V2_NUMBER) in cnss_pci_load_tme_patch()
5033 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_free_tme_lite_mem() local
5034 struct cnss_fw_mem *tme_lite_mem = &plat_priv->tme_lite_mem; in cnss_pci_free_tme_lite_mem()
5051 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_load_tme_opt_file() local
5062 tme_lite_mem = &plat_priv->tme_opt_file_mem[0]; in cnss_pci_load_tme_opt_file()
5065 tme_lite_mem = &plat_priv->tme_opt_file_mem[1]; in cnss_pci_load_tme_opt_file()
5068 tme_lite_mem = &plat_priv->tme_opt_file_mem[2]; in cnss_pci_load_tme_opt_file()
5118 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_free_tme_opt_file_mem() local
5119 struct cnss_fw_mem *tme_opt_file_mem = plat_priv->tme_opt_file_mem; in cnss_pci_free_tme_opt_file_mem()
5138 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_load_m3() local
5139 struct cnss_fw_mem *m3_mem = &plat_priv->m3_mem; in cnss_pci_load_m3()
5161 switch (plat_priv->device_version.major_version) { in cnss_pci_load_m3()
5204 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_free_m3_mem() local
5205 struct cnss_fw_mem *m3_mem = &plat_priv->m3_mem; in cnss_pci_free_m3_mem()
5232 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_load_aux() local
5233 struct cnss_fw_mem *aux_mem = &plat_priv->aux_mem; in cnss_pci_load_aux()
5270 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_free_aux_mem() local
5271 struct cnss_fw_mem *aux_mem = &plat_priv->aux_mem; in cnss_pci_free_aux_mem()
5287 struct cnss_plat_data *plat_priv; in cnss_pci_fw_boot_timeout_hdlr() local
5294 plat_priv = pci_priv->plat_priv; in cnss_pci_fw_boot_timeout_hdlr()
5295 if (!plat_priv) in cnss_pci_fw_boot_timeout_hdlr()
5298 if (test_bit(CNSS_IN_COLD_BOOT_CAL, &plat_priv->driver_state)) { in cnss_pci_fw_boot_timeout_hdlr()
5362 struct cnss_plat_data *plat_priv; in cnss_smmu_map() local
5380 plat_priv = pci_priv->plat_priv; in cnss_smmu_map()
5396 &plat_priv->ctrl_params.quirks)) { in cnss_smmu_map()
5470 struct cnss_plat_data *plat_priv; in cnss_get_soc_info() local
5475 plat_priv = pci_priv->plat_priv; in cnss_get_soc_info()
5476 if (!plat_priv) in cnss_get_soc_info()
5481 info->chip_id = plat_priv->chip_info.chip_id; in cnss_get_soc_info()
5482 info->chip_family = plat_priv->chip_info.chip_family; in cnss_get_soc_info()
5483 info->board_id = plat_priv->board_info.board_id; in cnss_get_soc_info()
5484 info->soc_id = plat_priv->soc_info.soc_id; in cnss_get_soc_info()
5485 info->fw_version = plat_priv->fw_version_info.fw_version; in cnss_get_soc_info()
5487 plat_priv->fw_version_info.fw_build_timestamp, in cnss_get_soc_info()
5489 memcpy(&info->device_version, &plat_priv->device_version, in cnss_get_soc_info()
5491 memcpy(&info->dev_mem_info, &plat_priv->dev_mem_info, in cnss_get_soc_info()
5493 memcpy(&info->fw_build_id, &plat_priv->fw_build_id, in cnss_get_soc_info()
5873 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_dump_qdss_reg() local
5881 if (!plat_priv->qdss_reg) { in cnss_pci_dump_qdss_reg()
5882 plat_priv->qdss_reg = devm_kzalloc(&pci_priv->pci_dev->dev, in cnss_pci_dump_qdss_reg()
5883 sizeof(*plat_priv->qdss_reg) in cnss_pci_dump_qdss_reg()
5885 if (!plat_priv->qdss_reg) in cnss_pci_dump_qdss_reg()
5894 &plat_priv->qdss_reg[i])) in cnss_pci_dump_qdss_reg()
5897 plat_priv->qdss_reg[i]); in cnss_pci_dump_qdss_reg()
5975 ret = cnss_get_host_sol_value(pci_priv->plat_priv); in cnss_pci_assert_host_sol()
5993 cnss_set_host_sol_value(pci_priv->plat_priv, 1); in cnss_pci_assert_host_sol()
6077 struct cnss_plat_data *plat_priv; in cnss_pci_force_fw_assert_hdlr() local
6082 plat_priv = pci_priv->plat_priv; in cnss_pci_force_fw_assert_hdlr()
6083 if (!plat_priv) in cnss_pci_force_fw_assert_hdlr()
6158 if (!test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state)) { in cnss_pci_force_fw_assert_hdlr()
6174 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_add_dump_seg() local
6189 cnss_minidump_add_region(plat_priv, type, seg_no, va, pa, size); in cnss_pci_add_dump_seg()
6197 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_remove_dump_seg() local
6202 cnss_minidump_remove_region(plat_priv, type, seg_no, va, pa, size); in cnss_pci_remove_dump_seg()
6227 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_send_hang_event() local
6228 struct cnss_fw_mem *fw_mem = plat_priv->fw_mem; in cnss_pci_send_hang_event()
6235 if (!fw_mem || !plat_priv->fw_mem_seg_len) in cnss_pci_send_hang_event()
6249 if (plat_priv->hang_event_data_len) { in cnss_pci_send_hang_event()
6250 offset = plat_priv->hang_data_addr_offset; in cnss_pci_send_hang_event()
6251 length = plat_priv->hang_event_data_len; in cnss_pci_send_hang_event()
6260 offset = plat_priv->hang_data_addr_offset; in cnss_pci_send_hang_event()
6261 length = plat_priv->hang_event_data_len; in cnss_pci_send_hang_event()
6273 for (i = 0; i < plat_priv->fw_mem_seg_len; i++) { in cnss_pci_send_hang_event()
6300 plat_priv->hang_data_addr_offset, in cnss_pci_send_hang_event()
6301 plat_priv->hang_event_data_len); in cnss_pci_send_hang_event()
6308 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_collect_host_dump_info() local
6334 cnss_do_host_ramdump(plat_priv, ssr_entry, num_entries_loaded); in cnss_pci_collect_host_dump_info()
6345 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_collect_dump_info() local
6347 &plat_priv->ramdump_info_v2.dump_data; in cnss_pci_collect_dump_info()
6349 plat_priv->ramdump_info_v2.dump_data_vaddr; in cnss_pci_collect_dump_info()
6351 struct cnss_fw_mem *fw_mem = plat_priv->fw_mem; in cnss_pci_collect_dump_info()
6354 if (test_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state) && in cnss_pci_collect_dump_info()
6355 !test_bit(CNSS_IN_PANIC, &plat_priv->driver_state)) in cnss_pci_collect_dump_info()
6363 if (!cnss_is_device_powered_on(plat_priv)) { in cnss_pci_collect_dump_info()
6411 if (plat_priv->qdss_mem_seg_len) in cnss_pci_collect_dump_info()
6446 for (i = 0, j = 0; i < plat_priv->fw_mem_seg_len; i++) { in cnss_pci_collect_dump_info()
6475 plat_priv->ramdump_info_v2.dump_data_valid = true; in cnss_pci_collect_dump_info()
6480 complete(&plat_priv->rddm_complete); in cnss_pci_collect_dump_info()
6485 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_clear_dump_info() local
6487 plat_priv->ramdump_info_v2.dump_data_vaddr; in cnss_pci_clear_dump_info()
6489 struct cnss_fw_mem *fw_mem = plat_priv->fw_mem; in cnss_pci_clear_dump_info()
6514 for (i = 0, j = 0; i < plat_priv->fw_mem_seg_len; i++) { in cnss_pci_clear_dump_info()
6533 plat_priv->ramdump_info_v2.dump_data.nentries = 0; in cnss_pci_clear_dump_info()
6534 plat_priv->ramdump_info_v2.dump_data_valid = false; in cnss_pci_clear_dump_info()
6539 struct cnss_plat_data *plat_priv; in cnss_pci_device_crashed() local
6546 plat_priv = pci_priv->plat_priv; in cnss_pci_device_crashed()
6547 if (!plat_priv) { in cnss_pci_device_crashed()
6552 if (plat_priv->recovery_enabled) in cnss_pci_device_crashed()
6560 cnss_recovery_handler(plat_priv); in cnss_pci_device_crashed()
6580 struct cnss_plat_data *plat_priv; in cnss_pci_add_fw_prefix_name() local
6585 plat_priv = pci_priv->plat_priv; in cnss_pci_add_fw_prefix_name()
6587 if (!plat_priv->use_fw_path_with_prefix) { in cnss_pci_add_fw_prefix_name()
6627 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_update_fw_name() local
6631 if (plat_priv->device_version.major_version < FW_V2_NUMBER) { in cnss_pci_update_fw_name()
6634 plat_priv->device_version.major_version); in cnss_pci_update_fw_name()
6637 cnss_pci_add_fw_prefix_name(pci_priv, plat_priv->firmware_name, in cnss_pci_update_fw_name()
6639 snprintf(plat_priv->fw_fallback_name, MAX_FIRMWARE_NAME_LEN, in cnss_pci_update_fw_name()
6646 switch (plat_priv->device_version.major_version) { in cnss_pci_update_fw_name()
6649 plat_priv->firmware_name, in cnss_pci_update_fw_name()
6651 snprintf(plat_priv->fw_fallback_name, in cnss_pci_update_fw_name()
6657 plat_priv->firmware_name, in cnss_pci_update_fw_name()
6659 snprintf(plat_priv->fw_fallback_name, in cnss_pci_update_fw_name()
6666 cnss_pci_add_fw_prefix_name(pci_priv, plat_priv->firmware_name, in cnss_pci_update_fw_name()
6668 snprintf(plat_priv->fw_fallback_name, MAX_FIRMWARE_NAME_LEN, in cnss_pci_update_fw_name()
6674 plat_priv->firmware_name, plat_priv->fw_fallback_name); in cnss_pci_update_fw_name()
6765 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_handle_mhi_sys_err() local
6768 set_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state); in cnss_pci_handle_mhi_sys_err()
6769 del_timer(&plat_priv->fw_boot_timer); in cnss_pci_handle_mhi_sys_err()
6787 struct cnss_plat_data *plat_priv; in cnss_mhi_notify_status() local
6795 plat_priv = pci_priv->plat_priv; in cnss_mhi_notify_status()
6807 set_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state); in cnss_mhi_notify_status()
6808 del_timer(&plat_priv->fw_boot_timer); in cnss_mhi_notify_status()
6817 set_bit(CNSS_DEV_ERR_NOTIFY, &plat_priv->driver_state); in cnss_mhi_notify_status()
6818 del_timer(&plat_priv->fw_boot_timer); in cnss_mhi_notify_status()
6826 plat_priv->use_fw_path_with_prefix = false; in cnss_mhi_notify_status()
6881 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_mhi_bw_scale() local
6893 ret = cnss_pci_set_max_link_speed(pci_priv, plat_priv->rc_num, in cnss_mhi_bw_scale()
6982 static int cnss_get_mhi_soc_info(struct cnss_plat_data *plat_priv, in cnss_get_mhi_soc_info() argument
6993 plat_priv->device_version.family_number = mhi_ctrl->family_number; in cnss_get_mhi_soc_info()
6994 plat_priv->device_version.device_number = mhi_ctrl->device_number; in cnss_get_mhi_soc_info()
6995 plat_priv->device_version.major_version = mhi_ctrl->major_version; in cnss_get_mhi_soc_info()
6996 plat_priv->device_version.minor_version = mhi_ctrl->minor_version; in cnss_get_mhi_soc_info()
6999 plat_priv->device_version.family_number, in cnss_get_mhi_soc_info()
7000 plat_priv->device_version.device_number, in cnss_get_mhi_soc_info()
7001 plat_priv->device_version.major_version, in cnss_get_mhi_soc_info()
7002 plat_priv->device_version.minor_version); in cnss_get_mhi_soc_info()
7005 plat_priv->device_version.major_version &= DEVICE_MAJOR_VERSION_MASK; in cnss_get_mhi_soc_info()
7029 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_register_mhi() local
7036 ret = cnss_qmi_init(plat_priv); in cnss_pci_register_mhi()
7052 mhi_ctrl->fw_image = plat_priv->firmware_name; in cnss_pci_register_mhi()
7055 mhi_ctrl->fallback_fw_image = plat_priv->fw_fallback_name; in cnss_pci_register_mhi()
7088 mhi_ctrl->rddm_size = pci_priv->plat_priv->ramdump_info_v2.ramdump_size; in cnss_pci_register_mhi()
7092 if (plat_priv->device_id == QCN7605_DEVICE_ID) in cnss_pci_register_mhi()
7100 ret = cnss_get_mhi_soc_info(plat_priv, mhi_ctrl); in cnss_pci_register_mhi()
7105 if (plat_priv->device_id <= QCA6490_DEVICE_ID || in cnss_pci_register_mhi()
7106 (plat_priv->device_id == KIWI_DEVICE_ID && in cnss_pci_register_mhi()
7107 plat_priv->device_version.major_version == 1)) { in cnss_pci_register_mhi()
7108 if (plat_priv->device_id == QCN7605_DEVICE_ID) in cnss_pci_register_mhi()
7115 if (plat_priv->device_id >= PEACH_DEVICE_ID) { in cnss_pci_register_mhi()
7131 cnss_get_bwscal_info(plat_priv); in cnss_pci_register_mhi()
7132 cnss_pr_dbg("no_bwscale: %d\n", plat_priv->no_bwscale); in cnss_pci_register_mhi()
7135 if (!plat_priv->no_bwscale) in cnss_pci_register_mhi()
7206 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_wake_handler() local
7215 cnss_pm_stay_awake(plat_priv); in cnss_pci_wake_handler()
7216 cnss_pm_relax(plat_priv); in cnss_pci_wake_handler()
7249 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_wake_gpio_init() local
7250 struct device *dev = &plat_priv->plat_dev->dev; in cnss_pci_wake_gpio_init()
7306 static int cnss_try_suspend(struct cnss_plat_data *plat_priv) in cnss_try_suspend() argument
7324 plat_priv->enumerate_done = true; in cnss_try_suspend()
7327 if (plat_priv->bus_priv) { in cnss_try_suspend()
7328 struct cnss_pci_data *pci_priv = plat_priv->bus_priv; in cnss_try_suspend()
7350 static int cnss_try_suspend(struct cnss_plat_data *plat_priv) in cnss_try_suspend() argument
7372 static int cnss_pci_get_dev_cfg_node(struct cnss_plat_data *plat_priv) in cnss_pci_get_dev_cfg_node() argument
7378 if (plat_priv->dt_type != CNSS_DTT_MULTIEXCHG) in cnss_pci_get_dev_cfg_node()
7381 if (!plat_priv->device_id) { in cnss_pci_get_dev_cfg_node()
7386 for_each_available_child_of_node(plat_priv->plat_dev->dev.of_node, in cnss_pci_get_dev_cfg_node()
7406 if (id == plat_priv->device_id) { in cnss_pci_get_dev_cfg_node()
7407 plat_priv->dev_node = child; in cnss_pci_get_dev_cfg_node()
7443 cnss_pci_downgrade_rc_speed(struct cnss_plat_data *plat_priv, u32 rc_num) in cnss_pci_downgrade_rc_speed() argument
7447 ret = cnss_pci_set_max_link_speed(plat_priv->bus_priv, rc_num, in cnss_pci_downgrade_rc_speed()
7459 struct cnss_plat_data *plat_priv = pci_priv->plat_priv; in cnss_pci_restore_rc_speed() local
7475 ret = cnss_pci_set_max_link_speed(pci_priv, plat_priv->rc_num, link_speed); in cnss_pci_restore_rc_speed()
7478 plat_priv->rc_num, link_speed, ret); in cnss_pci_restore_rc_speed()
7499 cnss_pci_downgrade_rc_speed(struct cnss_plat_data *plat_priv, u32 rc_num) in cnss_pci_downgrade_rc_speed() argument
7518 struct cnss_plat_data *plat_priv; in cnss_pci_suspend_pwroff() local
7522 plat_priv = cnss_get_plat_priv_by_rc_num(rc_num); in cnss_pci_suspend_pwroff()
7529 cnss_power_off_device(plat_priv); in cnss_pci_suspend_pwroff()
7544 struct cnss_plat_data *plat_priv = cnss_get_plat_priv_by_rc_num(rc_num); in cnss_pci_probe() local
7548 if (!plat_priv) { in cnss_pci_probe()
7561 pci_priv->plat_priv = plat_priv; in cnss_pci_probe()
7566 plat_priv->device_id = pci_dev->device; in cnss_pci_probe()
7567 plat_priv->bus_priv = pci_priv; in cnss_pci_probe()
7569 if (plat_priv->use_pm_domain) in cnss_pci_probe()
7574 ret = cnss_pci_get_dev_cfg_node(plat_priv); in cnss_pci_probe()
7580 cnss_get_sleep_clk_supported(plat_priv); in cnss_pci_probe()
7582 ret = cnss_dev_specific_power_on(plat_priv); in cnss_pci_probe()
7588 ret = cnss_register_subsys(plat_priv); in cnss_pci_probe()
7592 ret = cnss_register_ramdump(plat_priv); in cnss_pci_probe()
7638 plat_priv->enumerate_done) || !cnss_is_dual_wlan_enabled()) in cnss_pci_probe()
7662 if (cnss_is_dual_wlan_enabled() && !plat_priv->enumerate_done) in cnss_pci_probe()
7667 set_bit(CNSS_PCI_PROBE_DONE, &plat_priv->driver_state); in cnss_pci_probe()
7682 cnss_unregister_ramdump(plat_priv); in cnss_pci_probe()
7684 cnss_unregister_subsys(plat_priv); in cnss_pci_probe()
7686 plat_priv->bus_priv = NULL; in cnss_pci_probe()
7694 struct cnss_plat_data *plat_priv = in cnss_pci_remove() local
7697 clear_bit(CNSS_PCI_PROBE_DONE, &plat_priv->driver_state); in cnss_pci_remove()
7727 if (plat_priv) { in cnss_pci_remove()
7728 cnss_unregister_ramdump(plat_priv); in cnss_pci_remove()
7729 cnss_unregister_subsys(plat_priv); in cnss_pci_remove()
7730 plat_priv->bus_priv = NULL; in cnss_pci_remove()
7767 static int cnss_pci_enumerate(struct cnss_plat_data *plat_priv, u32 rc_num) in cnss_pci_enumerate() argument
7776 if (plat_priv->device_id == QCA6490_DEVICE_ID) { in cnss_pci_enumerate()
7777 ret = cnss_pci_set_max_link_speed(plat_priv->bus_priv, rc_num, in cnss_pci_enumerate()
7783 cnss_pci_downgrade_rc_speed(plat_priv, rc_num); in cnss_pci_enumerate()
7788 ret = _cnss_pci_enumerate(plat_priv, rc_num); in cnss_pci_enumerate()
7804 plat_priv->rc_num = rc_num; in cnss_pci_enumerate()
7810 int cnss_pci_init(struct cnss_plat_data *plat_priv) in cnss_pci_init() argument
7812 struct device *dev = &plat_priv->plat_dev->dev; in cnss_pci_init()
7824 ret = cnss_pci_enumerate(plat_priv, be32_to_cpup(&prop[i])); in cnss_pci_init()
7831 ret = cnss_try_suspend(plat_priv); in cnss_pci_init()
7844 if (!plat_priv->bus_priv) { in cnss_pci_init()
7860 void cnss_pci_deinit(struct cnss_plat_data *plat_priv) in cnss_pci_deinit() argument