Skip to content

Commit 425f598

Browse files
vijendarmukundavinodkoul
authored andcommitted
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 <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 1bb50ea commit 425f598

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

sound/soc/amd/ps/acp63.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ struct sdw_dma_ring_buf_reg {
231231
* @sdw_en_stat: flag set to true when any one of the SoundWire manager instance is enabled
232232
* @addr: pci ioremap address
233233
* @reg_range: ACP reigister range
234+
* @acp_rev: ACP PCI revision id
234235
* @sdw0-dma_intr_stat: DMA interrupt status array for SoundWire manager-SW0 instance
235236
* @sdw_dma_intr_stat: DMA interrupt status array for SoundWire manager-SW1 instance
236237
*/
@@ -254,6 +255,7 @@ struct acp63_dev_data {
254255
bool sdw_en_stat;
255256
u32 addr;
256257
u32 reg_range;
258+
u32 acp_rev;
257259
u16 sdw0_dma_intr_stat[ACP63_SDW0_DMA_MAX_STREAMS];
258260
u16 sdw1_dma_intr_stat[ACP63_SDW1_DMA_MAX_STREAMS];
259261
};

sound/soc/amd/ps/pci-ps.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ static int amd_sdw_probe(struct device *dev)
267267
sdw_res.acp_lock = &acp_data->acp_lock;
268268
sdw_res.count = acp_data->info.count;
269269
sdw_res.mmio_base = acp_data->acp63_base;
270+
sdw_res.acp_rev = acp_data->acp_rev;
270271
sdw_res.link_mask = acp_data->info.link_mask;
271272
ret = sdw_amd_probe(&sdw_res, &acp_data->sdw);
272273
if (ret)
@@ -576,6 +577,7 @@ static int snd_acp63_probe(struct pci_dev *pci,
576577
}
577578
adata->addr = addr;
578579
adata->reg_range = ACP63_REG_END - ACP63_REG_START;
580+
adata->acp_rev = pci->revision;
579581
pci_set_master(pci);
580582
pci_set_drvdata(pci, adata);
581583
mutex_init(&adata->acp_lock);

0 commit comments

Comments
 (0)