Skip to content

Commit f8b4f3f

Browse files
Venkata-Prasad-Potturubroonie
authored andcommitted
ASoC: amd: acp: Refactor acp70 platform resource structure
Refactor acp70 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 c8b5f25 commit f8b4f3f

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
151151
case 0x70:
152152
case 0x71:
153153
chip->name = "acp_asoc_acp70";
154+
chip->rsrc = &acp70_rsrc;
154155
chip->acp_hw_ops_init = acp70_hw_ops_init;
155156
chip->machines = snd_soc_acpi_amd_acp70_acp_machines;
156157
break;

sound/soc/amd/acp/acp70.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,6 @@
3030
#define CLK7_CLK0_DFS_CNTL_N1 0X0006C1A4
3131
#define CLK0_DIVIDER 0X19
3232

33-
static struct acp_resource rsrc = {
34-
.offset = 0,
35-
.no_of_ctrls = 2,
36-
.irqp_used = 1,
37-
.soc_mclk = true,
38-
.irq_reg_offset = 0x1a00,
39-
.scratch_reg_offset = 0x10000,
40-
.sram_pte_offset = 0x03800000,
41-
};
42-
4333
static struct snd_soc_dai_driver acp70_dai[] = {
4434
{
4535
.name = "acp-i2s-sp",
@@ -153,7 +143,6 @@ static int acp_acp70_audio_probe(struct platform_device *pdev)
153143
}
154144

155145
chip->dev = dev;
156-
chip->rsrc = &rsrc;
157146
chip->dai_driver = acp70_dai;
158147
chip->num_dai = ARRAY_SIZE(acp70_dai);
159148

sound/soc/amd/acp/amd.h

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

241+
struct acp_resource acp70_rsrc = {
242+
.offset = 0,
243+
.no_of_ctrls = 2,
244+
.irqp_used = 1,
245+
.soc_mclk = true,
246+
.irq_reg_offset = 0x1a00,
247+
.scratch_reg_offset = 0x10000,
248+
.sram_pte_offset = 0x03800000,
249+
};
250+
241251
struct snd_soc_acpi_codecs amp_rt1019 = {
242252
.num_codecs = 1,
243253
.codecs = {"10EC1019"}

0 commit comments

Comments
 (0)