Skip to content

Commit

Permalink
irq: removes priority parameter from IRQ_CONFIG macro
Browse files Browse the repository at this point in the history
Removes the 'priority' parameter from the IRQ_CONFIG macro.
This parameter was not used anymore in any architecture.
The priority is handled in the IRQ_CONNECT macro.
The documentation is updated as well.

Change-Id: I24a293c5e41bd729d5e759113e0c4a8a6a61e0dd
Signed-off-by: Juan Manuel Cruz <[email protected]>
  • Loading branch information
jmcruzal authored and nashif committed Feb 6, 2016
1 parent 4d7181b commit bc1a79c
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 31 deletions.
3 changes: 1 addition & 2 deletions arch/arc/platforms/quark_se_ss/platform_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ IRQ_CONNECT_STATIC(quark_se_ipi, QUARK_SE_IPI_INTERRUPT,

static int arc_quark_se_ipi_init(void)
{
IRQ_CONFIG(quark_se_ipi, QUARK_SE_IPI_INTERRUPT,
QUARK_SE_IPI_INTERRUPT_PRI);
IRQ_CONFIG(quark_se_ipi, QUARK_SE_IPI_INTERRUPT);
irq_enable(QUARK_SE_IPI_INTERRUPT);
return DEV_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/platforms/quark_se/quark_se_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ IRQ_CONNECT_STATIC(quark_se_ipi, QUARK_SE_IPI_INTERRUPT, QUARK_SE_IPI_INTERRUPT_

static int x86_quark_se_ipi_init(void)
{
IRQ_CONFIG(quark_se_ipi, QUARK_SE_IPI_INTERRUPT, 0);
IRQ_CONFIG(quark_se_ipi, QUARK_SE_IPI_INTERRUPT);
irq_enable(QUARK_SE_IPI_INTERRUPT);
return DEV_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion doc/kernel/nanokernel/nanokernel_interrupts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Example
void my_isr_installer(void)
{
...
IRQ_CONFIG(my_dev, MY_DEV_IRQ, 0); /* finish IRQ configuration */
IRQ_CONFIG(my_dev, MY_DEV_IRQ); /* finish IRQ configuration */
irq_enable(MY_DEV_IRQ); /* enable IRQ */
...
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/adc/adc_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ static void adc_config_0_irq(struct device *dev)
{
struct adc_config *config = dev->config->config_info;

IRQ_CONFIG(adc_dw_0_rx, IO_ADC0_INT_IRQ, 0);
IRQ_CONFIG(adc_dw_0_rx, IO_ADC0_INT_IRQ);
irq_enable(config->rx_vector);
IRQ_CONFIG(adc_dw_0_err, IO_ADC0_INT_ERR, 0);
IRQ_CONFIG(adc_dw_0_err, IO_ADC0_INT_ERR);
irq_enable(config->err_vector);
}
#endif
2 changes: 1 addition & 1 deletion drivers/aio/aio_dw_comparator.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static int dw_aio_cmp_config(struct device *dev)
{
ARG_UNUSED(dev);

IRQ_CONFIG(dw_aio_cmp, INT_AIO_CMP_IRQ, 0);
IRQ_CONFIG(dw_aio_cmp, INT_AIO_CMP_IRQ);

return DEV_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static void bt_uart_setup(struct device *uart)

uart_irq_rx_disable(uart);
uart_irq_tx_disable(uart);
IRQ_CONFIG(bluetooth, uart_irq_get(uart), 0);
IRQ_CONFIG(bluetooth, uart_irq_get(uart));
irq_enable(uart_irq_get(uart));

/* Drain the fifo */
Expand Down
2 changes: 1 addition & 1 deletion drivers/console/uart_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,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), 0);
IRQ_CONFIG(console, uart_irq_get(uart_console_dev));
irq_enable(uart_irq_get(uart_console_dev));

/* Drain the fifo */
Expand Down
2 changes: 1 addition & 1 deletion drivers/console/uart_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static void uart_pipe_setup(struct device *uart)
{
uart_irq_rx_disable(uart);
uart_irq_tx_disable(uart);
IRQ_CONFIG(uart_pipe, uart_irq_get(uart), 0);
IRQ_CONFIG(uart_pipe, uart_irq_get(uart));
irq_enable(uart_irq_get(uart));

/* Drain the fifo */
Expand Down
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static void eth_config_0_irq(struct device *port)

#ifdef CONFIG_ETH_DW_0_IRQ_DIRECT
ARG_UNUSED(shared_irq_dev);
IRQ_CONFIG(eth_dw_0, config->irq_num, 0);
IRQ_CONFIG(eth_dw_0, config->irq_num);
irq_enable(config->irq_num);
#elif defined(CONFIG_ETH_DW_0_IRQ_SHARED)
shared_irq_dev = device_get_binding(config->shared_irq_dev_name);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpio/gpio_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,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, 0);
IRQ_CONFIG(gpio_dw_0, config->irq_num);
irq_enable(config->irq_num);
#elif defined(CONFIG_GPIO_DW_0_IRQ_SHARED)
shared_irq_dev = device_get_binding(config->shared_irq_dev_name);
Expand Down Expand Up @@ -520,7 +520,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, 0);
IRQ_CONFIG(gpio_dw_1, config->irq_num);
irq_enable(config->irq_num);
#elif defined(CONFIG_GPIO_DW_1_IRQ_SHARED)
shared_irq_dev = device_get_binding(config->shared_irq_dev_name);
Expand Down
4 changes: 2 additions & 2 deletions drivers/i2c/i2c_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,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->irq_num, 0);
IRQ_CONFIG(i2c_dw_0, config->irq_num);
irq_enable(config->irq_num);
#elif defined(CONFIG_I2C_DW_0_IRQ_SHARED)
ARG_UNUSED(config);
Expand Down Expand Up @@ -906,7 +906,7 @@ void i2c_config_1(struct device *port)
struct device *shared_irq_dev;

ARG_UNUSED(shared_irq_dev);
IRQ_CONFIG(i2c_dw_1, config->irq_num, 0);
IRQ_CONFIG(i2c_dw_1, config->irq_num);
irq_enable(config->irq_num);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static struct rtc_driver_api funcs = {

int rtc_dw_init(struct device *dev)
{
IRQ_CONFIG(rtc, INT_RTC_IRQ, 0);
IRQ_CONFIG(rtc, INT_RTC_IRQ);
irq_enable(INT_RTC_IRQ);
SCSS_INTERRUPT->int_rtc_mask = INT_UNMASK_IA;
dev->driver_api = &funcs;
Expand Down
4 changes: 2 additions & 2 deletions drivers/shared_irq/shared_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,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, 0);
IRQ_CONFIG(shared_irq_0, config->irq_num);
}

void shared_irq_isr_0(void *unused)
Expand Down Expand Up @@ -187,7 +187,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, 0);
IRQ_CONFIG(shared_irq_1, config->irq_num);
}

