mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
ASoC: SOF: amd: refactor acp reset sequence
Below mentioned register sequence should be part of acp init sequence. 1) Set ACP clock mux selection register to ACP_ACLK clock source. 2) Enable ACP global interrupt enable register 3) Enable ACP error interrupt mask. ACP reset sequence should contain code related to asserting acp soft reset and release the soft reset. Move the rest of the registers programming to acp init sequence. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-7-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
cc489cced1
commit
169c5e444b
|
|
@ -511,7 +511,6 @@ static int acp_power_on(struct snd_sof_dev *sdev)
|
|||
|
||||
static int acp_reset(struct snd_sof_dev *sdev)
|
||||
{
|
||||
const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata);
|
||||
unsigned int val;
|
||||
int ret;
|
||||
|
||||
|
|
@ -532,14 +531,6 @@ static int acp_reset(struct snd_sof_dev *sdev)
|
|||
if (ret < 0)
|
||||
dev_err(sdev->dev, "timeout in releasing reset\n");
|
||||
|
||||
if (desc->acp_clkmux_sel)
|
||||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->acp_clkmux_sel, ACP_CLOCK_ACLK);
|
||||
|
||||
if (desc->ext_intr_enb)
|
||||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->ext_intr_enb, 0x01);
|
||||
|
||||
if (desc->ext_intr_cntl)
|
||||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->ext_intr_cntl, ACP_ERROR_IRQ_MASK);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -570,6 +561,7 @@ static int acp_dsp_reset(struct snd_sof_dev *sdev)
|
|||
|
||||
static int acp_init(struct snd_sof_dev *sdev)
|
||||
{
|
||||
const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata);
|
||||
struct acp_dev_data *acp_data;
|
||||
int ret;
|
||||
|
||||
|
|
@ -586,6 +578,16 @@ static int acp_init(struct snd_sof_dev *sdev)
|
|||
ret = acp_reset(sdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (desc->acp_clkmux_sel)
|
||||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->acp_clkmux_sel, ACP_CLOCK_ACLK);
|
||||
|
||||
if (desc->ext_intr_enb)
|
||||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->ext_intr_enb, 0x01);
|
||||
|
||||
if (desc->ext_intr_cntl)
|
||||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->ext_intr_cntl, ACP_ERROR_IRQ_MASK);
|
||||
|
||||
switch (acp_data->pci_rev) {
|
||||
case ACP70_PCI_ID:
|
||||
case ACP71_PCI_ID:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user