Skip to content

Commit e167e5b

Browse files
Venkata-Prasad-Potturubroonie
authored andcommitted
ASoC: amd: acp: Refactor renoir platform resource structure
Refactor renoir platform resource private structure to amd.h header file. Signed-off-by: Venkata Prasad Potturu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent ee7ab0f commit e167e5b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
135135
switch (pci->revision) {
136136
case 0x01:
137137
chip->name = "acp_asoc_renoir";
138+
chip->rsrc = &rn_rsrc;
138139
chip->acp_hw_ops_init = acp31_hw_ops_init;
139140
chip->machines = snd_soc_acpi_amd_acp_machines;
140141
break;

sound/soc/amd/acp/acp-renoir.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@
2727

2828
#define DRV_NAME "acp_asoc_renoir"
2929

30-
static struct acp_resource rsrc = {
31-
.offset = 20,
32-
.no_of_ctrls = 1,
33-
.irqp_used = 0,
34-
.irq_reg_offset = 0x1800,
35-
.scratch_reg_offset = 0x12800,
36-
.sram_pte_offset = 0x02052800,
37-
};
38-
3930
static struct snd_soc_dai_driver acp_renoir_dai[] = {
4031
{
4132
.name = "acp-i2s-sp",
@@ -121,7 +112,6 @@ static int renoir_audio_probe(struct platform_device *pdev)
121112
}
122113

123114
chip->dev = dev;
124-
chip->rsrc = &rsrc;
125115
chip->dai_driver = acp_renoir_dai;
126116
chip->num_dai = ARRAY_SIZE(acp_renoir_dai);
127117

sound/soc/amd/acp/amd.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,15 @@ enum acp_config {
238238
ACP_CONFIG_20,
239239
};
240240

241+
struct acp_resource rn_rsrc = {
242+
.offset = 20,
243+
.no_of_ctrls = 1,
244+
.irqp_used = 0,
245+
.irq_reg_offset = 0x1800,
246+
.scratch_reg_offset = 0x12800,
247+
.sram_pte_offset = 0x02052800,
248+
};
249+
241250
struct acp_resource rmb_rsrc = {
242251
.offset = 0,
243252
.no_of_ctrls = 2,

0 commit comments

Comments
 (0)