summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2024-09-24 10:18:46 +0200
committerVinod Koul <vkoul@kernel.org>2024-10-03 09:14:41 +0200
commit425f598ea69713b9e60f08e48a19be56b7bfddbc (patch)
treee3dbe16779dbf1b3f5da05a6d8939ed199f0a6b1
parentASoC: SOF: amd: pass acp_rev as soundwire resource data (diff)
downloadlinux-425f598ea69713b9e60f08e48a19be56b7bfddbc.tar.xz
linux-425f598ea69713b9e60f08e48a19be56b7bfddbc.zip
ASoC: amd: ps: pass acp pci revision id as soundwire resource data
Add acp_rev as structure member in acp pci driver private data structure to store acp pci revision id and assign this variable to SoundWire resource data acp_rev variable. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20240924081846.1834612-5-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--sound/soc/amd/ps/acp63.h2
-rw-r--r--sound/soc/amd/ps/pci-ps.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/amd/ps/acp63.h b/sound/soc/amd/ps/acp63.h
index 39208305dd6c..e54eabaa4d3e 100644
--- a/sound/soc/amd/ps/acp63.h
+++ b/sound/soc/amd/ps/acp63.h
@@ -231,6 +231,7 @@ struct sdw_dma_ring_buf_reg {
* @sdw_en_stat: flag set to true when any one of the SoundWire manager instance is enabled
* @addr: pci ioremap address
* @reg_range: ACP reigister range
+ * @acp_rev: ACP PCI revision id
* @sdw0-dma_intr_stat: DMA interrupt status array for SoundWire manager-SW0 instance
* @sdw_dma_intr_stat: DMA interrupt status array for SoundWire manager-SW1 instance
*/
@@ -254,6 +255,7 @@ struct acp63_dev_data {
bool sdw_en_stat;
u32 addr;
u32 reg_range;
+ u32 acp_rev;
u16 sdw0_dma_intr_stat[ACP63_SDW0_DMA_MAX_STREAMS];
u16 sdw1_dma_intr_stat[ACP63_SDW1_DMA_MAX_STREAMS];
};
diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c
index c72d666d51bd..0c3bb1da5097 100644
--- a/sound/soc/amd/ps/pci-ps.c
+++ b/sound/soc/amd/ps/pci-ps.c
@@ -267,6 +267,7 @@ static int amd_sdw_probe(struct device *dev)
sdw_res.acp_lock = &acp_data->acp_lock;
sdw_res.count = acp_data->info.count;
sdw_res.mmio_base = acp_data->acp63_base;
+ sdw_res.acp_rev = acp_data->acp_rev;
sdw_res.link_mask = acp_data->info.link_mask;
ret = sdw_amd_probe(&sdw_res, &acp_data->sdw);
if (ret)
@@ -576,6 +577,7 @@ static int snd_acp63_probe(struct pci_dev *pci,
}
adata->addr = addr;
adata->reg_range = ACP63_REG_END - ACP63_REG_START;
+ adata->acp_rev = pci->revision;
pci_set_master(pci);
pci_set_drvdata(pci, adata);
mutex_init(&adata->acp_lock);