Skip to content

Commit 4786d6f

Browse files
committed
acp_7_x: clk: power PLL and set max clock at platform init
Power the Audio PLL and request CLK_MAX_CPU_HZ in platform_init so the DSP is at full clock before DMA/IPC init. Do not send the same PMFW mailbox from the D0/D3 clock sequences. Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
1 parent f716b98 commit 4786d6f

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎src/platform/amd/acp_7_x/lib/clk.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ void acp_clk_d0_sequence(uint32_t clock_freq)
222222
{
223223
clk_tick_cnt_config_reg_t clk_tick_config;
224224

225-
/* Send message to PMFW to power on Audio PLL */
226-
mp1_mailbox_send(ACPSMC_MSG_PllPowerState, ACP_AUDIOPLL_POWER_ON_REQ);
225+
/* Audio PLL is powered on in platform_init(). */
227226

228227
/* Enable clk tick count */
229228
clk_tick_config.u32All = acp_reg_read_via_smn(CLK_TICK_CNT_CONFIG_REG, sizeof(uint32_t));
@@ -257,8 +256,7 @@ void acp_clk_d3_sequence(void)
257256
acp_reg_write_via_smn(mmCLK6_CLK1_BYPASS_CNTL, bypass_cntl.u32All, sizeof(uint32_t));
258257
/* mp1_mailbox_send(ACPSMC_MSG_PllPowerState, ACP_AUDIOPLL_POWER_OFF_REQ); */
259258

260-
/* Send message to PMFW to power off Audio PLL */
261-
mp1_mailbox_send(ACPSMC_MSG_PllPowerState, ACP_AUDIOPLL_POWER_OFF_REQ_WITH_WOV_EN);
259+
/* Leave Audio PLL powered; D3 does not request PMFW power-off. */
262260
}
263261

264262
void change_clock_notify(uint32_t clock_freq)

‎src/platform/amd/acp_7_x/platform.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ LOG_MODULE_REGISTER(platform_file, CONFIG_SOF_LOG_LEVEL);
4242

4343
#define INTERRUPT_DISABLE 0
4444
extern void acp_dsp_to_host_intr_trig(void);
45+
extern uint32_t mp1_mailbox_send(uint32_t reg_id, uint32_t value);
4546
struct sof;
4647
static const struct sof_ipc_fw_ready ready
4748
__attribute__((section(".fw_ready"))) = {
@@ -149,6 +150,8 @@ int platform_init(struct sof *sof)
149150

150151
/*CONFIG_SYSTICK_PERIOD hardcoded as 200000*/
151152
sa_init(sof, 200000);
153+
mp1_mailbox_send(ACPSMC_MSG_PllPowerState, ACP_AUDIOPLL_POWER_ON_REQ);
154+
acp_change_clock_notify(CLK_MAX_CPU_HZ);
152155
clock_set_freq(CLK_CPU(cpu_get_id()), CLK_MAX_CPU_HZ);
153156
/* init DMA */
154157
ret = dmac_init(sof);

0 commit comments

Comments
 (0)