soc: swr-mstr: Update default val of comp_cfg

for PCM_OUT/IN dataport, update enable bit logic
using default value based on SWR version.

Change-Id: Ibfd342d9046834d074a12003f15e868c5336798c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
此提交包含在:
Laxminath Kasam
2020-11-03 19:00:03 +05:30
提交者 Gerrit - the friendly Code Review server
父節點 b3cfeef661
當前提交 38adb70f3c
共有 3 個檔案被更改,包括 11 行新增3 行删除

查看文件

@@ -771,6 +771,7 @@ static int swrm_pcm_port_config(struct swr_mstr_ctrl *swrm, u8 port_num,
bool dir, bool enable) bool dir, bool enable)
{ {
u16 reg_addr = 0; u16 reg_addr = 0;
u32 reg_val = SWRM_COMP_FEATURE_CFG_DEFAULT_VAL;
if (!port_num || port_num > 6) { if (!port_num || port_num > 6) {
dev_err(swrm->dev, "%s: invalid port: %d\n", dev_err(swrm->dev, "%s: invalid port: %d\n",
@@ -781,10 +782,12 @@ static int swrm_pcm_port_config(struct swr_mstr_ctrl *swrm, u8 port_num,
SWRM_DOUT_DP_PCM_PORT_CTRL(port_num)); SWRM_DOUT_DP_PCM_PORT_CTRL(port_num));
swr_master_write(swrm, reg_addr, enable); swr_master_write(swrm, reg_addr, enable);
if (swrm->version >= SWRM_VERSION_1_7)
reg_val = SWRM_COMP_FEATURE_CFG_DEFAULT_VAL_V1P7;
if (enable) if (enable)
swr_master_write(swrm, SWRM_COMP_FEATURE_CFG, 0x1E); reg_val |= SWRM_COMP_FEATURE_CFG_PCM_EN_MASK;
else swr_master_write(swrm, SWRM_COMP_FEATURE_CFG, reg_val);
swr_master_write(swrm, SWRM_COMP_FEATURE_CFG, 0x6);
return 0; return 0;
} }

查看文件

@@ -40,6 +40,7 @@
#define SWRM_VERSION_1_5 0x01050000 #define SWRM_VERSION_1_5 0x01050000
#define SWRM_VERSION_1_5_1 0x01050001 #define SWRM_VERSION_1_5_1 0x01050001
#define SWRM_VERSION_1_6 0x01060000 #define SWRM_VERSION_1_6 0x01060000
#define SWRM_VERSION_1_7 0x01070000
#define SWR_MAX_CH_PER_PORT 8 #define SWR_MAX_CH_PER_PORT 8

查看文件

@@ -111,4 +111,8 @@
#define SWRM_COMP_PARAMS_WR_FIFO_DEPTH 0x00007C00 #define SWRM_COMP_PARAMS_WR_FIFO_DEPTH 0x00007C00
#define SWRM_COMP_PARAMS_RD_FIFO_DEPTH 0x000F8000 #define SWRM_COMP_PARAMS_RD_FIFO_DEPTH 0x000F8000
#define SWRM_COMP_FEATURE_CFG_DEFAULT_VAL 0x06
#define SWRM_COMP_FEATURE_CFG_DEFAULT_VAL_V1P7 0x406
#define SWRM_COMP_FEATURE_CFG_PCM_EN_MASK 0x18
#endif /* _SWRM_REGISTERS_H */ #endif /* _SWRM_REGISTERS_H */