void shared_irq_isr_1(void *unused)
Expand Down
4 changes: 2 additions & 2 deletions drivers/spi/dw_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ void spi_config_0_irq(struct device *dev)
{
struct spi_dw_config *config = dev->config->config_info;

IRQ_CONFIG(spi_dw_irq_port_0, config->irq, 0);
IRQ_CONFIG(spi_dw_irq_port_0, config->irq);
irq_enable(config->irq);
}

Expand Down Expand Up @@ -507,7 +507,7 @@ void spi_config_1_irq(struct device *dev)
{
struct spi_dw_config *config = dev->config->config_info;

IRQ_CONFIG(spi_dw_irq_port_1, config->irq, 0);
IRQ_CONFIG(spi_dw_irq_port_1, config->irq);
irq_enable(config->irq);
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/spi/intel_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ 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, 0);
IRQ_CONFIG(spi_intel_irq_port_0, config->irq);
}

#endif /* CONFIG_SPI_INTEL_PORT_0 */
Expand Down Expand Up @@ -512,7 +512,7 @@ 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, 0);
IRQ_CONFIG(spi_intel_irq_port_1, config->irq);
}

#endif /* CONFIG_SPI_INTEL_PORT_1 */
2 changes: 1 addition & 1 deletion drivers/timer/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ int _sys_clock_driver_init(struct device *device)
* still has to be programmed into the interrupt controller.
*/

IRQ_CONFIG(hpet, CONFIG_HPET_TIMER_IRQ, 0);
IRQ_CONFIG(hpet, CONFIG_HPET_TIMER_IRQ);

/* enable the IRQ in the interrupt controller */

Expand Down
2 changes: 1 addition & 1 deletion drivers/timer/loapic_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ int _sys_clock_driver_init(struct device *device)
* Although the stub has already been "connected", the vector number
* still has to be programmed into the interrupt controller.
*/
IRQ_CONFIG(loapic, CONFIG_LOAPIC_TIMER_IRQ, 0);
IRQ_CONFIG(loapic, CONFIG_LOAPIC_TIMER_IRQ);

/* Everything has been configured. It is now safe to enable the
* interrupt
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/wdt_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static int wdt_dw_set_config(struct wdt_config *config)

sys_set_bit(WDT_BASE_ADDR + WDT_CR, 1);

IRQ_CONFIG(wdt_dw, INT_WDT_IRQ, 0);
IRQ_CONFIG(wdt_dw, INT_WDT_IRQ);
irq_enable(INT_WDT_IRQ);

/* unmask WDT interrupts to lmt */
Expand Down
3 changes: 1 addition & 2 deletions include/arch/arc/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,11 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio);
* at the priority requested.
* @param device - Device name
* @param i IRQ number
* @param p Priority for the interruption
*
* @return N/A
*
*/
#define IRQ_CONFIG(device, i, p) \
#define IRQ_CONFIG(device, i) \
_irq_priority_set(i, _##device##_int_priority)

#endif
Expand Down
3 changes: 1 addition & 2 deletions include/arch/arm/cortex_m/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,10 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio);
*
* @param device Device to configure
* @param irq IRQ number
* @param priority IRQ priority (unused on this architecture)
* @return N/A
*
*/
#define IRQ_CONFIG(device, irq, priority) \
#define IRQ_CONFIG(device, irq) \
_irq_priority_set(irq, _##device##_int_priority)

#endif /* _ASMLANGUAGE */
Expand Down
3 changes: 1 addition & 2 deletions include/arch/x86/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,11 @@ extern unsigned char _irq_to_interrupt_vector[];
* For x86 platform configure APIC and mark interrupt vector allocated
* @param device Device - not used by macro
* @param irq IRQ
* @param priority IRQ priority, unused on this platform
*
* @return N/A
*
*/
#define IRQ_CONFIG(device, irq, priority) \
#define IRQ_CONFIG(device, irq) \
do { \
_SysIntVecProgram(_IRQ_TO_INTERRUPT_VECTOR((irq)), (irq), \
_##device##_irq_flags); \
Expand Down

0 comments on commit bc1a79c

Please sign in to comment.