summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-aspeed.c
diff options
context:
space:
mode:
authorEddie James <eajames@linux.ibm.com>2020-09-09 22:30:57 +0200
committerWolfram Sang <wsa@kernel.org>2020-09-14 08:55:44 +0200
commit1a1d6db23ddacde0b15ea589e9103373e05af8de (patch)
tree37a83111ad337f2a45de666941fda365a21b6cfa /drivers/i2c/busses/i2c-aspeed.c
parentLinux 5.9-rc5 (diff)
downloadlinux-1a1d6db23ddacde0b15ea589e9103373e05af8de.tar.xz
linux-1a1d6db23ddacde0b15ea589e9103373e05af8de.zip
i2c: aspeed: Mask IRQ status to relevant bits
Mask the IRQ status to only the bits that the driver checks. This prevents excessive driver warnings when operating in slave mode when additional bits are set that the driver doesn't handle. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Tao Ren <rentao.bupt@gmail.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-aspeed.c')
-rw-r--r--drivers/i2c/busses/i2c-aspeed.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index 31268074c422..724bf30600d6 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -69,6 +69,7 @@
* These share bit definitions, so use the same values for the enable &
* status bits.
*/
+#define ASPEED_I2CD_INTR_RECV_MASK 0xf000ffff
#define ASPEED_I2CD_INTR_SDA_DL_TIMEOUT BIT(14)
#define ASPEED_I2CD_INTR_BUS_RECOVER_DONE BIT(13)
#define ASPEED_I2CD_INTR_SLAVE_MATCH BIT(7)
@@ -604,6 +605,7 @@ static irqreturn_t aspeed_i2c_bus_irq(int irq, void *dev_id)
writel(irq_received & ~ASPEED_I2CD_INTR_RX_DONE,
bus->base + ASPEED_I2C_INTR_STS_REG);
readl(bus->base + ASPEED_I2C_INTR_STS_REG);
+ irq_received &= ASPEED_I2CD_INTR_RECV_MASK;
irq_remaining = irq_received;
#if IS_ENABLED(CONFIG_I2C_SLAVE)