[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250310104601.7325-14-venkataprasad.potturu@amd.com>
Date: Mon, 10 Mar 2025 16:16:00 +0530
From: Venkata Prasad Potturu <venkataprasad.potturu@....com>
To: <broonie@...nel.org>, <alsa-devel@...a-project.org>
CC: <Vijendar.Mukunda@....com>, <mario.limonciello@....com>,
<Basavaraj.Hiregoudar@....com>, <Sunil-kumar.Dommati@....com>,
<syed.sabakareem@....com>, Venkata Prasad Potturu
<venkataprasad.potturu@....com>, Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, Greg KH
<gregkh@...uxfoundation.org>, Peter Zijlstra <peterz@...radead.org>, "Jeff
Johnson" <quic_jjohnson@...cinc.com>, Uwe Kleine-König
<u.kleine-koenig@...libre.com>, "open list:SOUND - SOC LAYER / DYNAMIC AUDIO
POWER MANAGEM..." <linux-sound@...r.kernel.org>, open list
<linux-kernel@...r.kernel.org>
Subject: [PATCH 13/14] ASoC: amd: acp: Refactor renoir platform resource structure
Refactor renoir platform resource private structure to amd.h
header file.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@....com>
---
sound/soc/amd/acp/acp-pci.c | 1 +
sound/soc/amd/acp/acp-renoir.c | 10 ----------
sound/soc/amd/acp/amd.h | 9 +++++++++
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c
index cf4794cc2f54..c6ae6e947338 100644
--- a/sound/soc/amd/acp/acp-pci.c
+++ b/sound/soc/amd/acp/acp-pci.c
@@ -135,6 +135,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
switch (pci->revision) {
case 0x01:
chip->name = "acp_asoc_renoir";
+ chip->rsrc = &rn_rsrc;
chip->acp_hw_ops_init = acp31_hw_ops_init;
chip->machines = snd_soc_acpi_amd_acp_machines;
break;
diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c
index 970ca613a439..b8ded929d52e 100644
--- a/sound/soc/amd/acp/acp-renoir.c
+++ b/sound/soc/amd/acp/acp-renoir.c
@@ -27,15 +27,6 @@
#define DRV_NAME "acp_asoc_renoir"
-static struct acp_resource rsrc = {
- .offset = 20,
- .no_of_ctrls = 1,
- .irqp_used = 0,
- .irq_reg_offset = 0x1800,
- .scratch_reg_offset = 0x12800,
- .sram_pte_offset = 0x02052800,
-};
-
static struct snd_soc_dai_driver acp_renoir_dai[] = {
{
.name = "acp-i2s-sp",
@@ -121,7 +112,6 @@ static int renoir_audio_probe(struct platform_device *pdev)
}
chip->dev = dev;
- chip->rsrc = &rsrc;
chip->dai_driver = acp_renoir_dai;
chip->num_dai = ARRAY_SIZE(acp_renoir_dai);
diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h
index 67bc6b84564e..4015facac7b7 100644
--- a/sound/soc/amd/acp/amd.h
+++ b/sound/soc/amd/acp/amd.h
@@ -238,6 +238,15 @@ enum acp_config {
ACP_CONFIG_20,
};
+struct acp_resource rn_rsrc = {
+ .offset = 20,
+ .no_of_ctrls = 1,
+ .irqp_used = 0,
+ .irq_reg_offset = 0x1800,
+ .scratch_reg_offset = 0x12800,
+ .sram_pte_offset = 0x02052800,
+};
+
struct acp_resource rmb_rsrc = {
.offset = 0,
.no_of_ctrls = 2,
--
2.39.2
Powered by blists - more mailing lists