diff options
author | Vijendar Mukunda <Vijendar.Mukunda@amd.com> | 2017-10-09 16:36:08 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-18 10:56:26 -0400 |
commit | a1b16aaa55b6425418d6d7a87d3dbbe40bac8c37 (patch) | |
tree | d4074d7f3b0308eacfafcc31e5ec8476e0e75778 | |
parent | 1fd16f36be687ce32e875f59363c16d7cf050988 (diff) |
ASoC: AMD: Added asic_type as ACP DMA driver platform data
asic_type information is passed to ACP DMA Driver as platform data.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | sound/soc/amd/acp-pcm-dma.c | 8 | ||||
-rw-r--r-- | sound/soc/amd/acp.h | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index 08b1399d1da2..dcbf9973884d 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c | |||
@@ -73,12 +73,6 @@ static const struct snd_pcm_hardware acp_pcm_hardware_capture = { | |||
73 | .periods_max = CAPTURE_MAX_NUM_PERIODS, | 73 | .periods_max = CAPTURE_MAX_NUM_PERIODS, |
74 | }; | 74 | }; |
75 | 75 | ||
76 | struct audio_drv_data { | ||
77 | struct snd_pcm_substream *play_stream; | ||
78 | struct snd_pcm_substream *capture_stream; | ||
79 | void __iomem *acp_mmio; | ||
80 | }; | ||
81 | |||
82 | static u32 acp_reg_read(void __iomem *acp_mmio, u32 reg) | 76 | static u32 acp_reg_read(void __iomem *acp_mmio, u32 reg) |
83 | { | 77 | { |
84 | return readl(acp_mmio + (reg * 4)); | 78 | return readl(acp_mmio + (reg * 4)); |
@@ -916,6 +910,7 @@ static int acp_audio_probe(struct platform_device *pdev) | |||
916 | int status; | 910 | int status; |
917 | struct audio_drv_data *audio_drv_data; | 911 | struct audio_drv_data *audio_drv_data; |
918 | struct resource *res; | 912 | struct resource *res; |
913 | const u32 *pdata = pdev->dev.platform_data; | ||
919 | 914 | ||
920 | audio_drv_data = devm_kzalloc(&pdev->dev, sizeof(struct audio_drv_data), | 915 | audio_drv_data = devm_kzalloc(&pdev->dev, sizeof(struct audio_drv_data), |
921 | GFP_KERNEL); | 916 | GFP_KERNEL); |
@@ -932,6 +927,7 @@ static int acp_audio_probe(struct platform_device *pdev) | |||
932 | 927 | ||
933 | audio_drv_data->play_stream = NULL; | 928 | audio_drv_data->play_stream = NULL; |
934 | audio_drv_data->capture_stream = NULL; | 929 | audio_drv_data->capture_stream = NULL; |
930 | audio_drv_data->asic_type = *pdata; | ||
935 | 931 | ||
936 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 932 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
937 | if (!res) { | 933 | if (!res) { |
diff --git a/sound/soc/amd/acp.h b/sound/soc/amd/acp.h index 330832ef4e5e..28cf9140f49c 100644 --- a/sound/soc/amd/acp.h +++ b/sound/soc/amd/acp.h | |||
@@ -84,6 +84,13 @@ struct audio_substream_data { | |||
84 | void __iomem *acp_mmio; | 84 | void __iomem *acp_mmio; |
85 | }; | 85 | }; |
86 | 86 | ||
87 | struct audio_drv_data { | ||
88 | struct snd_pcm_substream *play_stream; | ||
89 | struct snd_pcm_substream *capture_stream; | ||
90 | void __iomem *acp_mmio; | ||
91 | u32 asic_type; | ||
92 | }; | ||
93 | |||
87 | enum { | 94 | enum { |
88 | ACP_TILE_P1 = 0, | 95 | ACP_TILE_P1 = 0, |
89 | ACP_TILE_P2, | 96 | ACP_TILE_P2, |