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

index 6728eee29993a0cc2bbf3d94687b27ef4ef83edd..3df665ca1b0b2e758d281caba383b6f3753da832 100644 (file)
@@ -145,6 +145,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
                break;
        case 0x63:
                chip->name = "acp_asoc_acp63";
+               chip->rsrc = &acp63_rsrc;
                chip->acp_hw_ops_init = acp63_hw_ops_init;
                chip->machines = snd_soc_acpi_amd_acp63_acp_machines;
                break;
index 49786e1a214fcbfac3ffe1e677c08b0b7816b263..53c013a64854457e471519a30212f622e3477ca7 100644 (file)
@@ -52,16 +52,6 @@ union clk_pll_req_no {
        u32 clk_pll_req_no_reg;
 };
 
-static struct acp_resource rsrc = {
-       .offset = 0,
-       .no_of_ctrls = 2,
-       .irqp_used = 1,
-       .soc_mclk = true,
-       .irq_reg_offset = 0x1a00,
-       .scratch_reg_offset = 0x12800,
-       .sram_pte_offset = 0x03802800,
-};
-
 static struct snd_soc_dai_driver acp63_dai[] = {
 {
        .name = "acp-i2s-sp",
@@ -222,11 +212,10 @@ static int acp63_audio_probe(struct platform_device *pdev)
        }
 
        chip->dev = dev;
-       chip->rsrc = &rsrc;
        chip->dai_driver = acp63_dai;
        chip->num_dai = ARRAY_SIZE(acp63_dai);
 
-       if (chip->is_i2s_config && rsrc.soc_mclk) {
+       if (chip->is_i2s_config && chip->rsrc->soc_mclk) {
                ret = acp63_i2s_master_clock_generate(chip);
                if (ret)
                        return ret;
index 979d8b8801a3625ef464ad8828cd4c36686c5f3f..075659fb3314a01ba6e850761104e080e7beea4f 100644 (file)
@@ -238,6 +238,16 @@ enum acp_config {
        ACP_CONFIG_20,
 };
 
+struct acp_resource acp63_rsrc = {
+       .offset = 0,
+       .no_of_ctrls = 2,
+       .irqp_used = 1,
+       .soc_mclk = true,
+       .irq_reg_offset = 0x1a00,
+       .scratch_reg_offset = 0x12800,
+       .sram_pte_offset = 0x03802800,
+};
+
 struct acp_resource acp70_rsrc = {
        .offset = 0,
        .no_of_ctrls = 2,