diff options
| author | Skylar Chang <chiaweic@codeaurora.org> | 2017-02-17 11:09:50 -0800 |
|---|---|---|
| committer | Skylar Chang <chiaweic@codeaurora.org> | 2017-02-23 14:07:09 -0800 |
| commit | b171bdd7be78bb8dcd35b6c7e297b991da2b2582 (patch) | |
| tree | 8c16796f2406f443250f4515df654af64c9076e5 | |
| parent | 3e67e235eab1762b562f0e359b9cde9b1302f32d (diff) | |
msm: ipa3: halt modem channels as part of SSR
For modem SSR, APPS needs to halt modem consumer channels after
shutdown to make sure GSI FW does not access any modem's memory.
Change-Id: I6889a2ad509e0b1104ef8c3f65f24fe39b10745d
CRs-Fixed: 2008582
Acked-by: Ady Abrahan <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_v3/ipa.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa.c b/drivers/platform/msm/ipa/ipa_v3/ipa.c index e90f69b466e1..2e6803b468e2 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa.c @@ -1878,6 +1878,45 @@ static void ipa3_q6_avoid_holb(void) } } +static void ipa3_halt_q6_cons_gsi_channels(void) +{ + int ep_idx; + int client_idx; + struct ipa_gsi_ep_config *gsi_ep_cfg; + int ret; + int code = 0; + + for (client_idx = 0; client_idx < IPA_CLIENT_MAX; client_idx++) { + if (IPA_CLIENT_IS_Q6_CONS(client_idx)) { + ep_idx = ipa3_get_ep_mapping(client_idx); + if (ep_idx == -1) + continue; + + gsi_ep_cfg = ipa3_get_gsi_ep_info(ep_idx); + if (!gsi_ep_cfg) { + IPAERR("failed to get GSI config\n"); + ipa_assert(); + return; + } + + ret = gsi_halt_channel_ee( + gsi_ep_cfg->ipa_gsi_chan_num, gsi_ep_cfg->ee, + &code); + if (ret == GSI_STATUS_SUCCESS) + IPADBG("halted gsi ch %d ee %d with code %d\n", + gsi_ep_cfg->ipa_gsi_chan_num, + gsi_ep_cfg->ee, + code); + else + IPAERR("failed to halt ch %d ee %d code %d\n", + gsi_ep_cfg->ipa_gsi_chan_num, + gsi_ep_cfg->ee, + code); + } + } +} + + static int ipa3_q6_clean_q6_flt_tbls(enum ipa_ip_type ip, enum ipa_rule_type rlt) { @@ -2312,6 +2351,7 @@ 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(); for (client_idx = 0; client_idx < IPA_CLIENT_MAX; client_idx++) if (IPA_CLIENT_IS_Q6_PROD(client_idx)) { |
