Unverified Commit 451bd0e7 authored by Vijendar Mukunda's avatar Vijendar Mukunda Committed by Mark Brown
Browse files

ASoC: SOF: amd: add ACP7.1 platform support

parent 7c2bad7b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -94,13 +94,13 @@ config SND_SOC_SOF_AMD_ACP63
	  If unsure select "N".

config SND_SOC_SOF_AMD_ACP70
	tristate "SOF support for ACP7.0 platform"
	tristate "SOF support for ACP7.0/ACP7.1 platforms"
	depends on SND_SOC_SOF_PCI
	depends on AMD_NODE
	select SND_SOC_SOF_AMD_COMMON
	help
	  Select this option for SOF support on
	  AMD ACP7.0 version based platforms.
	  Say Y if you want to enable SOF on ACP7.0 based platform.
	  AMD ACP7.0/ACP7.1 version based platforms.
	  Say Y if you want to enable SOF on ACP7.0/ACP7.1 based platforms.

endif
+9 −1
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ static void init_dma_descriptor(struct acp_dev_data *adata)

	switch (acp_data->pci_rev) {
	case ACP70_PCI_ID:
	case ACP71_PCI_ID:
		acp_dma_desc_base_addr = ACP70_DMA_DESC_BASE_ADDR;
		acp_dma_desc_max_num_dscr = ACP70_DMA_DESC_MAX_NUM_DSCR;
		break;
@@ -97,6 +98,7 @@ static int config_dma_channel(struct acp_dev_data *adata, unsigned int ch,

	switch (acp_data->pci_rev) {
	case ACP70_PCI_ID:
	case ACP71_PCI_ID:
		acp_dma_cntl_0 = ACP70_DMA_CNTL_0;
		acp_dma_ch_rst_sts = ACP70_DMA_CH_RST_STS;
		acp_dma_dscr_err_sts_0 = ACP70_DMA_ERR_STS_0;
@@ -336,6 +338,7 @@ int acp_dma_status(struct acp_dev_data *adata, unsigned char ch)

	switch (adata->pci_rev) {
	case ACP70_PCI_ID:
	case ACP71_PCI_ID:
		acp_dma_ch_sts = ACP70_DMA_CH_STS;
		break;
	default:
@@ -486,6 +489,7 @@ static int acp_power_on(struct snd_sof_dev *sdev)
		acp_pgfsm_cntl_mask = ACP6X_PGFSM_CNTL_POWER_ON_MASK;
		break;
	case ACP70_PCI_ID:
	case ACP71_PCI_ID:
		acp_pgfsm_status_mask = ACP70_PGFSM_STATUS_MASK;
		acp_pgfsm_cntl_mask = ACP70_PGFSM_CNTL_POWER_ON_MASK;
		break;
@@ -616,8 +620,12 @@ int amd_sof_acp_suspend(struct snd_sof_dev *sdev, u32 target_state)
		dev_err(sdev->dev, "ACP Reset failed\n");
		return ret;
	}
	if (acp_data->pci_rev == ACP70_PCI_ID)
	switch (acp_data->pci_rev) {
	case ACP70_PCI_ID:
	case ACP71_PCI_ID:
		enable = true;
		break;
	}
	snd_sof_dsp_write(sdev, ACP_DSP_BAR, ACP_CONTROL, enable);

	return 0;
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@
#define ACP_RMB_PCI_ID				0x6F
#define ACP63_PCI_ID				0x63
#define ACP70_PCI_ID				0x70
#define ACP71_PCI_ID				0x71

#define HOST_BRIDGE_CZN				0x1630
#define HOST_BRIDGE_VGH				0x1645
+6 −1
Original line number Diff line number Diff line
@@ -71,8 +71,13 @@ static int acp70_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_
{
	unsigned int flag;

	if (pci->revision != ACP70_PCI_ID)
	switch (pci->revision) {
	case ACP70_PCI_ID:
	case ACP71_PCI_ID:
			break;
	default:
		return -ENODEV;
	}

	flag = snd_amd_acp_find_config(pci);
	if (flag != FLAG_AMD_SOF && flag != FLAG_AMD_SOF_ONLY_DMIC)