msm: ipa4: halt both q6 channels for IPAv4

Add a flag in hal_q6_channel to halt both consumer and producer
channels. Halt both q6 channels starting from IPAv4.

Change-Id: I1f62e08d9709389fe52968bcbbf7d782786be1ab
Crs:fixed: 2203488
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
This commit is contained in:
Michael Adisumarta 2018-03-14 10:44:53 -07:00 committed by Gerrit - the friendly Code Review server
parent 328baae18b
commit da797fd8ed

View File

@ -2109,7 +2109,7 @@ static void ipa3_q6_avoid_holb(void)
}
}
static void ipa3_halt_q6_cons_gsi_channels(void)
static void ipa3_halt_q6_gsi_channels(bool prod)
{
int ep_idx;
int client_idx;
@ -2118,8 +2118,10 @@ static void ipa3_halt_q6_cons_gsi_channels(void)
int ret;
int code = 0;
/* if prod flag is true, then we halt the producer channels also */
for (client_idx = 0; client_idx < IPA_CLIENT_MAX; client_idx++) {
if (IPA_CLIENT_IS_Q6_CONS(client_idx)) {
if (IPA_CLIENT_IS_Q6_CONS(client_idx)
|| (IPA_CLIENT_IS_Q6_PROD(client_idx) && prod)) {
ep_idx = ipa3_get_ep_mapping(client_idx);
if (ep_idx == -1)
continue;
@ -2161,7 +2163,6 @@ static void ipa3_halt_q6_cons_gsi_channels(void)
}
}
static int ipa3_q6_clean_q6_flt_tbls(enum ipa_ip_type ip,
enum ipa_rule_type rlt)
{
@ -2577,6 +2578,7 @@ void ipa3_q6_post_shutdown_cleanup(void)
{
int client_idx;
int ep_idx;
bool prod = false;
IPADBG_LOW("ENTER\n");
@ -2589,7 +2591,17 @@ void ipa3_q6_post_shutdown_cleanup(void)
/* Handle the issue where SUSPEND was removed for some reason */
ipa3_q6_avoid_holb();
ipa3_halt_q6_cons_gsi_channels();
/* halt both prod and cons channels starting at IPAv4 */
if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_0) {
prod = true;
ipa3_halt_q6_gsi_channels(prod);
IPA_ACTIVE_CLIENTS_DEC_SIMPLE();
IPADBG("Exit without consumer check\n");
return;
}
ipa3_halt_q6_gsi_channels(prod);
for (client_idx = 0; client_idx < IPA_CLIENT_MAX; client_idx++)
if (IPA_CLIENT_IS_Q6_PROD(client_idx)) {