Skip to content

Commit

Permalink
ASoC: amd: acp: Refactor renoir platform resource structure
Browse files Browse the repository at this point in the history
Refactor renoir platform resource private structure to amd.h
header file.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250310183201.11979-14-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Venkata Prasad Potturu authored and Mark Brown committed Mar 11, 2025
1 parent ee7ab0f commit e167e5b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions sound/soc/amd/acp/acp-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
switch (pci->revision) {
case 0x01:
chip->name = "acp_asoc_renoir";
chip->rsrc = &rn_rsrc;
chip->acp_hw_ops_init = acp31_hw_ops_init;
chip->machines = snd_soc_acpi_amd_acp_machines;
break;
Expand Down
10 changes: 0 additions & 10 deletions sound/soc/amd/acp/acp-renoir.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@

#define DRV_NAME "acp_asoc_renoir"

static struct acp_resource rsrc = {
.offset = 20,
.no_of_ctrls = 1,
.irqp_used = 0,
.irq_reg_offset = 0x1800,
.scratch_reg_offset = 0x12800,
.sram_pte_offset = 0x02052800,
};

static struct snd_soc_dai_driver acp_renoir_dai[] = {
{
.name = "acp-i2s-sp",
Expand Down Expand Up @@ -121,7 +112,6 @@ static int renoir_audio_probe(struct platform_device *pdev)
}

chip->dev = dev;
chip->rsrc = &rsrc;
chip->dai_driver = acp_renoir_dai;
chip->num_dai = ARRAY_SIZE(acp_renoir_dai);

Expand Down
9 changes: 9 additions & 0 deletions sound/soc/amd/acp/amd.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@ enum acp_config {
ACP_CONFIG_20,
};

struct acp_resource rn_rsrc = {
.offset = 20,
.no_of_ctrls = 1,
.irqp_used = 0,
.irq_reg_offset = 0x1800,
.scratch_reg_offset = 0x12800,
.sram_pte_offset = 0x02052800,
};

struct acp_resource rmb_rsrc = {
.offset = 0,
.no_of_ctrls = 2,
Expand Down

0 comments on commit e167e5b

Please sign in to comment.