From bf43262ffd2cad5bf81d04461eca14fe1d33f680 Mon Sep 17 00:00:00 2001 From: maruthi machani Date: Wed, 6 Sep 2023 14:52:28 +0530 Subject: [PATCH] Updating clock switching and clock frequency sequence returning EBUSY for IPC when Host busy with previous ipc. Signed-off-by: maruthi machani --- src/drivers/amd/rembrandt/acp_hs_dma.c | 4 ++-- src/drivers/amd/rembrandt/ipc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/amd/rembrandt/acp_hs_dma.c b/src/drivers/amd/rembrandt/acp_hs_dma.c index dd3026236055..95d189e1ab2b 100644 --- a/src/drivers/amd/rembrandt/acp_hs_dma.c +++ b/src/drivers/amd/rembrandt/acp_hs_dma.c @@ -96,9 +96,9 @@ static int acp_dai_hs_dma_start(struct dma_chan_data *channel) acp_pdm_en = (uint32_t)io_reg_read(PU_REGISTER_BASE + ACP_WOV_PDM_ENABLE); if (!hs_iter.bits.hstdm_txen && !hs_irer.bits.hstdm_rx_en && !acp_pdm_en) { - io_reg_write((PU_REGISTER_BASE + ACP_CLKMUX_SEL), ACP_ACLK_CLK_SEL); /* Request SMU to set aclk to 600 Mhz */ acp_change_clock_notify(600000000); + io_reg_write((PU_REGISTER_BASE + ACP_CLKMUX_SEL), ACP_ACLK_CLK_SEL); } if (channel->direction == DMA_DIR_MEM_TO_DEV) { @@ -180,8 +180,8 @@ static int acp_dai_hs_dma_stop(struct dma_chan_data *channel) io_reg_write((PU_REGISTER_BASE + ACP_HSTDM_IER), HS_IER_DISABLE); /* Request SMU to scale down aclk to minimum clk */ if (!acp_pdm_en) { - acp_change_clock_notify(0); io_reg_write((PU_REGISTER_BASE + ACP_CLKMUX_SEL), ACP_INTERNAL_CLK_SEL); + acp_change_clock_notify(0); } } return 0; diff --git a/src/drivers/amd/rembrandt/ipc.c b/src/drivers/amd/rembrandt/ipc.c index 58b3a88e6994..7229ea75b10c 100644 --- a/src/drivers/amd/rembrandt/ipc.c +++ b/src/drivers/amd/rembrandt/ipc.c @@ -187,7 +187,7 @@ int ipc_platform_send_msg(const struct ipc_msg *msg) sw_intr_stat = (acp_dsp_sw_intr_stat_t) io_reg_read(PU_REGISTER_BASE + ACP_DSP_SW_INTR_STAT); status = sw_intr_stat.bits.dsp0_to_host_intr_stat; - return ret; + return -EBUSY; } lock = io_reg_read(PU_REGISTER_BASE + ACP_AXI2DAGB_SEM_0); while (lock)