From: Kyungwoo Kang Date: Fri, 29 Sep 2017 06:38:13 +0000 (+0900) Subject: [9810] i2c: exynos5: Binding IRQ for HSI2C latency. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9359c39eb61a86c483305fa0b5be71fef057d101;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [9810] i2c: exynos5: Binding IRQ for HSI2C latency. 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 --- diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index 8214ea00d9d8..fa1fb664b4ad 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -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);