]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: amd: acp: Refactor renoir platform resource structure
authorVenkata Prasad Potturu <venkataprasad.potturu@amd.com>
Mon, 10 Mar 2025 18:32:00 +0000 (00:02 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 11 Mar 2025 17:18:34 +0000 (17:18 +0000)
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>
sound/soc/amd/acp/acp-pci.c
sound/soc/amd/acp/acp-renoir.c
sound/soc/amd/acp/amd.h

index 6dd905e75f1d1257aaf8f2e1fb9e475fea20cba2..9322379cb36fcc36ff4623afe2d0af3c0b78a1bc 100644 (file)
@@ -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;
index 970ca613a43945e310d01f3b4371dc914b9805a2..b8ded929d52e0b7afdc9fe131596a24a7bfb3e73 100644 (file)
 
 #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",
@@ -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);
 
index 0cb6d2abf832436e4d7812e9e68c6e967b93335c..796f8efd395c0fe23d94612aa32de5c73b05bdf3 100644 (file)
@@ -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,