diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c index 1d68428f60..e999538b76 100644 --- a/soc/swr-mstr-ctrl.c +++ b/soc/swr-mstr-ctrl.c @@ -1991,10 +1991,12 @@ static void swrm_enable_slave_irq(struct swr_mstr_ctrl *swrm) dev_dbg(swrm->dev, "%s: slave status: 0x%x\n", __func__, status); for (i = 0; i < (swrm->num_dev + 1); i++) { if (status & SWRM_MCP_SLV_STATUS_MASK) { - swrm_cmd_fifo_rd_cmd(swrm, &temp, i, 0x0, + if (!swrm->clk_stop_wakeup) { + swrm_cmd_fifo_rd_cmd(swrm, &temp, i, 0x0, SWRS_SCP_INT_STATUS_CLEAR_1, 1); - swrm_cmd_fifo_wr_cmd(swrm, 0xFF, i, 0x0, + swrm_cmd_fifo_wr_cmd(swrm, 0xFF, i, 0x0, SWRS_SCP_INT_STATUS_CLEAR_1); + } swrm_cmd_fifo_wr_cmd(swrm, 0x4, i, 0x0, SWRS_SCP_INT_STATUS_MASK_1); } @@ -2243,7 +2245,9 @@ handle_irq: * re-enable Host IRQ and process slave pending * interrupts, if any. */ + swrm->clk_stop_wakeup = true; swrm_enable_slave_irq(swrm); + swrm->clk_stop_wakeup = false; } break; default: @@ -2864,6 +2868,8 @@ static int swrm_probe(struct platform_device *pdev) swrm->dev_up = true; swrm->state = SWR_MSTR_UP; swrm->ipc_wakeup = false; + swrm->enable_slave_irq = false; + swrm->clk_stop_wakeup = false; swrm->ipc_wakeup_triggered = false; swrm->disable_div2_clk_switch = FALSE; init_completion(&swrm->reset); diff --git a/soc/swr-mstr-ctrl.h b/soc/swr-mstr-ctrl.h index 6ce199be61..2b0577a9c7 100644 --- a/soc/swr-mstr-ctrl.h +++ b/soc/swr-mstr-ctrl.h @@ -200,6 +200,7 @@ struct swr_mstr_ctrl { u32 num_auto_enum; bool enable_slave_irq; u32 is_always_on; + bool clk_stop_wakeup; struct swr_port_params pp[SWR_UC_MAX][SWR_MAX_MSTR_PORT_NUM];/*max_devNum * max_ports 11 * 14 */ #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_swrm_dent;