Skip to content

Commit

Permalink
Updating clock switching and clock frequency sequence
Browse files Browse the repository at this point in the history
returning EBUSY for IPC when Host busy with previous ipc.

Signed-off-by: maruthi machani <[email protected]>
  • Loading branch information
maruthi machani committed Sep 6, 2023
1 parent 3d2a097 commit bf43262
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/drivers/amd/rembrandt/acp_hs_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/amd/rembrandt/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bf43262

Please sign in to comment.