Loading drivers/platform/msm/ipa/ipa_v3/ipa.c +60 −5 Original line number Diff line number Diff line Loading @@ -6183,10 +6183,19 @@ static void ipa3_load_ipa_fw(struct work_struct *work) if (ipa3_ctx->ipa3_hw_mode != IPA_HW_MODE_EMULATION && ((ipa3_ctx->platform_type != IPA_PLAT_TYPE_MDM) || (ipa3_ctx->ipa_hw_type >= IPA_HW_v3_5))) result = ipa3_pil_load_ipa_fws(IPA_SUBSYSTEM_NAME); (ipa3_ctx->ipa_hw_type >= IPA_HW_v3_5))) { /* some targets sharing same lunch option but * using different signing images, adding support to * load specific FW image to based on dt entry. */ if (ipa3_ctx->gsi_fw_file_name) result = ipa3_pil_load_ipa_fws( ipa3_ctx->gsi_fw_file_name); else result = ipa3_pil_load_ipa_fws(IPA_SUBSYSTEM_NAME); } else { result = ipa3_manual_load_ipa_fws(); } IPA_ACTIVE_CLIENTS_DEC_SIMPLE(); Loading @@ -6212,6 +6221,10 @@ static void ipa3_load_ipa_fw(struct work_struct *work) /* Unvoting will happen when uC loaded event received. */ ipa3_proxy_clk_vote(); if (ipa3_ctx->uc_fw_file_name) result = ipa3_pil_load_ipa_fws( ipa3_ctx->uc_fw_file_name); else result = ipa3_pil_load_ipa_fws(IPA_UC_SUBSYSTEM_NAME); if (result) { IPAERR("IPA uC loading process has failed result=%d\n", Loading Loading @@ -6571,6 +6584,34 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p, ipa3_ctx->mpm_teth_aggr_size = DEFAULT_MPM_TETH_AGGR_SIZE; ipa3_ctx->mpm_uc_thresh = DEFAULT_MPM_UC_THRESH_SIZE; if (resource_p->gsi_fw_file_name) { ipa3_ctx->gsi_fw_file_name = kzalloc(((strlen(resource_p->gsi_fw_file_name)+1) * sizeof(const char)), GFP_KERNEL); if (ipa3_ctx->gsi_fw_file_name == NULL) { IPAERR_RL("Failed to alloc GSI FW file name\n"); result = -ENOMEM; goto fail_gsi_file_alloc; } memcpy(ipa3_ctx->gsi_fw_file_name, (void const *)resource_p->gsi_fw_file_name, strlen(resource_p->gsi_fw_file_name)); } if (resource_p->uc_fw_file_name) { ipa3_ctx->uc_fw_file_name = kzalloc(((strlen(resource_p->uc_fw_file_name)+1) * sizeof(const char)), GFP_KERNEL); if (ipa3_ctx->uc_fw_file_name == NULL) { IPAERR_RL("Failed to alloc uC FW file name\n"); result = -ENOMEM; goto fail_uc_file_alloc; } memcpy(ipa3_ctx->uc_fw_file_name, (void const *)resource_p->uc_fw_file_name, strlen(resource_p->uc_fw_file_name)); } if (ipa3_ctx->secure_debug_check_action == USE_SCM) { if (ipa_is_mem_dump_allowed()) ipa3_ctx->sd_state = SD_ENABLED; Loading Loading @@ -7055,6 +7096,9 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p, fail_tz_unlock_reg: if (ipa3_ctx->logbuf) ipc_log_context_destroy(ipa3_ctx->logbuf); fail_uc_file_alloc: kfree(ipa3_ctx->gsi_fw_file_name); fail_gsi_file_alloc: kfree(ipa3_ctx); ipa3_ctx = NULL; fail_mem_ctx: Loading Loading @@ -7340,7 +7384,18 @@ static int get_ipa_dts_configuration(struct platform_device *pdev, IPADBG(": Enable LAN rx NAPI = %s\n", ipa_drv_res->lan_rx_napi_enable ? "True" : "False"); result = of_property_read_string(pdev->dev.of_node, "qcom,use-gsi-ipa-fw", &ipa_drv_res->gsi_fw_file_name); if (!result) IPADBG("GSI IPA FW name %s\n", ipa_drv_res->gsi_fw_file_name); else IPADBG("GSI IPA FW file not defined. Using default one\n"); result = of_property_read_string(pdev->dev.of_node, "qcom,use-uc-ipa-fw", &ipa_drv_res->uc_fw_file_name); if (!result) IPADBG("uC IPA FW name = %s\n", ipa_drv_res->uc_fw_file_name); else IPADBG("uC IPA FW file not defined. Using default one\n"); /* Get IPA wrapper address */ resource = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ipa-base"); Loading drivers/platform/msm/ipa/ipa_v3/ipa_i.h +6 −0 Original line number Diff line number Diff line Loading @@ -1853,6 +1853,8 @@ struct ipa3_app_clock_vote { * @lan_ndev: dummy netdev for LAN rx NAPI * @napi_lan_rx: NAPI object for LAN rx * @coal_cmd_pyld: holds the coslescing close frame command payload * @gsi_fw_file_name: GSI IPA fw file name * @uc_fw_file_name: uC IPA fw file name */ struct ipa3_context { struct ipa3_char_device_context cdev; Loading Loading @@ -2032,6 +2034,8 @@ struct ipa3_context { struct napi_struct napi_lan_rx; struct ipahal_imm_cmd_pyld *coal_cmd_pyld; struct ipa3_app_clock_vote app_clock_vote; char *gsi_fw_file_name; char *uc_fw_file_name; }; struct ipa3_plat_drv_res { Loading Loading @@ -2080,6 +2084,8 @@ struct ipa3_plat_drv_res { bool ipa_endp_delay_wa; bool skip_ieob_mask_wa; bool ipa_wan_skb_page; const char *gsi_fw_file_name; const char *uc_fw_file_name; }; /** Loading Loading
drivers/platform/msm/ipa/ipa_v3/ipa.c +60 −5 Original line number Diff line number Diff line Loading @@ -6183,10 +6183,19 @@ static void ipa3_load_ipa_fw(struct work_struct *work) if (ipa3_ctx->ipa3_hw_mode != IPA_HW_MODE_EMULATION && ((ipa3_ctx->platform_type != IPA_PLAT_TYPE_MDM) || (ipa3_ctx->ipa_hw_type >= IPA_HW_v3_5))) result = ipa3_pil_load_ipa_fws(IPA_SUBSYSTEM_NAME); (ipa3_ctx->ipa_hw_type >= IPA_HW_v3_5))) { /* some targets sharing same lunch option but * using different signing images, adding support to * load specific FW image to based on dt entry. */ if (ipa3_ctx->gsi_fw_file_name) result = ipa3_pil_load_ipa_fws( ipa3_ctx->gsi_fw_file_name); else result = ipa3_pil_load_ipa_fws(IPA_SUBSYSTEM_NAME); } else { result = ipa3_manual_load_ipa_fws(); } IPA_ACTIVE_CLIENTS_DEC_SIMPLE(); Loading @@ -6212,6 +6221,10 @@ static void ipa3_load_ipa_fw(struct work_struct *work) /* Unvoting will happen when uC loaded event received. */ ipa3_proxy_clk_vote(); if (ipa3_ctx->uc_fw_file_name) result = ipa3_pil_load_ipa_fws( ipa3_ctx->uc_fw_file_name); else result = ipa3_pil_load_ipa_fws(IPA_UC_SUBSYSTEM_NAME); if (result) { IPAERR("IPA uC loading process has failed result=%d\n", Loading Loading @@ -6571,6 +6584,34 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p, ipa3_ctx->mpm_teth_aggr_size = DEFAULT_MPM_TETH_AGGR_SIZE; ipa3_ctx->mpm_uc_thresh = DEFAULT_MPM_UC_THRESH_SIZE; if (resource_p->gsi_fw_file_name) { ipa3_ctx->gsi_fw_file_name = kzalloc(((strlen(resource_p->gsi_fw_file_name)+1) * sizeof(const char)), GFP_KERNEL); if (ipa3_ctx->gsi_fw_file_name == NULL) { IPAERR_RL("Failed to alloc GSI FW file name\n"); result = -ENOMEM; goto fail_gsi_file_alloc; } memcpy(ipa3_ctx->gsi_fw_file_name, (void const *)resource_p->gsi_fw_file_name, strlen(resource_p->gsi_fw_file_name)); } if (resource_p->uc_fw_file_name) { ipa3_ctx->uc_fw_file_name = kzalloc(((strlen(resource_p->uc_fw_file_name)+1) * sizeof(const char)), GFP_KERNEL); if (ipa3_ctx->uc_fw_file_name == NULL) { IPAERR_RL("Failed to alloc uC FW file name\n"); result = -ENOMEM; goto fail_uc_file_alloc; } memcpy(ipa3_ctx->uc_fw_file_name, (void const *)resource_p->uc_fw_file_name, strlen(resource_p->uc_fw_file_name)); } if (ipa3_ctx->secure_debug_check_action == USE_SCM) { if (ipa_is_mem_dump_allowed()) ipa3_ctx->sd_state = SD_ENABLED; Loading Loading @@ -7055,6 +7096,9 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p, fail_tz_unlock_reg: if (ipa3_ctx->logbuf) ipc_log_context_destroy(ipa3_ctx->logbuf); fail_uc_file_alloc: kfree(ipa3_ctx->gsi_fw_file_name); fail_gsi_file_alloc: kfree(ipa3_ctx); ipa3_ctx = NULL; fail_mem_ctx: Loading Loading @@ -7340,7 +7384,18 @@ static int get_ipa_dts_configuration(struct platform_device *pdev, IPADBG(": Enable LAN rx NAPI = %s\n", ipa_drv_res->lan_rx_napi_enable ? "True" : "False"); result = of_property_read_string(pdev->dev.of_node, "qcom,use-gsi-ipa-fw", &ipa_drv_res->gsi_fw_file_name); if (!result) IPADBG("GSI IPA FW name %s\n", ipa_drv_res->gsi_fw_file_name); else IPADBG("GSI IPA FW file not defined. Using default one\n"); result = of_property_read_string(pdev->dev.of_node, "qcom,use-uc-ipa-fw", &ipa_drv_res->uc_fw_file_name); if (!result) IPADBG("uC IPA FW name = %s\n", ipa_drv_res->uc_fw_file_name); else IPADBG("uC IPA FW file not defined. Using default one\n"); /* Get IPA wrapper address */ resource = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ipa-base"); Loading
drivers/platform/msm/ipa/ipa_v3/ipa_i.h +6 −0 Original line number Diff line number Diff line Loading @@ -1853,6 +1853,8 @@ struct ipa3_app_clock_vote { * @lan_ndev: dummy netdev for LAN rx NAPI * @napi_lan_rx: NAPI object for LAN rx * @coal_cmd_pyld: holds the coslescing close frame command payload * @gsi_fw_file_name: GSI IPA fw file name * @uc_fw_file_name: uC IPA fw file name */ struct ipa3_context { struct ipa3_char_device_context cdev; Loading Loading @@ -2032,6 +2034,8 @@ struct ipa3_context { struct napi_struct napi_lan_rx; struct ipahal_imm_cmd_pyld *coal_cmd_pyld; struct ipa3_app_clock_vote app_clock_vote; char *gsi_fw_file_name; char *uc_fw_file_name; }; struct ipa3_plat_drv_res { Loading Loading @@ -2080,6 +2084,8 @@ struct ipa3_plat_drv_res { bool ipa_endp_delay_wa; bool skip_ieob_mask_wa; bool ipa_wan_skb_page; const char *gsi_fw_file_name; const char *uc_fw_file_name; }; /** Loading