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

Commit 03ab580a authored by Ravinder Konka's avatar Ravinder Konka
Browse files

msm: ipa: Fix BAM register dump logic



APPS doesn't have access to dump BAM registers of Q6 pipes.
Make changes to print only IPA pipes connected to USB.

Change-Id: I0eacb66535ecbf049b59521adf9f3ef65bbc97fc
Acked-by: default avatarChaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: default avatarRavinder Konka <rkonka@codeaurora.org>
parent 2344e053
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -3845,12 +3845,21 @@ int ipa_straddle_boundary(u32 start, u32 end, u32 boundary)
void ipa2_bam_reg_dump(void)
{
	static DEFINE_RATELIMIT_STATE(_rs, 500*HZ, 1);

	if (__ratelimit(&_rs)) {
		ipa_inc_client_enable_clks();
		pr_err("IPA BAM START\n");
		sps_get_bam_debug_info(ipa_ctx->bam_handle, 5, 511950, 0, 0);
		sps_get_bam_debug_info(ipa_ctx->bam_handle, 93, 0, 0, 0);
		if (ipa_ctx->ipa_hw_type < IPA_HW_v2_0) {
			sps_get_bam_debug_info(ipa_ctx->bam_handle, 5,
			511950, 0, 0);
			sps_get_bam_debug_info(ipa_ctx->bam_handle, 93, 0,
			0, 0);
		} else {
			sps_get_bam_debug_info(ipa_ctx->bam_handle, 93,
			(SPS_BAM_PIPE(ipa_get_ep_mapping(IPA_CLIENT_USB_CONS))
			|
			SPS_BAM_PIPE(ipa_get_ep_mapping(IPA_CLIENT_USB_PROD))),
			0, 2);
		}
		ipa_dec_client_disable_clks();
	}
}