From: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Sunil-kumar.Dommati@amd.com,
Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>,
open list <linux-kernel@vger.kernel.org>,
Basavaraj.Hiregoudar@amd.com, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mario Limonciello <mario.limonciello@amd.com>,
Vijendar.Mukunda@amd.com, Alexander.Deucher@amd.com,
Mark Pearson <markpearson@lenovo.com>
Subject: [PATCH v2 6/6] ASoC: amd: renoir: Add check for acp configuration flags.
Date: Thu, 13 Jan 2022 22:03:48 +0530 [thread overview]
Message-ID: <20220113163348.434108-7-AjitKumar.Pandey@amd.com> (raw)
In-Reply-To: <20220113163348.434108-1-AjitKumar.Pandey@amd.com>
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>
---
sound/soc/amd/renoir/rn-pci-acp3x.c | 7 ++++++-
sound/soc/amd/renoir/rn_acp3x.h | 3 +++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/renoir/rn-pci-acp3x.c b/sound/soc/amd/renoir/rn-pci-acp3x.c
index 7b8040e812a1..b3812b70f5f9 100644
--- a/sound/soc/amd/renoir/rn-pci-acp3x.c
+++ b/sound/soc/amd/renoir/rn-pci-acp3x.c
@@ -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;
diff --git a/sound/soc/amd/renoir/rn_acp3x.h b/sound/soc/amd/renoir/rn_acp3x.h
index 14620399d766..ca586603d720 100644
--- a/sound/soc/amd/renoir/rn_acp3x.h
+++ b/sound/soc/amd/renoir/rn_acp3x.h
@@ -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);
--
2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <Vijendar.Mukunda@amd.com>, <Alexander.Deucher@amd.com>,
<Basavaraj.Hiregoudar@amd.com>, <Sunil-kumar.Dommati@amd.com>,
"Ajit Kumar Pandey" <AjitKumar.Pandey@amd.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Mark Pearson <markpearson@lenovo.com>,
Mario Limonciello <mario.limonciello@amd.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 6/6] ASoC: amd: renoir: Add check for acp configuration flags.
Date: Thu, 13 Jan 2022 22:03:48 +0530 [thread overview]
Message-ID: <20220113163348.434108-7-AjitKumar.Pandey@amd.com> (raw)
In-Reply-To: <20220113163348.434108-1-AjitKumar.Pandey@amd.com>
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>
---
sound/soc/amd/renoir/rn-pci-acp3x.c | 7 ++++++-
sound/soc/amd/renoir/rn_acp3x.h | 3 +++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/renoir/rn-pci-acp3x.c b/sound/soc/amd/renoir/rn-pci-acp3x.c
index 7b8040e812a1..b3812b70f5f9 100644
--- a/sound/soc/amd/renoir/rn-pci-acp3x.c
+++ b/sound/soc/amd/renoir/rn-pci-acp3x.c
@@ -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;
diff --git a/sound/soc/amd/renoir/rn_acp3x.h b/sound/soc/amd/renoir/rn_acp3x.h
index 14620399d766..ca586603d720 100644
--- a/sound/soc/amd/renoir/rn_acp3x.h
+++ b/sound/soc/amd/renoir/rn_acp3x.h
@@ -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);
--
2.25.1
next prev parent reply other threads:[~2022-01-13 16:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 16:33 [PATCH v2 0/6] ASOC: amd: acp: Add generic PDM and PCI driver support for ACP Ajit Kumar Pandey
2022-01-13 16:33 ` [PATCH v2 1/6] ASoC: amd: acp: Add generic support for PDM controller on ACP Ajit Kumar Pandey
2022-01-13 16:33 ` Ajit Kumar Pandey
2022-01-13 18:34 ` Pierre-Louis Bossart
2022-01-13 18:34 ` Pierre-Louis Bossart
2022-01-17 11:48 ` Ajit Kumar Pandey
2022-01-17 11:48 ` Ajit Kumar Pandey
2022-01-13 16:33 ` [PATCH v2 2/6] ASoC: amd: acp: Add PDM controller based dmic dai for Renoir Ajit Kumar Pandey
2022-01-13 16:33 ` Ajit Kumar Pandey
2022-01-13 16:33 ` [PATCH v2 3/6] ASoC: amd: acp: Add generic PCI driver module for ACP device Ajit Kumar Pandey
2022-01-13 16:33 ` Ajit Kumar Pandey
2022-01-13 18:36 ` Pierre-Louis Bossart
2022-01-13 18:36 ` Pierre-Louis Bossart
2022-01-13 16:33 ` [PATCH v2 4/6] ASoC: amd: acp: Add ACP init()/deinit() callback for Renoir Ajit Kumar Pandey
2022-01-13 16:33 ` Ajit Kumar Pandey
2022-01-14 9:01 ` Amadeusz Sławiński
2022-01-14 9:01 ` Amadeusz Sławiński
2022-01-17 11:50 ` Ajit Kumar Pandey
2022-01-17 11:50 ` Ajit Kumar Pandey
2022-01-13 16:33 ` [PATCH v2 5/6] ASoC: amd: acp: acp-legacy: Add DMIC dai link support " Ajit Kumar Pandey
2022-01-13 16:33 ` Ajit Kumar Pandey
2022-01-13 18:38 ` Pierre-Louis Bossart
2022-01-13 18:38 ` Pierre-Louis Bossart
2022-01-13 16:33 ` Ajit Kumar Pandey [this message]
2022-01-13 16:33 ` [PATCH v2 6/6] ASoC: amd: renoir: Add check for acp configuration flags Ajit Kumar Pandey
2022-01-16 22:55 ` kernel test robot
2022-01-17 5:12 ` kernel test robot
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=20220113163348.434108-7-AjitKumar.Pandey@amd.com \
--to=ajitkumar.pandey@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=markpearson@lenovo.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.