msm: ipa3: Send enable force clear only for producer pipe

Enable forceclear only supported for producer pipe so
avoid sending the force clear command to consumer pipes.

Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Change-Id: I850f360f18c6598af6914c9cd2c89cacad1ac4c9
This commit is contained in:
Ashok Vuyyuru 2020-10-12 11:24:41 +05:30
commit 5ed3cc3fcd
3 changed files with 55 additions and 49 deletions

View file

@ -2636,23 +2636,25 @@ int ipa3_suspend_gsi_wdi_pipe(u32 clnt_hdl)
}
if (ep->valid) {
IPADBG("suspended pipe %d\n", ipa_ep_idx);
source_pipe_bitmask = 1 <<
ipa3_get_ep_mapping(ep->client);
res = ipa3_enable_force_clear(clnt_hdl,
false, source_pipe_bitmask);
if (res) {
/*
* assuming here modem SSR, AP can remove
* the delay in this case
*/
IPAERR("failed to force clear %d\n", res);
IPAERR("remove delay from SCND reg\n");
ep_ctrl_scnd.endp_delay = false;
ipahal_write_reg_n_fields(
IPA_ENDP_INIT_CTRL_SCND_n, clnt_hdl,
&ep_ctrl_scnd);
} else {
disable_force_clear = true;
if (IPA_CLIENT_IS_PROD(ep->client)) {
source_pipe_bitmask = 1 <<
ipa3_get_ep_mapping(ep->client);
res = ipa3_enable_force_clear(clnt_hdl,
false, source_pipe_bitmask);
if (res) {
/*
* assuming here modem SSR, AP can remove
* the delay in this case
*/
IPAERR("failed to force clear %d\n", res);
IPAERR("remove delay from SCND reg\n");
ep_ctrl_scnd.endp_delay = false;
ipahal_write_reg_n_fields(
IPA_ENDP_INIT_CTRL_SCND_n, clnt_hdl,
&ep_ctrl_scnd);
} else {
disable_force_clear = true;
}
}
retry_gsi_stop:
res = ipa3_stop_gsi_channel(ipa_ep_idx);

View file

@ -962,23 +962,25 @@ int ipa3_disable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
* as IPA uC will fail to suspend the pipe otherwise.
*/
ep = &ipa3_ctx->ep[ipa_ep_idx_rx];
source_pipe_bitmask = 1 <<
if (IPA_CLIENT_IS_PROD(ep->client)) {
source_pipe_bitmask = 1 <<
ipa3_get_ep_mapping(ep->client);
result = ipa3_enable_force_clear(ipa_ep_idx_rx,
false, source_pipe_bitmask);
if (result) {
/*
* assuming here modem SSR, AP can remove
* the delay in this case
*/
IPAERR("failed to force clear %d\n", result);
IPAERR("remove delay from SCND reg\n");
ep_ctrl_scnd.endp_delay = false;
ipahal_write_reg_n_fields(
IPA_ENDP_INIT_CTRL_SCND_n, ipa_ep_idx_rx,
&ep_ctrl_scnd);
} else {
disable_force_clear = true;
result = ipa3_enable_force_clear(ipa_ep_idx_rx,
false, source_pipe_bitmask);
if (result) {
/*
* assuming here modem SSR, AP can remove
* the delay in this case
*/
IPAERR("failed to force clear %d\n", result);
IPAERR("remove delay from SCND reg\n");
ep_ctrl_scnd.endp_delay = false;
ipahal_write_reg_n_fields(
IPA_ENDP_INIT_CTRL_SCND_n, ipa_ep_idx_rx,
&ep_ctrl_scnd);
} else {
disable_force_clear = true;
}
}
/* stop gsi rx channel */

View file

@ -1809,22 +1809,24 @@ int ipa3_disable_wigig_pipe_i(enum ipa_client_type client)
}
IPADBG("pipe %d\n", ipa_ep_idx);
source_pipe_bitmask = 1 << ipa_ep_idx;
res = ipa3_enable_force_clear(ipa_ep_idx,
false, source_pipe_bitmask);
if (res) {
/*
* assuming here modem SSR, AP can remove
* the delay in this case
*/
IPAERR("failed to force clear %d\n", res);
IPAERR("remove delay from SCND reg\n");
ep_ctrl_scnd.endp_delay = false;
ipahal_write_reg_n_fields(
IPA_ENDP_INIT_CTRL_SCND_n, ipa_ep_idx,
&ep_ctrl_scnd);
} else {
disable_force_clear = true;
if (IPA_CLIENT_IS_PROD(ep->client)) {
source_pipe_bitmask = 1 << ipa_ep_idx;
res = ipa3_enable_force_clear(ipa_ep_idx,
false, source_pipe_bitmask);
if (res) {
/*
* assuming here modem SSR, AP can remove
* the delay in this case
*/
IPAERR("failed to force clear %d\n", res);
IPAERR("remove delay from SCND reg\n");
ep_ctrl_scnd.endp_delay = false;
ipahal_write_reg_n_fields(
IPA_ENDP_INIT_CTRL_SCND_n, ipa_ep_idx,
&ep_ctrl_scnd);
} else {
disable_force_clear = true;
}
}
retry_gsi_stop:
res = ipa3_stop_gsi_channel(ipa_ep_idx);