msm: ipa4: Fix to mask the global interrupt INT1
Receiving the global interrupt INT1 without sending any generic commands. So disabling interrupt by default. Enabling the interrupt only before sending the generic command. Change-Id: I55011933d92d29e19cc478ed1dbea9d08b95d239 Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
This commit is contained in:
@@ -1298,9 +1298,17 @@ int gsi_register_device(struct gsi_per_props *props, unsigned long *dev_hdl)
|
||||
__gsi_config_evt_irq(props->ee, ~0, ~0);
|
||||
__gsi_config_ieob_irq(props->ee, ~0, ~0);
|
||||
__gsi_config_glob_irq(props->ee, ~0, ~0);
|
||||
|
||||
/*
|
||||
* Disabling global INT1 interrupt by default and enable it
|
||||
* onlt when sending the generic command.
|
||||
*/
|
||||
__gsi_config_gen_irq(props->ee, ~0,
|
||||
~GSI_EE_n_CNTXT_GSI_IRQ_CLR_GSI_BREAK_POINT_BMSK);
|
||||
|
||||
__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 */
|
||||
@@ -4316,6 +4324,8 @@ int gsi_halt_channel_ee(unsigned int chan_idx, unsigned int ee, int *code)
|
||||
}
|
||||
|
||||
mutex_lock(&gsi_ctx->mlock);
|
||||
__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 */
|
||||
@@ -4361,6 +4371,8 @@ 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:
|
||||
__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;
|
||||
@@ -4383,6 +4395,8 @@ 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);
|
||||
__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 */
|
||||
@@ -4430,6 +4444,8 @@ 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:
|
||||
__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;
|
||||
@@ -4455,6 +4471,8 @@ int gsi_enable_flow_control_ee(unsigned int chan_idx, unsigned int ee,
|
||||
}
|
||||
|
||||
mutex_lock(&gsi_ctx->mlock);
|
||||
__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 */
|
||||
@@ -4521,6 +4539,8 @@ 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:
|
||||
__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;
|
||||
|
Reference in New Issue
Block a user