i2c/dw: move IOAPIC interrupt trigger flags into driver
Move the common #define for IOAPIC interrupt trigger flags out of platform board.h and into the driver. Change-Id: I2d50457a45fae62ff085f7239712d580243253bb Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
8cb01064f6
commit
66b99d9cc1
4 changed files with 18 additions and 43 deletions
|
@ -34,6 +34,10 @@
|
|||
#include <shared_irq.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOAPIC
|
||||
#include <drivers/ioapic.h>
|
||||
#endif
|
||||
|
||||
#include "i2c_dw.h"
|
||||
#include "i2c_dw_registers.h"
|
||||
|
||||
|
@ -691,6 +695,20 @@ int i2c_dw_initialize(struct device *port)
|
|||
return DEV_OK;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_IOAPIC)
|
||||
#if defined(CONFIG_I2C_DW_IRQ_FALLING_EDGE)
|
||||
#define I2C_DW_IRQ_FLAGS (IOAPIC_EDGE | IOAPIC_LOW)
|
||||
#elif defined(CONFIG_I2C_DW_IRQ_RISING_EDGE)
|
||||
#define I2C_DW_IRQ_FLAGS (IOAPIC_EDGE | IOAPIC_HIGH)
|
||||
#elif defined(CONFIG_I2C_DW_IRQ_LEVEL_HIGH)
|
||||
#define I2C_DW_IRQ_FLAGS (IOAPIC_LEVEL | IOAPIC_HIGH)
|
||||
#elif defined(CONFIG_I2C_DW_IRQ_LEVEL_LOW)
|
||||
#define I2C_DW_IRQ_FLAGS (IOAPIC_LEVEL | IOAPIC_LOW)
|
||||
#endif
|
||||
#else
|
||||
#define I2C_DW_IRQ_FLAGS 0
|
||||
#endif /* CONFIG_IOAPIC */
|
||||
|
||||
/* system bindings */
|
||||
#if CONFIG_I2C_DW_0
|
||||
void i2c_config_0(struct device *port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue