dataipa: Add logic to hold the clock until modem shutdown
Added a logic to hold the proxy vote for before shutdown and
then unvote when a after shutdown arrives
Change-Id: I14e8e663b0e3334b214de44348d1d16dd1891ae1
Signed-off-by: Abhishek Raghuvanshi <quic_araghuva@quicinc.com>
diff --git a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c
index 55e9a11..d663da6 100644
--- a/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c
+++ b/drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c
@@ -3963,6 +3963,8 @@
case SUBSYS_BEFORE_SHUTDOWN:
#endif
IPAWANINFO("IPA received MPSS BEFORE_SHUTDOWN\n");
+ /* hold a proxy vote for the modem. */
+ ipa3_proxy_clk_vote(atomic_read(&rmnet_ipa3_ctx->is_ssr));
/* send SSR before-shutdown notification to IPACM */
ipa3_set_modem_up(false);
rmnet_ipa_send_ssr_notification(false);
@@ -4003,6 +4005,7 @@
case SUBSYS_AFTER_SHUTDOWN:
#endif
IPAWANINFO("IPA Received MPSS AFTER_SHUTDOWN\n");
+ ipa3_proxy_clk_unvote();
/* Clean up netdev resources in AFTER_SHUTDOWN for remoteproc
* enabled targets. */
#if IS_ENABLED(CONFIG_QCOM_Q6V5_PAS)