summaryrefslogtreecommitdiff
path: root/sound/soc/amd/acp/acp-legacy-common.c
diff options
context:
space:
mode:
authorSyed Saba Kareem <Syed.SabaKareem@amd.com>2023-06-26 19:25:06 +0530
committerMark Brown <broonie@kernel.org>2023-07-09 22:47:34 +0100
commit7ad6fb9dd1ca63f9f36e413036f36f075cdaec4a (patch)
tree274d69f4225e68f6df35b32586af3cd8a432b1d1 /sound/soc/amd/acp/acp-legacy-common.c
parente61b415515d3db57dce3af3e4a0441f08d8d8f15 (diff)
downloadlwn-7ad6fb9dd1ca63f9f36e413036f36f075cdaec4a.tar.gz
lwn-7ad6fb9dd1ca63f9f36e413036f36f075cdaec4a.zip
ASoC: amd: acp: add acp i2s master clock generation for rembrandt platform
Add acp i2s master clock generation logic for rembrandt platform. Signed-off-by: V Sujith Kumar Reddy <vsujithkumar.reddy@amd.com> Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Link: https://lore.kernel.org/r/20230626135515.1252063-3-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/acp/acp-legacy-common.c')
-rw-r--r--sound/soc/amd/acp/acp-legacy-common.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/soc/amd/acp/acp-legacy-common.c b/sound/soc/amd/acp/acp-legacy-common.c
index 5b7000eae693..4302d8db88a4 100644
--- a/sound/soc/amd/acp/acp-legacy-common.c
+++ b/sound/soc/amd/acp/acp-legacy-common.c
@@ -13,6 +13,7 @@
*/
#include "amd.h"
+#include <linux/pci.h>
#include <linux/export.h>
static int acp_power_on(struct acp_chip_info *chip)
@@ -96,4 +97,22 @@ int acp_deinit(void __iomem *base)
}
EXPORT_SYMBOL_NS_GPL(acp_deinit, SND_SOC_ACP_COMMON);
+int smn_write(struct pci_dev *dev, u32 smn_addr, u32 data)
+{
+ pci_write_config_dword(dev, 0x60, smn_addr);
+ pci_write_config_dword(dev, 0x64, data);
+ return 0;
+}
+EXPORT_SYMBOL_NS_GPL(smn_write, SND_SOC_ACP_COMMON);
+
+int smn_read(struct pci_dev *dev, u32 smn_addr)
+{
+ u32 data;
+
+ pci_write_config_dword(dev, 0x60, smn_addr);
+ pci_read_config_dword(dev, 0x64, &data);
+ return data;
+}
+EXPORT_SYMBOL_NS_GPL(smn_read, SND_SOC_ACP_COMMON);
+
MODULE_LICENSE("Dual BSD/GPL");