Skip to content

Commit d08220b

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

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
145145
break;
146146
case 0x63:
147147
chip->name = "acp_asoc_acp63";
148+
chip->rsrc = &acp63_rsrc;
148149
chip->acp_hw_ops_init = acp63_hw_ops_init;
149150
chip->machines = snd_soc_acpi_amd_acp63_acp_machines;
150151
break;

sound/soc/amd/acp/acp63.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,6 @@ union clk_pll_req_no {
5252
u32 clk_pll_req_no_reg;
5353
};
5454

55-
static struct acp_resource rsrc = {
56-
.offset = 0,
57-
.no_of_ctrls = 2,
58-
.irqp_used = 1,
59-
.soc_mclk = true,
60-
.irq_reg_offset = 0x1a00,
61-
.scratch_reg_offset = 0x12800,
62-
.sram_pte_offset = 0x03802800,
63-
};
64-
6555
static struct snd_soc_dai_driver acp63_dai[] = {
6656
{
6757
.name = "acp-i2s-sp",
@@ -222,11 +212,10 @@ static int acp63_audio_probe(struct platform_device *pdev)
222212
}
223213

224214
chip->dev = dev;
225-
chip->rsrc = &rsrc;
226215
chip->dai_driver = acp63_dai;
227216
chip->num_dai = ARRAY_SIZE(acp63_dai);
228217

229-
if (chip->is_i2s_config && rsrc.soc_mclk) {
218+
if (chip->is_i2s_config && chip->rsrc->soc_mclk) {
230219
ret = acp63_i2s_master_clock_generate(chip);
231220
if (ret)
232221
return ret;

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 acp63_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 = 0x12800,
248+
.sram_pte_offset = 0x03802800,
249+
};
250+
241251
struct acp_resource acp70_rsrc = {
242252
.offset = 0,
243253
.no_of_ctrls = 2,

0 commit comments

Comments
 (0)