x86: arm: Modify IRQ_CONFIG macro to have same signature as ARC

In order to have drivers that are usable cross architecture the
signature for IRQ_CONFIG needs to be the same to avoid #ifdef hell in
the driver code based on architecture.

Update the macro and it usage for existing drivers

Change-Id: I22e142b21d4e984add231d1dbd97020e4823985f
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Dirk Brandewie 2015-10-15 08:13:50 -07:00 committed by Anas Nashif
parent 2e938481ce
commit 147d6585ae
11 changed files with 15 additions and 14 deletions

View file

@ -257,7 +257,7 @@ static void bt_uart_setup(struct device *uart, struct uart_init_info *info)
uart_irq_rx_disable(uart);
uart_irq_tx_disable(uart);
IRQ_CONFIG(bluetooth, uart_irq_get(uart));
IRQ_CONFIG(bluetooth, uart_irq_get(uart), 0);
irq_enable(uart_irq_get(uart));
/* Drain the fifo */

View file

@ -176,7 +176,7 @@ static void console_input_init(void)
uart_irq_rx_disable(UART_CONSOLE_DEV);
uart_irq_tx_disable(UART_CONSOLE_DEV);
IRQ_CONFIG(console, uart_irq_get(UART_CONSOLE_DEV));
IRQ_CONFIG(console, uart_irq_get(UART_CONSOLE_DEV), 0);
irq_enable(uart_irq_get(UART_CONSOLE_DEV));
/* Drain the fifo */

View file

@ -377,7 +377,7 @@ void gpio_config_0_irq(struct device *port)
#ifdef CONFIG_GPIO_DW_0_IRQ_DIRECT
ARG_UNUSED(shared_irq_dev);
IRQ_CONFIG(gpio_dw_0, config->irq_num);
IRQ_CONFIG(gpio_dw_0, config->irq_num, 0);
irq_enable(config->irq_num);
#elif defined(CONFIG_GPIO_DW_0_IRQ_SHARED)
ARG_UNUSED(config);
@ -440,7 +440,7 @@ void gpio_config_1_irq(struct device *port)
#ifdef CONFIG_GPIO_DW_1_IRQ_DIRECT
ARG_UNUSED(shared_irq_dev);
IRQ_CONFIG(gpio_dw_1, config->irq_num);
IRQ_CONFIG(gpio_dw_1, config->irq_num, 0);
irq_enable(config->irq_num);
#elif defined(CONFIG_GPIO_DW_1_IRQ_SHARED)
ARG_UNUSED(config);

View file

@ -854,7 +854,7 @@ void i2c_config_0(struct device *port)
#if defined(CONFIG_I2C_DW_0_IRQ_DIRECT)
ARG_UNUSED(shared_irq_dev);
IRQ_CONFIG(i2c_dw_0, config->interrupt_vector);
IRQ_CONFIG(i2c_dw_0, config->interrupt_vector, 0);
irq_enable(config->interrupt_vector);
#elif defined(CONFIG_I2C_DW_0_IRQ_SHARED)
ARG_UNUSED(config);

View file

@ -151,7 +151,7 @@ void shared_irq_config_0_irq(struct device *port)
{
struct shared_irq_config *config = port->config->config_info;
IRQ_CONFIG(shared_irq_0, config->irq_num);
IRQ_CONFIG(shared_irq_0, config->irq_num, 0);
}
void shared_irq_isr_0(void *unused)
@ -183,7 +183,7 @@ void shared_irq_config_1_irq(struct device *port)
{
struct shared_irq_config *config = port->config->config_info;
IRQ_CONFIG(shared_irq_1, config->irq_num);
IRQ_CONFIG(shared_irq_1, config->irq_num, 0);
}
void shared_irq_isr_1(void *unused)

View file

@ -76,7 +76,7 @@ static void uart_simple_setup(struct device *uart, struct uart_init_info *info)
uart_irq_rx_disable(uart);
uart_irq_tx_disable(uart);
IRQ_CONFIG(uart_simple, uart_irq_get(uart));
IRQ_CONFIG(uart_simple, uart_irq_get(uart), 0);
irq_enable(uart_irq_get(uart));
/* Drain the fifo */

View file

@ -462,7 +462,7 @@ IRQ_CONNECT_STATIC(spi_intel_irq_port_0, CONFIG_SPI_INTEL_PORT_0_IRQ,
void spi_config_0_irq(struct device *dev)
{
struct spi_intel_config *config = dev->config->config_info;
IRQ_CONFIG(spi_intel_irq_port_0, config->irq);
IRQ_CONFIG(spi_intel_irq_port_0, config->irq, 0);
}
#endif /* CONFIG_SPI_INTEL_PORT_0 */
@ -505,7 +505,7 @@ IRQ_CONNECT_STATIC(spi_intel_irq_port_1, CONFIG_SPI_INTEL_PORT_1_IRQ,
void spi_config_1_irq(struct device *dev)
{
struct spi_intel_config *config = dev->config->config_info;
IRQ_CONFIG(spi_intel_irq_port_1, config->irq);
IRQ_CONFIG(spi_intel_irq_port_1, config->irq, 0);
}
#endif /* CONFIG_SPI_INTEL_PORT_1 */

View file

@ -613,7 +613,7 @@ int _sys_clock_driver_init(struct device *device)
* has to be programmed into the interrupt controller.
*/
IRQ_CONFIG(hpet, CONFIG_HPET_TIMER_IRQ);
IRQ_CONFIG(hpet, CONFIG_HPET_TIMER_IRQ, 0);
/* enable the IRQ in the interrupt controller */

View file

@ -599,7 +599,7 @@ int _sys_clock_driver_init(struct device *device)
* still
* has to be programmed into the interrupt controller.
*/
IRQ_CONFIG(loapic, CONFIG_LOAPIC_TIMER_IRQ);
IRQ_CONFIG(loapic, CONFIG_LOAPIC_TIMER_IRQ, 0);
/* Everything has been configured. It is now safe to enable the
* interrupt */

View file

@ -83,7 +83,8 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio);
* @return N/A
*
*/
#define IRQ_CONFIG(device, irq) _irq_priority_set(irq, _##device##_int_priority)
#define IRQ_CONFIG(device, irq, priority) \
_irq_priority_set(irq, _##device##_int_priority)
#endif /* _ASMLANGUAGE */

View file

@ -173,7 +173,7 @@ typedef struct s_isrList {
* @return N/A
*
*/
#define IRQ_CONFIG(device, irq) \
#define IRQ_CONFIG(device, irq, priority) \
do { \
_SysIntVecProgram(_##device##_int_vector, irq); \
_IntVecMarkAllocated(_##device##_int_vector); \