Commit c6f3abbb authored by Vijendar Mukunda's avatar Vijendar Mukunda Committed by Mark Brown

ASoC: amd: acp: add legacy driver support for ACP7.1 based platforms

Add acp pci driver and machine driver changes for ACP7.1 based platforms
for legacy stack.
Signed-off-by: default avatarVijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240813080850.3107409-1-Vijendar.Mukunda@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ab73c7c0
......@@ -270,6 +270,7 @@ static int acp_power_on(struct acp_chip_info *chip)
acp_pgfsm_ctrl_reg = ACP63_PGFSM_CONTROL;
break;
case ACP70_DEV:
case ACP71_DEV:
acp_pgfsm_stat_reg = ACP70_PGFSM_STATUS;
acp_pgfsm_ctrl_reg = ACP70_PGFSM_CONTROL;
break;
......@@ -336,10 +337,9 @@ int acp_deinit(struct acp_chip_info *chip)
if (ret)
return ret;
if (chip->acp_rev != ACP70_DEV)
if (chip->acp_rev < ACP70_DEV)
writel(0, chip->base + ACP_CONTROL);
if (chip->acp_rev >= ACP70_DEV)
else
writel(0x01, chip->base + ACP_ZSC_DSP_CTRL);
return 0;
}
......@@ -461,6 +461,7 @@ void check_acp_config(struct pci_dev *pci, struct acp_chip_info *chip)
check_acp6x_config(chip);
break;
case ACP70_DEV:
case ACP71_DEV:
pdm_addr = ACP70_PDM_ADDR;
check_acp70_config(chip);
break;
......
......@@ -1766,7 +1766,7 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card)
} else if (drv_data->platform == ACP63) {
links[i].platforms = platform_acp63_component;
links[i].num_platforms = ARRAY_SIZE(platform_acp63_component);
} else if (drv_data->platform == ACP70) {
} else if ((drv_data->platform == ACP70) || (drv_data->platform == ACP71)) {
links[i].platforms = platform_acp70_component;
links[i].num_platforms = ARRAY_SIZE(platform_acp70_component);
} else {
......
......@@ -56,6 +56,7 @@ enum platform_end_point {
REMBRANDT,
ACP63,
ACP70,
ACP71,
};
struct acp_mach_ops {
......
......@@ -95,6 +95,10 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
chip->name = "acp_asoc_acp70";
chip->acp_rev = ACP70_DEV;
break;
case 0x71:
chip->name = "acp_asoc_acp70";
chip->acp_rev = ACP71_DEV;
break;
default:
dev_err(dev, "Unsupported device revision:0x%x\n", pci->revision);
ret = -EINVAL;
......
......@@ -147,7 +147,11 @@ static int acp_acp70_audio_probe(struct platform_device *pdev)
return -ENODEV;
}
if (chip->acp_rev != ACP70_DEV) {
switch (chip->acp_rev) {
case ACP70_DEV:
case ACP71_DEV:
break;
default:
dev_err(&pdev->dev, "Un-supported ACP Revision %d\n", chip->acp_rev);
return -ENODEV;
}
......@@ -178,7 +182,11 @@ static int acp_acp70_audio_probe(struct platform_device *pdev)
adata->num_dai = ARRAY_SIZE(acp70_dai);
adata->rsrc = &rsrc;
adata->machines = snd_soc_acpi_amd_acp70_acp_machines;
adata->platform = ACP70;
if (chip->acp_rev == ACP70_DEV)
adata->platform = ACP70;
else
adata->platform = ACP71;
adata->flag = chip->flag;
acp_machine_select(adata);
......
......@@ -22,6 +22,7 @@
#define ACP6X_DEV 6
#define ACP63_DEV 0x63
#define ACP70_DEV 0x70
#define ACP71_DEV 0x71
#define DMIC_INSTANCE 0x00
#define I2S_SP_INSTANCE 0x01
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment