Loading drivers/platform/msm/ipa/ipa_v3/ipa.c +16 −17 Original line number Diff line number Diff line Loading @@ -7169,20 +7169,22 @@ void ipa_pc_qmp_enable(void) char buf[MAX_LEN] = "{class: bcm, res: ipa_pc, val: 1}"; struct qmp_pkt pkt; int ret = 0; struct ipa3_pc_mbox_data *mbox_data = &ipa3_ctx->pc_mbox; IPADBG("Enter\n"); /* prepare the mailbox struct */ ipa3_ctx->mbox_client.dev = &ipa3_ctx->master_pdev->dev; ipa3_ctx->mbox_client.tx_block = true; ipa3_ctx->mbox_client.tx_tout = MBOX_TOUT_MS; ipa3_ctx->mbox_client.knows_txdone = false; ipa3_ctx->mbox = mbox_request_channel(&ipa3_ctx->mbox_client, 0); if (IS_ERR(ipa3_ctx->mbox)) { ret = PTR_ERR(ipa3_ctx->mbox); mbox_data->mbox_client.dev = &ipa3_ctx->master_pdev->dev; mbox_data->mbox_client.tx_block = true; mbox_data->mbox_client.tx_tout = MBOX_TOUT_MS; mbox_data->mbox_client.knows_txdone = false; mbox_data->mbox = mbox_request_channel(&mbox_data->mbox_client, 0); if (IS_ERR(mbox_data->mbox)) { ret = PTR_ERR(mbox_data->mbox); if (ret != -EPROBE_DEFER) IPAERR("mailbox channel request failed, ret=%d\n", ret); ipa3_ctx->mbox = NULL; return; } Loading @@ -7191,16 +7193,13 @@ void ipa_pc_qmp_enable(void) pkt.data = buf; /* send the QMP packet to AOP */ ret = mbox_send_message(ipa3_ctx->mbox, &pkt); if (ret < 0) { ret = mbox_send_message(mbox_data->mbox, &pkt); if (ret < 0) IPAERR("qmp message send failed, ret=%d\n", ret); goto cleanup; } cleanup: if (ipa3_ctx->mbox) { mbox_free_channel(ipa3_ctx->mbox); ipa3_ctx->mbox = NULL; if (mbox_data->mbox) { mbox_free_channel(mbox_data->mbox); mbox_data->mbox = NULL; } } Loading drivers/platform/msm/ipa/ipa_v3/ipa_i.h +6 −2 Original line number Diff line number Diff line Loading @@ -1457,6 +1457,11 @@ struct ipa3_char_device_context { struct cdev cdev; }; struct ipa3_pc_mbox_data { struct mbox_client mbox_client; struct mbox_chan *mbox; }; /** * struct ipa3_context - IPA context * @cdev: cdev context Loading Loading @@ -1698,8 +1703,7 @@ struct ipa3_context { u32 sd_state; void __iomem *reg_collection_base; struct ipa3_wdi2_ctx wdi2_ctx; struct mbox_client mbox_client; struct mbox_chan *mbox; struct ipa3_pc_mbox_data pc_mbox; atomic_t ipa_clk_vote; int (*client_lock_unlock[IPA_MAX_CLNT])(bool is_lock); bool fw_loaded; Loading drivers/platform/msm/ipa/ipa_v3/ipa_uc.c +1 −4 Original line number Diff line number Diff line Loading @@ -497,10 +497,7 @@ static void ipa3_uc_response_hdlr(enum ipa_irq_type interrupt, * To enable ipa power collapse we need to enable rpmh and uc * handshake So that uc can do register retention. To enable * this handshake we need to send the below message to rpmh. * For APQ only target, we do it here once uC loading is * completed. */ if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ) ipa_pc_qmp_enable(); for (i = 0; i < IPA_HW_NUM_FEATURES; i++) { Loading drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +0 −7 Original line number Diff line number Diff line Loading @@ -3856,13 +3856,6 @@ void ipa3_q6_handshake_complete(bool ssr_bootup) * SSR recovery */ rmnet_ipa_get_network_stats_and_update(); } else { /* * To enable ipa power collapse we need to enable rpmh and uc * handshake So that uc can do register retention. To enable * this handshake we need to send the below message to rpmh */ ipa_pc_qmp_enable(); } imp_handle_modem_ready(); Loading Loading
drivers/platform/msm/ipa/ipa_v3/ipa.c +16 −17 Original line number Diff line number Diff line Loading @@ -7169,20 +7169,22 @@ void ipa_pc_qmp_enable(void) char buf[MAX_LEN] = "{class: bcm, res: ipa_pc, val: 1}"; struct qmp_pkt pkt; int ret = 0; struct ipa3_pc_mbox_data *mbox_data = &ipa3_ctx->pc_mbox; IPADBG("Enter\n"); /* prepare the mailbox struct */ ipa3_ctx->mbox_client.dev = &ipa3_ctx->master_pdev->dev; ipa3_ctx->mbox_client.tx_block = true; ipa3_ctx->mbox_client.tx_tout = MBOX_TOUT_MS; ipa3_ctx->mbox_client.knows_txdone = false; ipa3_ctx->mbox = mbox_request_channel(&ipa3_ctx->mbox_client, 0); if (IS_ERR(ipa3_ctx->mbox)) { ret = PTR_ERR(ipa3_ctx->mbox); mbox_data->mbox_client.dev = &ipa3_ctx->master_pdev->dev; mbox_data->mbox_client.tx_block = true; mbox_data->mbox_client.tx_tout = MBOX_TOUT_MS; mbox_data->mbox_client.knows_txdone = false; mbox_data->mbox = mbox_request_channel(&mbox_data->mbox_client, 0); if (IS_ERR(mbox_data->mbox)) { ret = PTR_ERR(mbox_data->mbox); if (ret != -EPROBE_DEFER) IPAERR("mailbox channel request failed, ret=%d\n", ret); ipa3_ctx->mbox = NULL; return; } Loading @@ -7191,16 +7193,13 @@ void ipa_pc_qmp_enable(void) pkt.data = buf; /* send the QMP packet to AOP */ ret = mbox_send_message(ipa3_ctx->mbox, &pkt); if (ret < 0) { ret = mbox_send_message(mbox_data->mbox, &pkt); if (ret < 0) IPAERR("qmp message send failed, ret=%d\n", ret); goto cleanup; } cleanup: if (ipa3_ctx->mbox) { mbox_free_channel(ipa3_ctx->mbox); ipa3_ctx->mbox = NULL; if (mbox_data->mbox) { mbox_free_channel(mbox_data->mbox); mbox_data->mbox = NULL; } } Loading
drivers/platform/msm/ipa/ipa_v3/ipa_i.h +6 −2 Original line number Diff line number Diff line Loading @@ -1457,6 +1457,11 @@ struct ipa3_char_device_context { struct cdev cdev; }; struct ipa3_pc_mbox_data { struct mbox_client mbox_client; struct mbox_chan *mbox; }; /** * struct ipa3_context - IPA context * @cdev: cdev context Loading Loading @@ -1698,8 +1703,7 @@ struct ipa3_context { u32 sd_state; void __iomem *reg_collection_base; struct ipa3_wdi2_ctx wdi2_ctx; struct mbox_client mbox_client; struct mbox_chan *mbox; struct ipa3_pc_mbox_data pc_mbox; atomic_t ipa_clk_vote; int (*client_lock_unlock[IPA_MAX_CLNT])(bool is_lock); bool fw_loaded; Loading
drivers/platform/msm/ipa/ipa_v3/ipa_uc.c +1 −4 Original line number Diff line number Diff line Loading @@ -497,10 +497,7 @@ static void ipa3_uc_response_hdlr(enum ipa_irq_type interrupt, * To enable ipa power collapse we need to enable rpmh and uc * handshake So that uc can do register retention. To enable * this handshake we need to send the below message to rpmh. * For APQ only target, we do it here once uC loading is * completed. */ if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ) ipa_pc_qmp_enable(); for (i = 0; i < IPA_HW_NUM_FEATURES; i++) { Loading
drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c +0 −7 Original line number Diff line number Diff line Loading @@ -3856,13 +3856,6 @@ void ipa3_q6_handshake_complete(bool ssr_bootup) * SSR recovery */ rmnet_ipa_get_network_stats_and_update(); } else { /* * To enable ipa power collapse we need to enable rpmh and uc * handshake So that uc can do register retention. To enable * this handshake we need to send the below message to rpmh */ ipa_pc_qmp_enable(); } imp_handle_modem_ready(); Loading