All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bard Liao <yung-chuan.liao@linux.intel.com>
To: alsa-devel@alsa-project.org, vkoul@kernel.org
Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org,
	pierre-louis.bossart@linux.intel.com, bard.liao@intel.com
Subject: [PATCH 15/16] soundwire: cadence: split access to IP_MCP_CMDCTRL fields
Date: Tue, 14 Mar 2023 09:54:09 +0800	[thread overview]
Message-ID: <20230314015410.487311-16-yung-chuan.liao@linux.intel.com> (raw)
In-Reply-To: <20230314015410.487311-1-yung-chuan.liao@linux.intel.com>

From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

The latest Cadence IP splits the MCP_CMDCTRL fields in two registers:
MCP_CMDCTRL and IP_MCP_CMDCTRL. Rename the relevant fields and change
the access methods used for those fields.

In practice we only use the Parity error insertion in IP_CMD_CTRL.

For existing solutions, this is an iso-functionality change.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 drivers/soundwire/cadence_master.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index 4c82712944b9..5128923f051e 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -54,9 +54,9 @@ MODULE_PARM_DESC(cdns_mcp_int_mask, "Cadence MCP IntMask");
 #define CDNS_IP_MCP_CONTROL_CMD_ACCEPT		BIT(1)
 #define CDNS_IP_MCP_CONTROL_BLOCK_WAKEUP	BIT(0)
 
-#define CDNS_MCP_CMDCTRL			0x8
+#define CDNS_IP_MCP_CMDCTRL			0x8 /* IP offset added at run-time */
 
-#define CDNS_MCP_CMDCTRL_INSERT_PARITY_ERR	BIT(2)
+#define CDNS_IP_MCP_CMDCTRL_INSERT_PARITY_ERR	BIT(2)
 
 #define CDNS_MCP_SSPSTAT			0xC
 #define CDNS_MCP_FRAME_SHAPE			0x10
@@ -428,9 +428,9 @@ static int cdns_parity_error_injection(void *data, u64 value)
 	mutex_lock(&bus->bus_lock);
 
 	/* program hardware to inject parity error */
-	cdns_updatel(cdns, CDNS_MCP_CMDCTRL,
-		     CDNS_MCP_CMDCTRL_INSERT_PARITY_ERR,
-		     CDNS_MCP_CMDCTRL_INSERT_PARITY_ERR);
+	cdns_ip_updatel(cdns, CDNS_IP_MCP_CMDCTRL,
+			CDNS_IP_MCP_CMDCTRL_INSERT_PARITY_ERR,
+			CDNS_IP_MCP_CMDCTRL_INSERT_PARITY_ERR);
 
 	/* commit changes */
 	cdns_updatel(cdns, CDNS_MCP_CONFIG_UPDATE,
@@ -442,9 +442,9 @@ static int cdns_parity_error_injection(void *data, u64 value)
 	dev_info(cdns->dev, "parity error injection, read: %d\n", ret);
 
 	/* program hardware to disable parity error */
-	cdns_updatel(cdns, CDNS_MCP_CMDCTRL,
-		     CDNS_MCP_CMDCTRL_INSERT_PARITY_ERR,
-		     0);
+	cdns_ip_updatel(cdns, CDNS_IP_MCP_CMDCTRL,
+			CDNS_IP_MCP_CMDCTRL_INSERT_PARITY_ERR,
+			0);
 
 	/* commit changes */
 	cdns_updatel(cdns, CDNS_MCP_CONFIG_UPDATE,
-- 
2.25.1


  parent reply	other threads:[~2023-03-14  1:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-14  1:53 [PATCH 00/16] soundwire: updates before LunarLake introduction Bard Liao
2023-03-14  1:53 ` [PATCH 01/16] soundwire: intel: move common definitions to header file Bard Liao
2023-03-14  1:53 ` [PATCH 02/16] soundwire: intel: remove stale/misleading comment Bard Liao
2023-03-14  1:53 ` [PATCH 03/16] soundwire: intel: remove PDI-level restrictions on rates and formats Bard Liao
2023-03-14  1:53 ` [PATCH 04/16] soundwire: intel: remove useless abstraction Bard Liao
2023-03-14  1:53 ` [PATCH 05/16] soundwire: intel: simplify sync_go sequence Bard Liao
2023-03-14  1:54 ` [PATCH 06/16] soundwire: intel: add sync_arm/sync_go to ops Bard Liao
2023-03-14  1:54 ` [PATCH 07/16] soundwire: intel: use indirection before moving bus start/stop sequences Bard Liao
2023-03-14  1:54 ` [PATCH 08/16] soundwire: intel: move bus common sequences to different file Bard Liao
2023-03-14  1:54 ` [PATCH 09/16] soundwire: intel: add abstraction for cmdsync check Bard Liao
2023-03-14  1:54 ` [PATCH 10/16] soundwire: intel: move bank switch routine to common intel_bus_common.c Bard Liao
2023-03-14  1:54 ` [PATCH 11/16] soundwire: cadence: remove CDNS_MCP_CONFIG_SSPMOD Bard Liao
2023-03-14  1:54 ` [PATCH 12/16] soundwire: cadence: add helpers to access IP_MCP registers Bard Liao
2023-03-14  1:54 ` [PATCH 13/16] soundwire: cadence: split access to IP_MCP_CONFIG fields Bard Liao
2023-03-14  1:54 ` [PATCH 14/16] soundwire: cadence: split access to IP_MCP_CONTROL fields Bard Liao
2023-03-14  1:54 ` Bard Liao [this message]
2023-03-14  1:54 ` [PATCH 16/16] soundwire: cadence: change access to IP_MCP_CMD_BASE Bard Liao
2023-03-15 13:54 ` [PATCH 00/16] soundwire: updates before LunarLake introduction Vinod Koul

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=20230314015410.487311-16-yung-chuan.liao@linux.intel.com \
    --to=yung-chuan.liao@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=vinod.koul@linaro.org \
    --cc=vkoul@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.