Skip to content

Commit 73a29d3

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: cadence: split access to IP_MCP_CMDCTRL fields
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> Link: https://lore.kernel.org/r/20230314015410.487311-16-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 4dc953b commit 73a29d3

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

drivers/soundwire/cadence_master.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ MODULE_PARM_DESC(cdns_mcp_int_mask, "Cadence MCP IntMask");
5454
#define CDNS_IP_MCP_CONTROL_CMD_ACCEPT BIT(1)
5555
#define CDNS_IP_MCP_CONTROL_BLOCK_WAKEUP BIT(0)
5656

57-
#define CDNS_MCP_CMDCTRL 0x8
57+
#define CDNS_IP_MCP_CMDCTRL 0x8 /* IP offset added at run-time */
5858

59-
#define CDNS_MCP_CMDCTRL_INSERT_PARITY_ERR BIT(2)
59+
#define CDNS_IP_MCP_CMDCTRL_INSERT_PARITY_ERR BIT(2)
6060

6161
#define CDNS_MCP_SSPSTAT 0xC
6262
#define CDNS_MCP_FRAME_SHAPE 0x10
@@ -428,9 +428,9 @@ static int cdns_parity_error_injection(void *data, u64 value)
428428
mutex_lock(&bus->bus_lock);
429429

430430
/* program hardware to inject parity error */
431-
cdns_updatel(cdns, CDNS_MCP_CMDCTRL,
432-
CDNS_MCP_CMDCTRL_INSERT_PARITY_ERR,
433-
CDNS_MCP_CMDCTRL_INSERT_PARITY_ERR);
431+
cdns_ip_updatel(cdns, CDNS_IP_MCP_CMDCTRL,
432+
CDNS_IP_MCP_CMDCTRL_INSERT_PARITY_ERR,
433+
CDNS_IP_MCP_CMDCTRL_INSERT_PARITY_ERR);
434434

435435
/* commit changes */
436436
cdns_updatel(cdns, CDNS_MCP_CONFIG_UPDATE,
@@ -442,9 +442,9 @@ static int cdns_parity_error_injection(void *data, u64 value)
442442
dev_info(cdns->dev, "parity error injection, read: %d\n", ret);
443443

444444
/* program hardware to disable parity error */
445-
cdns_updatel(cdns, CDNS_MCP_CMDCTRL,
446-
CDNS_MCP_CMDCTRL_INSERT_PARITY_ERR,
447-
0);
445+
cdns_ip_updatel(cdns, CDNS_IP_MCP_CMDCTRL,
446+
CDNS_IP_MCP_CMDCTRL_INSERT_PARITY_ERR,
447+
0);
448448

449449
/* commit changes */
450450
cdns_updatel(cdns, CDNS_MCP_CONFIG_UPDATE,

0 commit comments

Comments
 (0)