Skip to content
Permalink
Browse files
ASoC: amd: renoir: Add check for acp configuration flags.
We have SOF and generic ACP support enabled for Renoir platforms
on some machines. Since we have same PCI id used for probing, add
check for machine configuration flag to avoid conflict with newer
pci drivers. Such machine flag has been initialized via dmi match
on few Chrome machines. If no flag is specified probe and register
older platform device.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
  • Loading branch information
ajitkupandey authored and intel-lab-lkp committed Jan 13, 2022
1 parent c75c566 commit bc740a222d4191f55c5f7a197e919e94a5f63419
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
@@ -212,10 +212,15 @@ static int snd_rn_acp_probe(struct pci_dev *pci,
acpi_integer dmic_status;
#endif
const struct dmi_system_id *dmi_id;
unsigned int irqflags;
unsigned int irqflags, flag;
int ret, index;
u32 addr;

/* Return if acp config flag is defined */
flag = snd_amd_acp_find_config(pci);
if (flag)
return -ENODEV;

/* Renoir device check */
if (pci->revision != 0x01)
return -ENODEV;
@@ -88,3 +88,6 @@ static inline void rn_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP_PHY_BASE_ADDRESS);
}

/* Machine configuration */
int snd_amd_acp_find_config(struct pci_dev *pci);

0 comments on commit bc740a2

Please sign in to comment.