From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
alsa-devel@alsa-project.org
Subject: [PATCH AUTOSEL 5.15 04/23] ASoC: amd: vangogh: Add check for acp config flags in vangogh platform
Date: Sun, 23 Jul 2023 21:23:15 -0400 [thread overview]
Message-ID: <20230724012334.2317140-4-sashal@kernel.org> (raw)
In-Reply-To: <20230724012334.2317140-1-sashal@kernel.org>
From: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
[ Upstream commit e89f45edb747ed88e97a5771dd6d3dd1eb517873 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/vangogh/acp5x.h | 2 ++
sound/soc/amd/vangogh/pci-acp5x.c | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/vangogh/acp5x.h b/sound/soc/amd/vangogh/acp5x.h
index a808635f97400..ac9827393c453 100644
--- a/sound/soc/amd/vangogh/acp5x.h
+++ b/sound/soc/amd/vangogh/acp5x.h
@@ -145,6 +145,8 @@ static inline void acp_writel(u32 val, void __iomem *base_addr)
writel(val, base_addr - ACP5x_PHY_BASE_ADDRESS);
}
+int snd_amd_acp_find_config(struct pci_dev *pci);
+
static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
int direction)
{
diff --git a/sound/soc/amd/vangogh/pci-acp5x.c b/sound/soc/amd/vangogh/pci-acp5x.c
index a57b762d9f2e1..1b4bf357f2015 100644
--- a/sound/soc/amd/vangogh/pci-acp5x.c
+++ b/sound/soc/amd/vangogh/pci-acp5x.c
@@ -121,10 +121,15 @@ static int snd_acp5x_probe(struct pci_dev *pci,
{
struct acp5x_dev_data *adata;
struct platform_device_info pdevinfo[ACP5x_DEVS];
- unsigned int irqflags;
+ unsigned int irqflags, flag;
int ret, i;
u32 addr, val;
+ /* Return if acp config flag is defined */
+ flag = snd_amd_acp_find_config(pci);
+ if (flag)
+ return -ENODEV;
+
irqflags = IRQF_SHARED;
if (pci->revision != 0x50)
return -ENODEV;
--
2.39.2
next prev parent reply other threads:[~2023-07-24 1:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 1:23 [PATCH AUTOSEL 5.15 01/23] drm/radeon: Fix integer overflow in radeon_cs_parser_init Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 02/23] ALSA: emu10k1: roll up loops in DSP setup code for Audigy Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 03/23] PCI: tegra194: Fix possible array out of bounds access Sasha Levin
2023-07-24 1:23 ` Sasha Levin [this message]
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 05/23] ARM: dts: imx6dl: prtrvt, prtvt7, prti6q, prtwd2: fix USB related warnings Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 06/23] iopoll: Call cpu_relax() in busy loops Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 07/23] quota: Properly disable quotas when add_dquot_ref() fails Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 08/23] quota: fix warning in dqgrab() Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 09/23] ALSA: hda: Add Loongson LS7A HD-Audio support Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 10/23] ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusion Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 11/23] dma-remap: use kvmalloc_array/kvfree for larger dma memory remap Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 12/23] HID: logitech-hidpp: Add USB and Bluetooth IDs for the Logitech G915 TKL Keyboard Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 13/23] drm/amdgpu: install stub fence into potential unused fence pointers Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 14/23] HID: add quirk for 03f0:464a HP Elite Presenter Mouse Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 15/23] RDMA/mlx5: Return the firmware result upon destroying QP/RQ Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 16/23] ASoC: SOF: core: Free the firmware trace before calling snd_sof_shutdown() Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 17/23] ovl: check type and offset of struct vfsmount in ovl_entry Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 18/23] udf: Fix uninitialized array access for some pathnames Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 19/23] ALSA: hda/realtek: Add quirks for ROG ALLY CS35l41 audio Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 20/23] fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 21/23] MIPS: dec: prom: Address -Warray-bounds warning Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 22/23] FS: JFS: Fix null-ptr-deref Read in txBegin Sasha Levin
2023-07-24 1:23 ` [PATCH AUTOSEL 5.15 23/23] FS: JFS: Check for read-only mounted filesystem " Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230724012334.2317140-4-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=venkataprasad.potturu@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox