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

Deucher, Alexander Alexander.Deucher at amd.com
Wed Apr 18 13:57:14 UTC 2018


Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

________________________________
From: Vijendar Mukunda <Vijendar.Mukunda at amd.com>
Sent: Wednesday, April 18, 2018 4:56:32 AM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander; Agrawal, Akshu; Mukunda, Vijendar
Subject: [PATCH v2] drm/amd/amdgpu: passing i2s instance value as platform data

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>
---
v1->v2: moved I2S instance macros from dwc driver header file
 drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
index 6cca4d1..c8c7583 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
@@ -83,6 +83,8 @@
 #define ACP_TIMEOUT_LOOP                        0x000000FF
 #define ACP_DEVS                                4
 #define ACP_SRC_ID                              162
+#define I2S_SP_INSTANCE                         0x01
+#define I2S_BT_INSTANCE                         0x02

 enum {
         ACP_TILE_P1 = 0,
@@ -347,6 +349,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 +365,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 +380,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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180418/5196709d/attachment.html>


More information about the amd-gfx mailing list