mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
soundwire: cadence_master: revisit interrupt settings
Adding missing interrupt masks (parity, etc) and missing checks. Clarify which masks are for which usage. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190806005522.22642-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
1804633564
commit
9b5884a0c6
@ -75,9 +75,12 @@
|
||||
#define CDNS_MCP_INT_DPINT BIT(11)
|
||||
#define CDNS_MCP_INT_CTRL_CLASH BIT(10)
|
||||
#define CDNS_MCP_INT_DATA_CLASH BIT(9)
|
||||
#define CDNS_MCP_INT_PARITY BIT(8)
|
||||
#define CDNS_MCP_INT_CMD_ERR BIT(7)
|
||||
#define CDNS_MCP_INT_RX_NE BIT(3)
|
||||
#define CDNS_MCP_INT_RX_WL BIT(2)
|
||||
#define CDNS_MCP_INT_TXE BIT(1)
|
||||
#define CDNS_MCP_INT_TXF BIT(0)
|
||||
|
||||
#define CDNS_MCP_INTSET 0x4C
|
||||
|
||||
@ -575,6 +578,11 @@ irqreturn_t sdw_cdns_irq(int irq, void *dev_id)
|
||||
}
|
||||
}
|
||||
|
||||
if (int_status & CDNS_MCP_INT_PARITY) {
|
||||
/* Parity error detected by Master */
|
||||
dev_err_ratelimited(cdns->dev, "Parity error\n");
|
||||
}
|
||||
|
||||
if (int_status & CDNS_MCP_INT_CTRL_CLASH) {
|
||||
/* Slave is driving bit slot during control word */
|
||||
dev_err_ratelimited(cdns->dev, "Bus clash for control word\n");
|
||||
@ -642,10 +650,23 @@ static int _cdns_enable_interrupt(struct sdw_cdns *cdns)
|
||||
cdns_writel(cdns, CDNS_MCP_SLAVE_INTMASK1,
|
||||
CDNS_MCP_SLAVE_INTMASK1_MASK);
|
||||
|
||||
mask = CDNS_MCP_INT_SLAVE_RSVD | CDNS_MCP_INT_SLAVE_ALERT |
|
||||
CDNS_MCP_INT_SLAVE_ATTACH | CDNS_MCP_INT_SLAVE_NATTACH |
|
||||
CDNS_MCP_INT_CTRL_CLASH | CDNS_MCP_INT_DATA_CLASH |
|
||||
CDNS_MCP_INT_RX_WL | CDNS_MCP_INT_IRQ | CDNS_MCP_INT_DPINT;
|
||||
/* enable detection of all slave state changes */
|
||||
mask = CDNS_MCP_INT_SLAVE_MASK;
|
||||
|
||||
/* enable detection of bus issues */
|
||||
mask |= CDNS_MCP_INT_CTRL_CLASH | CDNS_MCP_INT_DATA_CLASH |
|
||||
CDNS_MCP_INT_PARITY;
|
||||
|
||||
/* no detection of port interrupts for now */
|
||||
|
||||
/* enable detection of RX fifo level */
|
||||
mask |= CDNS_MCP_INT_RX_WL;
|
||||
|
||||
/*
|
||||
* CDNS_MCP_INT_IRQ needs to be set otherwise all previous
|
||||
* settings are irrelevant
|
||||
*/
|
||||
mask |= CDNS_MCP_INT_IRQ;
|
||||
|
||||
cdns_writel(cdns, CDNS_MCP_INTMASK, mask);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user