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

index 8bb93ca18053acabf5e0a3fb8629f3148ec96136..6728eee29993a0cc2bbf3d94687b27ef4ef83edd 100644 (file)
@@ -151,6 +151,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
        case 0x70:
        case 0x71:
                chip->name = "acp_asoc_acp70";
+               chip->rsrc = &acp70_rsrc;
                chip->acp_hw_ops_init = acp70_hw_ops_init;
                chip->machines = snd_soc_acpi_amd_acp70_acp_machines;
                break;
index c1b546df5e67bfab0d364110ceec05b701ec508f..1a89f8a3724f9dbe383a8397f2ca51bc5bb40363 100644 (file)
 #define CLK7_CLK0_DFS_CNTL_N1          0X0006C1A4
 #define CLK0_DIVIDER                   0X19
 
-static struct acp_resource rsrc = {
-       .offset = 0,
-       .no_of_ctrls = 2,
-       .irqp_used = 1,
-       .soc_mclk = true,
-       .irq_reg_offset = 0x1a00,
-       .scratch_reg_offset = 0x10000,
-       .sram_pte_offset = 0x03800000,
-};
-
 static struct snd_soc_dai_driver acp70_dai[] = {
 {
        .name = "acp-i2s-sp",
@@ -153,7 +143,6 @@ static int acp_acp70_audio_probe(struct platform_device *pdev)
        }
 
        chip->dev = dev;
-       chip->rsrc = &rsrc;
        chip->dai_driver = acp70_dai;
        chip->num_dai = ARRAY_SIZE(acp70_dai);
 
index 084d9db1b65cd31924a5ad11fcfafe5ede70a338..979d8b8801a3625ef464ad8828cd4c36686c5f3f 100644 (file)
@@ -238,6 +238,16 @@ enum acp_config {
        ACP_CONFIG_20,
 };
 
+struct acp_resource acp70_rsrc = {
+       .offset = 0,
+       .no_of_ctrls = 2,
+       .irqp_used = 1,
+       .soc_mclk = true,
+       .irq_reg_offset = 0x1a00,
+       .scratch_reg_offset = 0x10000,
+       .sram_pte_offset = 0x03800000,
+};
+
 struct snd_soc_acpi_codecs amp_rt1019 = {
        .num_codecs = 1,
        .codecs = {"10EC1019"}