Commit 1b6180c0 authored by Syed Saba Kareem's avatar Syed Saba Kareem Committed by Mark Brown

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: default avatarSyed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-10-Syed.SabaKareem@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 39d9ee47
...@@ -320,16 +320,16 @@ int acp_init(struct acp_chip_info *chip) ...@@ -320,16 +320,16 @@ int acp_init(struct acp_chip_info *chip)
} }
EXPORT_SYMBOL_NS_GPL(acp_init, SND_SOC_ACP_COMMON); 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; int ret;
/* Reset */ /* Reset */
ret = acp_reset(base); ret = acp_reset(chip->base);
if (ret) if (ret)
return ret; return ret;
writel(0, base + ACP_CONTROL); writel(0, chip->base + ACP_CONTROL);
return 0; return 0;
} }
EXPORT_SYMBOL_NS_GPL(acp_deinit, SND_SOC_ACP_COMMON); EXPORT_SYMBOL_NS_GPL(acp_deinit, SND_SOC_ACP_COMMON);
......
...@@ -178,7 +178,7 @@ static int __maybe_unused snd_acp_suspend(struct device *dev) ...@@ -178,7 +178,7 @@ static int __maybe_unused snd_acp_suspend(struct device *dev)
int ret; int ret;
chip = dev_get_drvdata(dev); chip = dev_get_drvdata(dev);
ret = acp_deinit(chip->base); ret = acp_deinit(chip);
if (ret) if (ret)
dev_err(dev, "ACP de-init failed\n"); dev_err(dev, "ACP de-init failed\n");
return ret; return ret;
...@@ -219,7 +219,7 @@ static void acp_pci_remove(struct pci_dev *pci) ...@@ -219,7 +219,7 @@ static void acp_pci_remove(struct pci_dev *pci)
platform_device_unregister(dmic_dev); platform_device_unregister(dmic_dev);
if (pdev) if (pdev)
platform_device_unregister(pdev); platform_device_unregister(pdev);
ret = acp_deinit(chip->base); ret = acp_deinit(chip);
if (ret) if (ret)
dev_err(&pci->dev, "ACP de-init failed\n"); dev_err(&pci->dev, "ACP de-init failed\n");
} }
......
...@@ -222,7 +222,7 @@ int smn_read(struct pci_dev *dev, u32 smn_addr); ...@@ -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 smn_write(struct pci_dev *dev, u32 smn_addr, u32 data);
int acp_init(struct acp_chip_info *chip); 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_enable_interrupts(struct acp_dev_data *adata);
void acp_disable_interrupts(struct acp_dev_data *adata); void acp_disable_interrupts(struct acp_dev_data *adata);
/* Machine configuration */ /* Machine configuration */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment