mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Chao Song <chao.song@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Vinod Koul <vkoul@kernel.org>, Sasha Levin <sashal@kernel.org>,
	alsa-devel@alsa-project.org
Subject: [PATCH AUTOSEL 6.6 03/18] soundwire: intel_ace2x: fix AC timing setting for ACE2.x
Date: Mon, 18 Dec 2023 07:43:37 -0500	[thread overview]
Message-ID: <20231218124415.1379060-3-sashal@kernel.org> (raw)
In-Reply-To: <20231218124415.1379060-1-sashal@kernel.org>

From: Chao Song <chao.song@linux.intel.com>

[ Upstream commit 393cae5f32d640b9798903702018a48c7a45e59f ]

Start from ACE1.x, DOAISE is added to AC timing control
register bit 5, it combines with DOAIS to get effective
timing, and has the default value 1.

The current code fills DOAIS, DACTQE and DODS bits to a
variable initialized to zero, and updates the variable
to AC timing control register. With this operation, We
change DOAISE to 0, and force a much more aggressive
timing. The timing is even unable to form a working
waveform on SDA pin.

This patch uses read-modify-write operation for the AC
timing control register access, thus makes sure those
bits not supposed and intended to change are not touched.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20231127124735.2080562-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/soundwire/intel_ace2x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/soundwire/intel_ace2x.c b/drivers/soundwire/intel_ace2x.c
index a9d25ae0b73fe..e320c91289135 100644
--- a/drivers/soundwire/intel_ace2x.c
+++ b/drivers/soundwire/intel_ace2x.c
@@ -23,8 +23,9 @@
 static void intel_shim_vs_init(struct sdw_intel *sdw)
 {
 	void __iomem *shim_vs = sdw->link_res->shim_vs;
-	u16 act = 0;
+	u16 act;
 
+	act = intel_readw(shim_vs, SDW_SHIM2_INTEL_VS_ACTMCTL);
 	u16p_replace_bits(&act, 0x1, SDW_SHIM2_INTEL_VS_ACTMCTL_DOAIS);
 	act |= SDW_SHIM2_INTEL_VS_ACTMCTL_DACTQE;
 	act |=  SDW_SHIM2_INTEL_VS_ACTMCTL_DODS;
-- 
2.43.0


  parent reply	other threads:[~2023-12-18 12:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18 12:43 [PATCH AUTOSEL 6.6 01/18] clk: rockchip: rk3568: Add PLL rate for 292.5MHz Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 02/18] clk: rockchip: rk3128: Fix HCLK_OTG gate register Sasha Levin
2023-12-18 12:43 ` Sasha Levin [this message]
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 04/18] jbd2: correct the printing of write_flags in jbd2_write_superblock() Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 05/18] jbd2: increase the journal IO's priority Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 06/18] HID: Add quirk for Labtec/ODDOR/aikeec handbrake Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 07/18] drm/crtc: Fix uninit-value bug in drm_mode_setcrtc Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 08/18] neighbour: Don't let neigh_forced_gc() disable preemption for long Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 09/18] platform/x86: intel-vbtn: Fix missing tablet-mode-switch events Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 10/18] ksmbd: avoid duplicate opinfo_put() call on error of smb21_lease_break_ack() Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 11/18] efi/loongarch: Use load address to calculate kernel entry address Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 12/18] jbd2: fix soft lockup in journal_finish_inode_data_buffers() Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 13/18] tracing: Have large events show up as '[LINE TOO BIG]' instead of nothing Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 14/18] tracing: Add size check when printing trace_marker output Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 15/18] stmmac: dwmac-loongson: drop useless check for compatible fallback Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 16/18] MIPS: dts: loongson: drop incorrect dwmac fallback compatible Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 17/18] tracing: Fix uaf issue when open the hist or hist_debug file Sasha Levin
2023-12-18 12:43 ` [PATCH AUTOSEL 6.6 18/18] ring-buffer: Do not record in NMI if the arch does not support cmpxchg in NMI Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231218124415.1379060-3-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=chao.song@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®