Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: amd: vangogh: Add check for acp config flags in vangogh platform

We have SOF and generic ACP support enabled for Vangogh platform
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 Vangogh based machines. If no flag is
specified probe and register older platform device.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230530110802.674939-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Venkata Prasad Potturu and committed by
Mark Brown
e89f45ed 13e75f4b

+8 -1
+2
sound/soc/amd/vangogh/acp5x.h
··· 147 147 writel(val, base_addr - ACP5x_PHY_BASE_ADDRESS); 148 148 } 149 149 150 + int snd_amd_acp_find_config(struct pci_dev *pci); 151 + 150 152 static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd, 151 153 int direction) 152 154 {
+6 -1
sound/soc/amd/vangogh/pci-acp5x.c
··· 125 125 { 126 126 struct acp5x_dev_data *adata; 127 127 struct platform_device_info pdevinfo[ACP5x_DEVS]; 128 - unsigned int irqflags; 128 + unsigned int irqflags, flag; 129 129 int ret, i; 130 130 u32 addr, val; 131 + 132 + /* Return if acp config flag is defined */ 133 + flag = snd_amd_acp_find_config(pci); 134 + if (flag) 135 + return -ENODEV; 131 136 132 137 irqflags = IRQF_SHARED; 133 138 if (pci->revision != 0x50)