[PATCH] drm/amd/amdgpu: passing i2s instance value as platform data

Vijendar Mukunda Vijendar.Mukunda at amd.com
Tue Mar 20 07:19:05 UTC 2018


i2s instance value is passed as platform data to dwc driver.
this parameter will be useful to distinguish current i2s
instance value when multiple i2s controller instances are created.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
v1->v2: moved I2S instance macro definitions to designware header file
 drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
index 6cca4d1..b80c43f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
@@ -347,6 +347,7 @@ static int acp_hw_init(void *handle)
 	i2s_pdata[0].snd_rates = SNDRV_PCM_RATE_8000_96000;
 	i2s_pdata[0].i2s_reg_comp1 = ACP_I2S_COMP1_PLAY_REG_OFFSET;
 	i2s_pdata[0].i2s_reg_comp2 = ACP_I2S_COMP2_PLAY_REG_OFFSET;
+	i2s_pdata[0].i2s_instance = I2S_SP_INSTANCE;
 	switch (adev->asic_type) {
 	case CHIP_STONEY:
 		i2s_pdata[1].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET |
@@ -362,6 +363,7 @@ static int acp_hw_init(void *handle)
 	i2s_pdata[1].snd_rates = SNDRV_PCM_RATE_8000_96000;
 	i2s_pdata[1].i2s_reg_comp1 = ACP_I2S_COMP1_CAP_REG_OFFSET;
 	i2s_pdata[1].i2s_reg_comp2 = ACP_I2S_COMP2_CAP_REG_OFFSET;
+	i2s_pdata[1].i2s_instance = I2S_SP_INSTANCE;
 
 	i2s_pdata[2].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET;
 	switch (adev->asic_type) {
@@ -376,6 +378,7 @@ static int acp_hw_init(void *handle)
 	i2s_pdata[2].snd_rates = SNDRV_PCM_RATE_8000_96000;
 	i2s_pdata[2].i2s_reg_comp1 = ACP_BT_COMP1_REG_OFFSET;
 	i2s_pdata[2].i2s_reg_comp2 = ACP_BT_COMP2_REG_OFFSET;
+	i2s_pdata[2].i2s_instance = I2S_BT_INSTANCE;
 
 	adev->acp.acp_res[0].name = "acp2x_dma";
 	adev->acp.acp_res[0].flags = IORESOURCE_MEM;
-- 
2.7.4



More information about the amd-gfx mailing list