[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231021145110.478744-10-Syed.SabaKareem@amd.com>
Date: Sat, 21 Oct 2023 20:20:51 +0530
From: Syed Saba Kareem <Syed.SabaKareem@....com>
To: <broonie@...nel.org>, <alsa-devel@...a-project.org>
CC: <Vijendar.Mukunda@....com>, <Basavaraj.Hiregoudar@....com>,
<Sunil-kumar.Dommati@....com>, <mario.limonciello@....com>,
<venkataprasad.potturu@....com>, <arungopal.kondaveeti@....com>,
<mastan.katragadda@....com>, <juan.martinez@....com>,
Syed Saba Kareem <Syed.SabaKareem@....com>,
Liam Girdwood <lgirdwood@...il.com>,
"Jaroslav Kysela" <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
V Sujith Kumar Reddy <vsujithkumar.reddy@....com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
Jarkko Nikula <jarkko.nikula@...mer.com>,
open list <linux-kernel@...r.kernel.org>
Subject: [PATCH 10/13] ASoC: amd: acp: change acp-deinit function arguments
acp-deinit function will not be same for all platforms.
To make platform specific changes in acp-deinit
function, instead of passing base address pass chip
structure which contains acp_rev feild.
chip->acp_rev will be used to add platform specific code
in acp-deinit().
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@....com>
---
sound/soc/amd/acp/acp-legacy-common.c | 6 +++---
sound/soc/amd/acp/acp-pci.c | 4 ++--
sound/soc/amd/acp/amd.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/amd/acp/acp-legacy-common.c b/sound/soc/amd/acp/acp-legacy-common.c
index af85a153a770..cba0aabefb34 100644
--- a/sound/soc/amd/acp/acp-legacy-common.c
+++ b/sound/soc/amd/acp/acp-legacy-common.c
@@ -320,16 +320,16 @@ int acp_init(struct acp_chip_info *chip)
}
EXPORT_SYMBOL_NS_GPL(acp_init, SND_SOC_ACP_COMMON);
-int acp_deinit(void __iomem *base)
+int acp_deinit(struct acp_chip_info *chip)
{
int ret;
/* Reset */
- ret = acp_reset(base);
+ ret = acp_reset(chip->base);
if (ret)
return ret;
- writel(0, base + ACP_CONTROL);
+ writel(0, chip->base + ACP_CONTROL);
return 0;
}
EXPORT_SYMBOL_NS_GPL(acp_deinit, SND_SOC_ACP_COMMON);
diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c
index bbf079d47dc4..696c9ee6786f 100644
--- a/sound/soc/amd/acp/acp-pci.c
+++ b/sound/soc/amd/acp/acp-pci.c
@@ -178,7 +178,7 @@ static int __maybe_unused snd_acp_suspend(struct device *dev)
int ret;
chip = dev_get_drvdata(dev);
- ret = acp_deinit(chip->base);
+ ret = acp_deinit(chip);
if (ret)
dev_err(dev, "ACP de-init failed\n");
return ret;
@@ -219,7 +219,7 @@ static void acp_pci_remove(struct pci_dev *pci)
platform_device_unregister(dmic_dev);
if (pdev)
platform_device_unregister(pdev);
- ret = acp_deinit(chip->base);
+ ret = acp_deinit(chip);
if (ret)
dev_err(&pci->dev, "ACP de-init failed\n");
}
diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h
index 62d0793027f2..e3bb470d1f32 100644
--- a/sound/soc/amd/acp/amd.h
+++ b/sound/soc/amd/acp/amd.h
@@ -222,7 +222,7 @@ int smn_read(struct pci_dev *dev, u32 smn_addr);
int smn_write(struct pci_dev *dev, u32 smn_addr, u32 data);
int acp_init(struct acp_chip_info *chip);
-int acp_deinit(void __iomem *base);
+int acp_deinit(struct acp_chip_info *chip);
void acp_enable_interrupts(struct acp_dev_data *adata);
void acp_disable_interrupts(struct acp_dev_data *adata);
/* Machine configuration */
--
2.25.1
Powered by blists - more mailing lists