diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2015-09-03 23:20:11 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2015-10-10 00:31:34 +0300 |
commit | 2151ba7584b73255ae057892bb9c2de358af9502 (patch) | |
tree | 2eef36e87288194d0cc6727f524642d42716d642 /drivers | |
parent | 315a1736a2f2d9ad21dddea6bed766469342c2dc (diff) | |
download | linux-2151ba7584b73255ae057892bb9c2de358af9502.tar.xz |
i2c: rcar: check master irqs before slave irqs
Due to broken HW design, master IRQs are more timing critical, so give
them precedence over slave IRQ.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index dcf9fc77cec7..06bd8c45c6af 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -435,19 +435,17 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv) static irqreturn_t rcar_i2c_irq(int irq, void *ptr) { struct rcar_i2c_priv *priv = ptr; - irqreturn_t result = IRQ_HANDLED; u32 msr; - if (rcar_i2c_slave_irq(priv)) - goto exit; - msr = rcar_i2c_read(priv, ICMSR); /* Only handle interrupts that are currently enabled */ msr &= rcar_i2c_read(priv, ICMIER); if (!msr) { - result = IRQ_NONE; - goto exit; + if (rcar_i2c_slave_irq(priv)) + return IRQ_HANDLED; + + return IRQ_NONE; } /* Arbitration lost */ @@ -484,8 +482,7 @@ out: wake_up(&priv->wait); } -exit: - return result; + return IRQ_HANDLED; } static int rcar_i2c_master_xfer(struct i2c_adapter *adap, |