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

Commit 8395191f authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa4: Fix to mask the global interrupt INT1"

parents 9f2719f2 76f1d7b3
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -1258,6 +1258,11 @@ int gsi_register_device(struct gsi_per_props *props, unsigned long *dev_hdl)
	__gsi_config_gen_irq(props->ee, ~0,
		~GSI_EE_n_CNTXT_GSI_IRQ_CLR_GSI_BREAK_POINT_BMSK);

	if (gsi_ctx->per.ver == GSI_VER_2_2 || gsi_ctx->per.ver == GSI_VER_2_5
		|| gsi_ctx->per.ver == GSI_VER_2_7)
		__gsi_config_glob_irq(props->ee,
				GSI_EE_n_CNTXT_GLOB_IRQ_EN_GP_INT1_BMSK, 0);

	gsi_writel(props->intr, gsi_ctx->base +
			GSI_EE_n_CNTXT_INTSET_OFFS(gsi_ctx->per.ee));
	/* set GSI_TOP_EE_n_CNTXT_MSI_BASE_LSB/MSB to 0 */
@@ -4149,6 +4154,10 @@ int gsi_halt_channel_ee(unsigned int chan_idx, unsigned int ee, int *code)
	}

	mutex_lock(&gsi_ctx->mlock);
	if (gsi_ctx->per.ver == GSI_VER_2_2 || gsi_ctx->per.ver == GSI_VER_2_7
		|| gsi_ctx->per.ver == GSI_VER_2_5)
		__gsi_config_glob_irq(gsi_ctx->per.ee,
			GSI_EE_n_CNTXT_GLOB_IRQ_EN_GP_INT1_BMSK, ~0);
	reinit_completion(&gsi_ctx->gen_ee_cmd_compl);

	/* invalidate the response */
@@ -4194,6 +4203,10 @@ int gsi_halt_channel_ee(unsigned int chan_idx, unsigned int ee, int *code)
	res = GSI_STATUS_SUCCESS;
	*code = gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code;
free_lock:
	if (gsi_ctx->per.ver == GSI_VER_2_2 || gsi_ctx->per.ver == GSI_VER_2_7
		|| gsi_ctx->per.ver == GSI_VER_2_5)
		__gsi_config_glob_irq(gsi_ctx->per.ee,
			GSI_EE_n_CNTXT_GLOB_IRQ_EN_GP_INT1_BMSK, 0);
	mutex_unlock(&gsi_ctx->mlock);

	return res;
@@ -4216,6 +4229,10 @@ int gsi_alloc_channel_ee(unsigned int chan_idx, unsigned int ee, int *code)
		return gsi_alloc_ap_channel(chan_idx);

	mutex_lock(&gsi_ctx->mlock);
	if (gsi_ctx->per.ver == GSI_VER_2_2 || gsi_ctx->per.ver == GSI_VER_2_7
		|| gsi_ctx->per.ver == GSI_VER_2_5)
		__gsi_config_glob_irq(gsi_ctx->per.ee,
			GSI_EE_n_CNTXT_GLOB_IRQ_EN_GP_INT1_BMSK, ~0);
	reinit_completion(&gsi_ctx->gen_ee_cmd_compl);

	/* invalidate the response */
@@ -4263,6 +4280,10 @@ int gsi_alloc_channel_ee(unsigned int chan_idx, unsigned int ee, int *code)
	res = GSI_STATUS_SUCCESS;
	*code = gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code;
free_lock:
	if (gsi_ctx->per.ver == GSI_VER_2_2 || gsi_ctx->per.ver == GSI_VER_2_7
		|| gsi_ctx->per.ver == GSI_VER_2_5)
		__gsi_config_glob_irq(gsi_ctx->per.ee,
			GSI_EE_n_CNTXT_GLOB_IRQ_EN_GP_INT1_BMSK, 0);
	mutex_unlock(&gsi_ctx->mlock);

	return res;
@@ -4288,6 +4309,10 @@ int gsi_enable_flow_control_ee(unsigned int chan_idx, unsigned int ee,
	}

	mutex_lock(&gsi_ctx->mlock);
	if (gsi_ctx->per.ver == GSI_VER_2_2 || gsi_ctx->per.ver == GSI_VER_2_7
		|| gsi_ctx->per.ver == GSI_VER_2_5)
		__gsi_config_glob_irq(gsi_ctx->per.ee,
			GSI_EE_n_CNTXT_GLOB_IRQ_EN_GP_INT1_BMSK, ~0);
	reinit_completion(&gsi_ctx->gen_ee_cmd_compl);

	/* invalidate the response */
@@ -4354,6 +4379,10 @@ int gsi_enable_flow_control_ee(unsigned int chan_idx, unsigned int ee,
	}
	*code = gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code;
free_lock:
	if (gsi_ctx->per.ver == GSI_VER_2_2 || gsi_ctx->per.ver == GSI_VER_2_7
		|| gsi_ctx->per.ver == GSI_VER_2_5)
		__gsi_config_glob_irq(gsi_ctx->per.ee,
			GSI_EE_n_CNTXT_GLOB_IRQ_EN_GP_INT1_BMSK, 0);
	mutex_unlock(&gsi_ctx->mlock);

	return res;