Skip to content

Commit ee7ab0f

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

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
@@ -140,6 +140,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
140140
break;
141141
case 0x6f:
142142
chip->name = "acp_asoc_rembrandt";
143+
chip->rsrc = &rmb_rsrc;
143144
chip->acp_hw_ops_init = acp6x_hw_ops_init;
144145
chip->machines = snd_soc_acpi_amd_rmb_acp_machines;
145146
break;

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,6 @@
3434
#define MP1_C2PMSG_85 0x3B10A54
3535
#define MP1_C2PMSG_93 0x3B10A74
3636

37-
static struct acp_resource rsrc = {
38-
.offset = 0,
39-
.no_of_ctrls = 2,
40-
.irqp_used = 1,
41-
.soc_mclk = true,
42-
.irq_reg_offset = 0x1a00,
43-
.scratch_reg_offset = 0x12800,
44-
.sram_pte_offset = 0x03802800,
45-
};
46-
4737
static struct snd_soc_dai_driver acp_rmb_dai[] = {
4838
{
4939
.name = "acp-i2s-sp",
@@ -171,11 +161,10 @@ static int rembrandt_audio_probe(struct platform_device *pdev)
171161
}
172162

173163
chip->dev = dev;
174-
chip->rsrc = &rsrc;
175164
chip->dai_driver = acp_rmb_dai;
176165
chip->num_dai = ARRAY_SIZE(acp_rmb_dai);
177166

178-
if (chip->is_i2s_config && rsrc.soc_mclk) {
167+
if (chip->is_i2s_config && chip->rsrc->soc_mclk) {
179168
ret = acp6x_master_clock_generate(dev);
180169
if (ret)
181170
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 rmb_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 acp63_rsrc = {
242252
.offset = 0,
243253
.no_of_ctrls = 2,

0 commit comments

Comments
 (0)