Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31b7445e authored by Shuai Zhang's avatar Shuai Zhang
Browse files

soc: swr-mstr-ctrl: Fix SWR cmd FIFO overflow error



Fix SWR cmd FIFO overflow error.
In 5.4 kernel there are few additional register writes added in soundwire driver,
one of the register(SWRS_DP_SAMPLE_CONTROL_2_BANK) write is causing overflow error.

Change-Id: I31f4855af52b24ceac53f55010ce1935c3bc1ea6
Signed-off-by: default avatarShuai Zhang <quic_shuzhan@quicinc.com>
parent 389f9c79
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#include <linux/irq.h>
@@ -1464,12 +1465,14 @@ static void swrm_copy_data_port_config(struct swr_master *master, u8 bank)
					SWRS_DP_SAMPLE_CONTROL_1_BANK(slv_id,
								bank));

			if ((port_req->sinterval >> 8)& 0xFF) {
				reg[len] = SWRM_CMD_FIFO_WR_CMD;
				val[len++] = SWR_REG_VAL_PACK(
					(port_req->sinterval >> 8)& 0xFF,
					port_req->dev_num, 0x00,
					SWRS_DP_SAMPLE_CONTROL_2_BANK(slv_id,
								bank));
			}

			reg[len] = SWRM_CMD_FIFO_WR_CMD;
			val[len++] = SWR_REG_VAL_PACK(port_req->offset1,