From 94c29602270b7127db728abae61023c13a40a07c Mon Sep 17 00:00:00 2001 From: Dirk Brandewie Date: Thu, 15 Oct 2015 08:23:03 -0700 Subject: [PATCH] i2c: designware move to using single isr With ioapic_mkstub now taking a context value we can have a single isr routine and move away from the isr trampolines we have now Change-Id: Ibbb0f627ac515b12c0590a71da6a3267c952dd30 Signed-off-by: Dirk Brandewie --- drivers/i2c/i2c_dw.c | 10 ++-------- drivers/i2c/i2c_static_irq_stubs.S | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/i2c/i2c_dw.c b/drivers/i2c/i2c_dw.c index d20e54942d5..706c002e7b0 100644 --- a/drivers/i2c/i2c_dw.c +++ b/drivers/i2c/i2c_dw.c @@ -838,12 +838,13 @@ DECLARE_DEVICE_INIT_CONFIG(i2c_0, &i2c_config_dw_0); pre_kernel_late_init(i2c_0, &i2c_0_runtime); +struct device *i2c_dw_isr_0_device = SYS_GET_DEVICE(i2c_0); #ifdef CONFIG_I2C_DW_0_IRQ_DIRECT IRQ_CONNECT_STATIC(i2c_dw_0, CONFIG_I2C_DW_0_IRQ, CONFIG_I2C_DW_0_INT_PRIORITY, - i2c_dw_isr_0, + i2c_dw_isr, 0); #endif @@ -864,11 +865,4 @@ void i2c_config_0(struct device *port) #endif } -#ifdef CONFIG_I2C_DW_0_IRQ_DIRECT -void i2c_dw_isr_0(void *unused) -{ - i2c_dw_isr(&__initconfig_i2c_0); -} -#endif - #endif /* CONFIG_I2C_DW_0 */ diff --git a/drivers/i2c/i2c_static_irq_stubs.S b/drivers/i2c/i2c_static_irq_stubs.S index ea621eb87ff..27f28d5b457 100644 --- a/drivers/i2c/i2c_static_irq_stubs.S +++ b/drivers/i2c/i2c_static_irq_stubs.S @@ -29,7 +29,7 @@ #if defined(CONFIG_I2C_DW_0) #ifdef CONFIG_IOAPIC - ioapic_mkstub i2c_dw_0 i2c_dw_isr_0 0 + ioapic_mkstub i2c_dw_0 i2c_dw_isr i2c_dw_isr_0_device #endif #endif /* CONFIG_I2C_DW_0 */