soc: soundwire: Update hw_ctl on HCLK at bootup

Propogate changes from (CR).
Merge qcom patch:
case number: 04629828

soc: soundwire: Update hw_ctl on HCLK at bootup

For soundwire version 1.6, HCLK remove HW controlled
at bootup before soundwire frame generation status check.

Change-Id: Idc2420d086261766ea4e79f69320f12c4d6b2259
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Reviewed-on: https://gerrit.mot.com/1592905
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1745677
Reviewed-by: Wen Xie <xiewen3@motorola.com>
This commit is contained in:
Laxminath Kasam authored and Gilberto Gambugge committed 2023-06-01 00:35:13 -03:00
1 parent 81c4cb937b
commit b660be1d97
1 file changed
+8
+8
View File
@@ -2524,6 +2524,14 @@ static int swrm_master_init(struct swr_mstr_ctrl *swrm)
swr_master_bulk_write(swrm, reg, value, len);
/* SW workaround to gate hw_ctl for SWR version >=1.6 */
if (swrm->version >= SWRM_VERSION_1_6) {
if (swrm->swrm_hctl_reg) {
temp = ioread32(swrm->swrm_hctl_reg);
temp &= 0xFFFFFFFD;
iowrite32(temp, swrm->swrm_hctl_reg);
}
}
if (!swrm_check_link_status(swrm, 0x1)) {
dev_err(swrm->dev,
"%s: swr link failed to connect\n",