<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Vijendar Mukunda <Vijendar.Mukunda@amd.com><br>
<b>Sent:</b> Wednesday, April 18, 2018 4:56:32 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Deucher, Alexander; Agrawal, Akshu; Mukunda, Vijendar<br>
<b>Subject:</b> [PATCH v2] drm/amd/amdgpu: passing i2s instance value as platform data</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">i2s instance value is passed as platform data to dwc driver.<br>
this parameter will be useful to distinguish current i2s<br>
instance value when multiple i2s controller instances are created.<br>
<br>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com><br>
---<br>
v1->v2: moved I2S instance macros from dwc driver header file<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 5 +++++<br>
 1 file changed, 5 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c<br>
index 6cca4d1..c8c7583 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c<br>
@@ -83,6 +83,8 @@<br>
 #define ACP_TIMEOUT_LOOP                        0x000000FF<br>
 #define ACP_DEVS                                4<br>
 #define ACP_SRC_ID                              162<br>
+#define I2S_SP_INSTANCE                         0x01<br>
+#define I2S_BT_INSTANCE                         0x02<br>
 <br>
 enum {<br>
         ACP_TILE_P1 = 0,<br>
@@ -347,6 +349,7 @@ static int acp_hw_init(void *handle)<br>
         i2s_pdata[0].snd_rates = SNDRV_PCM_RATE_8000_96000;<br>
         i2s_pdata[0].i2s_reg_comp1 = ACP_I2S_COMP1_PLAY_REG_OFFSET;<br>
         i2s_pdata[0].i2s_reg_comp2 = ACP_I2S_COMP2_PLAY_REG_OFFSET;<br>
+       i2s_pdata[0].i2s_instance = I2S_SP_INSTANCE;<br>
         switch (adev->asic_type) {<br>
         case CHIP_STONEY:<br>
                 i2s_pdata[1].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET |<br>
@@ -362,6 +365,7 @@ static int acp_hw_init(void *handle)<br>
         i2s_pdata[1].snd_rates = SNDRV_PCM_RATE_8000_96000;<br>
         i2s_pdata[1].i2s_reg_comp1 = ACP_I2S_COMP1_CAP_REG_OFFSET;<br>
         i2s_pdata[1].i2s_reg_comp2 = ACP_I2S_COMP2_CAP_REG_OFFSET;<br>
+       i2s_pdata[1].i2s_instance = I2S_SP_INSTANCE;<br>
 <br>
         i2s_pdata[2].quirks = DW_I2S_QUIRK_COMP_REG_OFFSET;<br>
         switch (adev->asic_type) {<br>
@@ -376,6 +380,7 @@ static int acp_hw_init(void *handle)<br>
         i2s_pdata[2].snd_rates = SNDRV_PCM_RATE_8000_96000;<br>
         i2s_pdata[2].i2s_reg_comp1 = ACP_BT_COMP1_REG_OFFSET;<br>
         i2s_pdata[2].i2s_reg_comp2 = ACP_BT_COMP2_REG_OFFSET;<br>
+       i2s_pdata[2].i2s_instance = I2S_BT_INSTANCE;<br>
 <br>
         adev->acp.acp_res[0].name = "acp2x_dma";<br>
         adev->acp.acp_res[0].flags = IORESOURCE_MEM;<br>
-- <br>
2.7.4<br>
<br>
</div>
</span></font></div>
</body>
</html>