mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Syed Saba Kareem <Syed.SabaKareem@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <Vijendar.Mukunda@amd.com>, <Basavaraj.Hiregoudar@amd.com>,
	<Sunil-kumar.Dommati@amd.com>, <mario.limonciello@amd.com>,
	<venkataprasad.potturu@amd.com>, <arungopal.kondaveeti@amd.com>,
	<mastan.katragadda@amd.com>, <juan.martinez@amd.com>,
	Syed Saba Kareem <Syed.SabaKareem@amd.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	"Jaroslav Kysela" <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	V Sujith Kumar Reddy <vsujithkumar.reddy@amd.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Jarkko Nikula <jarkko.nikula@bitmer.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 10/13] ASoC: amd: acp: change acp-deinit function arguments
Date: Sat, 21 Oct 2023 20:20:51 +0530	[thread overview]
Message-ID: <20231021145110.478744-10-Syed.SabaKareem@amd.com> (raw)
In-Reply-To: <20231021145110.478744-1-Syed.SabaKareem@amd.com>

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@amd.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


  parent reply	other threads:[~2023-10-21 14:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-21 14:50 [PATCH 01/13] ASoC: amd: acp: Add acp6.3 pci legacy driver support Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 02/13] ASoC: amd: acp: refactor acp i2s clock generation code Syed Saba Kareem
2023-10-23  7:37   ` Amadeusz Sławiński
2023-10-21 14:50 ` [PATCH 03/13] ASoC: amd: acp: add i2s clock generation support for acp6.3 based platforms Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 04/13] ASoC: amd: acp: add machine driver support for acp6.3 platform Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 05/13] ASoC: amd: acp: add Kconfig options for acp6.3 based platform driver Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 06/13] ASoC: amd: acp: add code for scanning acp pdm controller Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 07/13] ASoC: amd: acp: add platform and flag data to acp data structure Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 08/13] ASoC: amd: acp: add condition check for i2s clock generation Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 09/13] ASoC: amd: acp: add machine driver support for pdm use case Syed Saba Kareem
2023-10-27  8:49   ` Krzysztof Kozlowski
     [not found]     ` <3ec97548-1f91-49d0-adfb-4f8051ca9a97@amd.com>
     [not found]       ` <f8f8017c-4e76-4d70-918f-d7cb45186184@kernel.org>
     [not found]         ` <c0ea139c-9861-4ea1-b547-6e3c380301b3@amd.com>
     [not found]           ` <ZTvkCAYsrS62/82u@finisterre.sirena.org.uk>
2023-10-27 17:32             ` syed saba kareem
2023-10-28  9:14               ` Krzysztof Kozlowski
2023-10-21 14:50 ` Syed Saba Kareem [this message]
2023-10-21 14:50 ` [PATCH 11/13] ASoC: amd: acp: change acp power on mask macro value Syed Saba Kareem
2023-10-21 14:50 ` [PATCH 12/13] ASoC: amd: acp: Add pci legacy driver support for acp7.0 platform Syed Saba Kareem
2023-10-23  7:50   ` Amadeusz Sławiński
2023-10-26 10:04     ` syed saba kareem
2023-10-21 14:50 ` [PATCH 13/13] ASoC: amd: acp: add machine driver support for acp7.0 Syed Saba Kareem
2023-10-23  8:01 ` [PATCH 01/13] ASoC: amd: acp: Add acp6.3 pci legacy driver support Krzysztof Kozlowski
     [not found]   ` <12c8c0f3-8364-4f25-976e-8cca29b5e17f@amd.com>
2023-10-26 15:00     ` Krzysztof Kozlowski
2023-10-25 16:50 ` Mark Brown
2023-10-26  9:44   ` syed saba kareem
2023-10-26 15:12 ` Mark Brown

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=20231021145110.478744-10-Syed.SabaKareem@amd.com \
    --to=syed.sabakareem@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=arungopal.kondaveeti@amd.com \
    --cc=broonie@kernel.org \
    --cc=claudiu.beznea@microchip.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=juan.martinez@amd.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mastan.katragadda@amd.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=venkataprasad.potturu@amd.com \
    --cc=vsujithkumar.reddy@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

all inboxes | Powered by JetHome®