Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bf217c1 authored by Sivakanth Vaka's avatar Sivakanth Vaka Committed by Gerrit - the friendly Code Review server
Browse files

ipa3: Changes to keep IPA clock voted in shutdown notifier



Adding changes to avoid unclocked access in shutdown notifier.
Increasing the IPA clock vote before saving the IPA registers.

Signed-off-by: default avatarSivakanth <vaka&lt;svaka@codeaurora.org>
parent 6179691f
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -9098,9 +9098,22 @@ static void ipa_smmu_update_fw_loader(void)

void ipa3_plat_drv_shutdown(struct platform_device *pdev_p)
{
	int res;
	struct ipa_active_client_logging_info log_info;

	pr_debug("ipa: driver shutdown invoked for %s\n",
		pdev_p->dev.of_node->name);
	if (ipa3_ctx && atomic_read(&ipa3_ctx->ipa_clk_vote)) {
	if(unlikely(!ipa3_ctx))
	{
		IPAERR("IPA driver not initialized\n");
		return;
	}
	/* Make sure IPA clock voted when collecting the reg dump */
	IPA_ACTIVE_CLIENTS_PREP_SPECIAL(log_info, "SHUTDOWN_VOTE");
	res = ipa3_inc_client_enable_clks_no_block(&log_info);
	if (res) {
		IPAERR("IPA clk off not saving the IPA registers\n");
	} else {
		ipahal_print_all_regs(false);
		ipa_save_registers();
	}