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

Commit 3be5d21e authored by Ghanim Fodi's avatar Ghanim Fodi Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: Write to HOLB_EN twice for IPA 4.5



Due to H/W related issue, sometimes HOLB writing
not taking effect due to specific timing.

Change-Id: Iebbec9a45716a3516f2bc04c0aaddbfefc9711ea
Signed-off-by: default avatarGhanim Fodi <gfodi@codeaurora.org>
parent cf8acfa8
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -2088,6 +2088,12 @@ static void ipa3_q6_avoid_holb(void)
			ipahal_write_reg_n_fields(
			ipahal_write_reg_n_fields(
				IPA_ENDP_INIT_HOL_BLOCK_EN_n,
				IPA_ENDP_INIT_HOL_BLOCK_EN_n,
				ep_idx, &ep_holb);
				ep_idx, &ep_holb);

			/* IPA4.5 issue requires HOLB_EN to be written twice */
			if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5)
				ipahal_write_reg_n_fields(
					IPA_ENDP_INIT_HOL_BLOCK_EN_n,
					ep_idx, &ep_holb);
		}
		}
	}
	}
}
}
+6 −0
Original line number Original line Diff line number Diff line
@@ -1230,6 +1230,12 @@ int ipa3_set_reset_client_cons_pipe_sus_holb(bool set_reset,
		ipahal_write_reg_n_fields(
		ipahal_write_reg_n_fields(
			IPA_ENDP_INIT_HOL_BLOCK_EN_n,
			IPA_ENDP_INIT_HOL_BLOCK_EN_n,
			pipe_idx, &ep_holb);
			pipe_idx, &ep_holb);

		/* IPA4.5 issue requires HOLB_EN to be written twice */
		if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5)
			ipahal_write_reg_n_fields(
				IPA_ENDP_INIT_HOL_BLOCK_EN_n,
				pipe_idx, &ep_holb);
	}
	}
	client_lock_unlock_cb(client, false);
	client_lock_unlock_cb(client, false);
	return 0;
	return 0;
+5 −0
Original line number Original line Diff line number Diff line
@@ -5271,6 +5271,11 @@ int ipa3_cfg_ep_holb(u32 clnt_hdl, const struct ipa_ep_cfg_holb *ep_holb)
	ipahal_write_reg_n_fields(IPA_ENDP_INIT_HOL_BLOCK_EN_n, clnt_hdl,
	ipahal_write_reg_n_fields(IPA_ENDP_INIT_HOL_BLOCK_EN_n, clnt_hdl,
		ep_holb);
		ep_holb);


	/* IPA4.5 issue requires HOLB_EN to be written twice */
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5)
		ipahal_write_reg_n_fields(IPA_ENDP_INIT_HOL_BLOCK_EN_n,
			clnt_hdl, ep_holb);

	/* Configure timer */
	/* Configure timer */
	if (ipa3_ctx->ipa_hw_type == IPA_HW_v4_2) {
	if (ipa3_ctx->ipa_hw_type == IPA_HW_v4_2) {
		ipa3_cal_ep_holb_scale_base_val(ep_holb->tmr_val,
		ipa3_cal_ep_holb_scale_base_val(ep_holb->tmr_val,