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

Commit 50ad93d9 authored by Sivan Reinstein's avatar Sivan Reinstein
Browse files

msm: ipa: enable IPA clock during SSR and power collapse



During SSR and power collapse, the IPA clock is disabled,
and writing to registers during the SSR cleanup/initialization
is crashing the target.
This fix enables the IPA clock before writing to registers
during SSR.

CRs-fixed: 717676
Change-Id: Ibd502d71432f699aaabed3859f438cd9f446ec32
Signed-off-by: default avatarSivan Reinstein <sivanr@codeaurora.org>
parent 61112455
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1064,11 +1064,14 @@ int ipa_init_q6_smem(void)
{
	int rc;

	ipa_inc_client_enable_clks();

	rc = ipa_init_smem_region(IPA_v2_RAM_MODEM_SIZE,
				  IPA_v2_RAM_MODEM_OFST);

	if (rc) {
		IPAERR("failed to initialize Modem RAM memory\n");
		ipa_dec_client_disable_clks();
		return rc;
	}

@@ -1077,9 +1080,12 @@ int ipa_init_q6_smem(void)

	if (rc) {
		IPAERR("failed to initialize Modem HDRs RAM memory\n");
		ipa_dec_client_disable_clks();
		return rc;
	}

	ipa_dec_client_disable_clks();

	return rc;
}

@@ -1409,6 +1415,8 @@ int ipa_q6_cleanup(void)
	int client_idx;
	int res;

	ipa_inc_client_enable_clks();

	if (ipa_q6_pipe_delay()) {
		IPAERR("Failed to delay Q6 pipes\n");
		BUG();
@@ -1438,6 +1446,7 @@ int ipa_q6_cleanup(void)
				BUG();
		}

	ipa_dec_client_disable_clks();
	return 0;
}