[9810] i2c: exynos5: Binding IRQ for HSI2C latency.
authorKyungwoo Kang <kwoo.kang@samsung.com>
Fri, 29 Sep 2017 06:38:13 +0000 (15:38 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Wed, 9 May 2018 12:14:45 +0000 (21:14 +0900)
Interrupt and scheduling latency casues the slave timeout failure
during I2C protocol.
This patch binds the I2C IRQ to specified CPUs in order to
reduce these latency

Change-Id: I3fc6459577bac64539d79f5305dd6b3bc3f451fc
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
drivers/i2c/busses/i2c-exynos5.c

index 8214ea00d9d807d90dbe86f8e549d159f6b2df84..fa1fb664b4ad88f803a70e4a5bcd824654d5a55a 100644 (file)
@@ -650,8 +650,11 @@ static int exynos5_i2c_xfer_msg(struct exynos5_i2c *i2c,
        writel(i2c_auto_conf, i2c->regs + HSI2C_AUTO_CONF);
 
        if (operation_mode == HSI2C_INTERRUPT) {
+               unsigned int cpu = raw_smp_processor_id();
                i2c_int_en |= HSI2C_INT_CHK_TRANS_STATE | HSI2C_INT_TRANSFER_DONE;
                writel(i2c_int_en, i2c->regs + HSI2C_INT_ENABLE);
+
+               irq_force_affinity(i2c->irq, cpumask_of(cpu));
                enable_irq(i2c->irq);
        } else {
                writel(HSI2C_INT_TRANSFER_DONE, i2c->regs + HSI2C_INT_ENABLE);