mirror of
https://github.com/torvalds/linux.git
synced 2026-10-10 04:18:03 +02:00
ASoC: SOF: amd: refactor SW1 I2S error reason clear in acp_irq_handler
Replace the open-coded pci_rev comparison with a switch statement for clearing ACP_SW1_I2S_ERROR_REASON. This makes the per-platform control explicit and easier to extend. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20260701095759.1012929-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
237efba38c
commit
571464f543
|
|
@ -540,8 +540,17 @@ static irqreturn_t acp_irq_handler(int irq, void *dev_id)
|
|||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->ext_intr_stat, ACP_ERROR_IRQ_MASK);
|
||||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->acp_sw0_i2s_err_reason, 0);
|
||||
/* ACP_SW1_I2S_ERROR_REASON is newly added register from rmb platform onwards */
|
||||
if (adata->pci_rev >= ACP_RMB_PCI_ID)
|
||||
switch (adata->pci_rev) {
|
||||
case ACP_RMB_PCI_ID:
|
||||
case ACP63_PCI_ID:
|
||||
case ACP70_PCI_ID:
|
||||
case ACP71_PCI_ID:
|
||||
case ACP72_PCI_ID:
|
||||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, ACP_SW1_I2S_ERROR_REASON, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
snd_sof_dsp_write(sdev, ACP_DSP_BAR, desc->acp_error_stat, 0);
|
||||
irq_flag = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user