irq: rename irq_connect() to IRQ_CONNECT()

It's not a function and requires all its arguments to be build-time
constants. Make this more obvious to the end user to ease confusion.

Change-Id: I64107cf4d9db9f0e853026ce78e477060570fe6f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-01-27 10:07:31 -08:00 committed by Anas Nashif
commit 897ffaeb2c
35 changed files with 64 additions and 68 deletions

View file

@ -24,7 +24,7 @@
static int arc_quark_se_ipm_init(void) static int arc_quark_se_ipm_init(void)
{ {
irq_connect(QUARK_SE_IPM_INTERRUPT, QUARK_SE_IPM_INTERRUPT_PRI, IRQ_CONNECT(QUARK_SE_IPM_INTERRUPT, QUARK_SE_IPM_INTERRUPT_PRI,
quark_se_ipm_isr, NULL, 0); quark_se_ipm_isr, NULL, 0);
irq_enable(QUARK_SE_IPM_INTERRUPT); irq_enable(QUARK_SE_IPM_INTERRUPT);
return DEV_OK; return DEV_OK;

View file

@ -228,7 +228,7 @@ config NUM_DYNAMIC_STUBS
default 0 default 0
help help
This option specifies the number of interrupt handlers that can be This option specifies the number of interrupt handlers that can be
installed dynamically using irq_connect(). installed dynamically using irq_connect_dynamic().
config NUM_DYNAMIC_EXC_STUBS config NUM_DYNAMIC_EXC_STUBS
int "Number of dynamic exception stubs" int "Number of dynamic exception stubs"

View file

@ -60,7 +60,7 @@
* *
* @brief Inform the kernel of an interrupt * @brief Inform the kernel of an interrupt
* *
* This function is called from the interrupt stub created by irq_connect() * This function is called from the interrupt stub created by IRQ_CONNECT()
* to inform the kernel of an interrupt. This routine increments * to inform the kernel of an interrupt. This routine increments
* _nanokernel.nested (to support interrupt nesting), switches to the * _nanokernel.nested (to support interrupt nesting), switches to the
* base of the interrupt stack, if not already on the interrupt stack, and then * base of the interrupt stack, if not already on the interrupt stack, and then
@ -132,7 +132,7 @@ SECTION_FUNC(TEXT, _IntEnt)
/* /*
* Volatile registers are now saved it is safe to start measuring * Volatile registers are now saved it is safe to start measuring
* how long interrupt are disabled. * how long interrupt are disabled.
* The interrupt gate created by irq_connect disables the * The interrupt gate created by IRQ_CONNECT disables the
* interrupt. * interrupt.
* *
* Preserve EAX as it contains the stub return address. * Preserve EAX as it contains the stub return address.
@ -253,7 +253,7 @@ SECTION_FUNC(TEXT, _IntExitWithEoi)
* *
* @brief Inform the kernel of an interrupt exit * @brief Inform the kernel of an interrupt exit
* *
* This function is called from the interrupt stub created by irq_connect() * This function is called from the interrupt stub created by IRQ_CONNECT()
* to inform the kernel that the processing of an interrupt has * to inform the kernel that the processing of an interrupt has
* completed. This routine decrements _nanokernel.nested (to support interrupt * completed. This routine decrements _nanokernel.nested (to support interrupt
* nesting), restores the volatile integer registers, and then switches * nesting), restores the volatile integer registers, and then switches

View file

@ -21,10 +21,6 @@
* This module provides routines to manage asynchronous interrupts * This module provides routines to manage asynchronous interrupts
* on the IA-32 architecture. * on the IA-32 architecture.
* *
* This module provides the public routine irq_connect(), the private
* routine _IntVecSet(), and the support routines _IntVecAlloc(),
* _IntVecMarkAllocated() and _IntVecMarkFree().
*
* INTERNAL * INTERNAL
* The _idt_base_address symbol is used to determine the base address of the IDT. * The _idt_base_address symbol is used to determine the base address of the IDT.
* (It is generated by the linker script, and doesn't correspond to an actual * (It is generated by the linker script, and doesn't correspond to an actual
@ -34,8 +30,8 @@
* in intstub.S. Each one pushes a "stub id" onto the stack and calls * in intstub.S. Each one pushes a "stub id" onto the stack and calls
* common_dynamic_handler, which uses the stub id to pull the details * common_dynamic_handler, which uses the stub id to pull the details
* about what to do with the dynamic IRQ out of the dyn_irq_list array. * about what to do with the dynamic IRQ out of the dyn_irq_list array.
* This array is populated by calls to irq_connect(), which also installs * This array is populated by calls to irq_connect_dynamic(), which also
* the associated dynamic stub in the IDT. * installs the associated dynamic stub in the IDT.
*/ */
@ -89,7 +85,7 @@ void *__attribute__((section(".spurNoErrIsr")))
* @return N/A * @return N/A
* *
* INTERNAL * INTERNAL
* Unlike nanoCpuExcConnect() and irq_connect(), the _IntVecSet() routine * Unlike nanoCpuExcConnect() and irq_connect_dynamic(), the _IntVecSet() routine
* is a very basic API that simply updates the appropriate entry in Interrupt * is a very basic API that simply updates the appropriate entry in Interrupt
* Descriptor Table (IDT) such that the specified routine is invoked when the * Descriptor Table (IDT) such that the specified routine is invoked when the
* specified interrupt vector is asserted. * specified interrupt vector is asserted.
@ -140,8 +136,8 @@ extern unsigned int _interrupt_vectors_allocated[];
/* /*
* Guard against situations when ALL_DYN_IRQ_STUBS is left equal to 0, * Guard against situations when ALL_DYN_IRQ_STUBS is left equal to 0,
* but irq_connect is still used, which causes system failure. * but irq_connect_dynamic is still used, which causes system failure.
* If ALL_DYN_IRQ_STUBS is left 0, but irq_connect is used, linker * If ALL_DYN_IRQ_STUBS is left 0, but irq_connect_dynamic is used, linker
* generates an error * generates an error
*/ */
struct dyn_irq_info { struct dyn_irq_info {

View file

@ -29,7 +29,7 @@
static int x86_quark_se_ipm_init(void) static int x86_quark_se_ipm_init(void)
{ {
irq_connect(QUARK_SE_IPM_INTERRUPT, QUARK_SE_IPM_INTERRUPT_PRI, IRQ_CONNECT(QUARK_SE_IPM_INTERRUPT, QUARK_SE_IPM_INTERRUPT_PRI,
quark_se_ipm_isr, NULL, 0); quark_se_ipm_isr, NULL, 0);
irq_enable(QUARK_SE_IPM_INTERRUPT); irq_enable(QUARK_SE_IPM_INTERRUPT);
return DEV_OK; return DEV_OK;

View file

@ -53,7 +53,7 @@ extern "C" {
#define INT_VEC_IRQ0 0x20 /* Vector number for IRQ0 */ #define INT_VEC_IRQ0 0x20 /* Vector number for IRQ0 */
/* /*
* The irq_connect() API connects to a (virtualized) IRQ and the * The IRQ_CONNECT() API connects to a (virtualized) IRQ and the
* associated interrupt controller is programmed with the allocated vector. * associated interrupt controller is programmed with the allocated vector.
* The Quark board virtualizes IRQs as follows: * The Quark board virtualizes IRQs as follows:
* *

View file

@ -62,7 +62,7 @@ typedef void (*vvpfn)(void *);
* Opcode for generating a software interrupt. The ISR associated with each * Opcode for generating a software interrupt. The ISR associated with each
* of these software interrupts will call either nano_isr_lifo_put() or * of these software interrupts will call either nano_isr_lifo_put() or
* nano_isr_lifo_get(). The imm8 data in the opcode sequence will need to be * nano_isr_lifo_get(). The imm8 data in the opcode sequence will need to be
* filled in after calling irq_connect(). * filled in after calling IRQ_CONNECT().
*/ */
static char sw_isr_trigger_0[] = static char sw_isr_trigger_0[] =
@ -125,7 +125,7 @@ static int initIRQ
if (i->isr[0]) if (i->isr[0])
{ {
vector = irq_connect (NANO_SOFT_IRQ, IRQ_PRIORITY, i->isr[0], vector = IRQ_CONNECT(NANO_SOFT_IRQ, IRQ_PRIORITY, i->isr[0],
i->arg[0], nanoIntStub1, 0); i->arg[0], nanoIntStub1, 0);
if (-1 == vector) if (-1 == vector)
{ {
@ -137,7 +137,7 @@ static int initIRQ
#if NUM_SW_IRQS >= 2 #if NUM_SW_IRQS >= 2
if (i->isr[1]) if (i->isr[1])
{ {
vector = irq_connect (NANO_SOFT_IRQ, IRQ_PRIORITY, i->isr[1], vector = IRQ_CONNECT(NANO_SOFT_IRQ, IRQ_PRIORITY, i->isr[1],
i->arg[1], nanoIntStub2, 0); i->arg[1], nanoIntStub2, 0);
if (-1 == vector) if (-1 == vector)
{ {
@ -150,12 +150,12 @@ static int initIRQ
#if defined(CONFIG_CPU_CORTEX_M) #if defined(CONFIG_CPU_CORTEX_M)
if (i->isr[0]) if (i->isr[0])
{ {
(void) irq_connect (0, IRQ_PRIORITY, i->isr[0], i->arg[0], 0); (void) IRQ_CONNECT(0, IRQ_PRIORITY, i->isr[0], i->arg[0], 0);
irq_enable (0); irq_enable (0);
} }
if (i->isr[1]) if (i->isr[1])
{ {
(void) irq_connect (1, IRQ_PRIORITY, i->isr[1], i->arg[1], 0); (void) IRQ_CONNECT(1, IRQ_PRIORITY, i->isr[1], i->arg[1], 0);
irq_enable (1); irq_enable (1);
} }
#endif /* CONFIG_CPU_CORTEX_M */ #endif /* CONFIG_CPU_CORTEX_M */

View file

@ -107,7 +107,7 @@ Example
void my_isr_installer(void) void my_isr_installer(void)
{ {
... ...
irq_connect(MY_DEV_IRQ, MY_DEV_PRIO, my_isr, MY_ISR_ARG, MY_IRQ_FLAGS); IRQ_CONNECT(MY_DEV_IRQ, MY_DEV_PRIO, my_isr, MY_ISR_ARG, MY_IRQ_FLAGS);
irq_enable(MY_DEV_IRQ); /* enable IRQ */ irq_enable(MY_DEV_IRQ); /* enable IRQ */
... ...
} }
@ -254,6 +254,6 @@ Macros
These are the macros used to install a static ISR. These are the macros used to install a static ISR.
:c:macro:`irq_connect()` :c:macro:`IRQ_CONNECT()`
Registers a static ISR with the IDT. Registers a static ISR with the IDT.

View file

@ -277,7 +277,7 @@ For example, if 3 bits are implemented, use 1, 2, and 3,
not 0x20h, 0x40h, and 0x60h. not 0x20h, 0x40h, and 0x60h.
Interrupt priority is set using the *prio* parameter of Interrupt priority is set using the *prio* parameter of
:c:macro:`irq_connect()` or :c:func:`irq_connect_dynamic()`. :c:macro:`IRQ_CONNECT()` or :c:func:`irq_connect_dynamic()`.
The range of available priorities is different if using Zero Latency Interrupts The range of available priorities is different if using Zero Latency Interrupts
(ZLI) or not. (ZLI) or not.

View file

@ -535,11 +535,11 @@ DEVICE_INIT(adc_dw_0, CONFIG_ADC_DW_NAME_0, &adc_dw_init,
static void adc_config_0_irq(void) static void adc_config_0_irq(void)
{ {
irq_connect(CONFIG_ADC_DW_0_RX_IRQ, CONFIG_ADC_DW_0_PRI, adc_dw_rx_isr, IRQ_CONNECT(CONFIG_ADC_DW_0_RX_IRQ, CONFIG_ADC_DW_0_PRI, adc_dw_rx_isr,
DEVICE_GET(adc_dw_0), 0); DEVICE_GET(adc_dw_0), 0);
irq_enable(CONFIG_ADC_DW_0_RX_IRQ); irq_enable(CONFIG_ADC_DW_0_RX_IRQ);
irq_connect(CONFIG_ADC_DW_0_ERR_IRQ, CONFIG_ADC_DW_0_PRI, IRQ_CONNECT(CONFIG_ADC_DW_0_ERR_IRQ, CONFIG_ADC_DW_0_PRI,
adc_dw_err_isr, DEVICE_GET(adc_dw_0), 0); adc_dw_err_isr, DEVICE_GET(adc_dw_0), 0);
irq_enable(CONFIG_ADC_DW_0_ERR_IRQ); irq_enable(CONFIG_ADC_DW_0_ERR_IRQ);
} }

View file

@ -213,7 +213,7 @@ static int dw_aio_cmp_config(struct device *dev)
{ {
ARG_UNUSED(dev); ARG_UNUSED(dev);
irq_connect(INT_AIO_CMP_IRQ, 0, dw_aio_cmp_isr, IRQ_CONNECT(INT_AIO_CMP_IRQ, 0, dw_aio_cmp_isr,
DEVICE_GET(dw_aio_cmp), 0); DEVICE_GET(dw_aio_cmp), 0);
return DEV_OK; return DEV_OK;
} }

View file

@ -224,7 +224,7 @@ static int h4_open(void)
uart_irq_rx_disable(h4_dev); uart_irq_rx_disable(h4_dev);
uart_irq_tx_disable(h4_dev); uart_irq_tx_disable(h4_dev);
irq_connect(CONFIG_BLUETOOTH_UART_IRQ, CONFIG_BLUETOOTH_UART_IRQ_PRI, IRQ_CONNECT(CONFIG_BLUETOOTH_UART_IRQ, CONFIG_BLUETOOTH_UART_IRQ_PRI,
bt_uart_isr, 0, UART_IRQ_FLAGS); bt_uart_isr, 0, UART_IRQ_FLAGS);
irq_enable(CONFIG_BLUETOOTH_UART_IRQ); irq_enable(CONFIG_BLUETOOTH_UART_IRQ);

View file

@ -752,7 +752,7 @@ static int h5_open(void)
uart_irq_rx_disable(h5_dev); uart_irq_rx_disable(h5_dev);
uart_irq_tx_disable(h5_dev); uart_irq_tx_disable(h5_dev);
irq_connect(CONFIG_BLUETOOTH_UART_IRQ, CONFIG_BLUETOOTH_UART_IRQ_PRI, IRQ_CONNECT(CONFIG_BLUETOOTH_UART_IRQ, CONFIG_BLUETOOTH_UART_IRQ_PRI,
bt_uart_isr, 0, UART_IRQ_FLAGS); bt_uart_isr, 0, UART_IRQ_FLAGS);
irq_enable(CONFIG_BLUETOOTH_UART_IRQ); irq_enable(CONFIG_BLUETOOTH_UART_IRQ);

View file

@ -372,7 +372,7 @@ static void console_input_init(void)
uart_irq_rx_disable(uart_console_dev); uart_irq_rx_disable(uart_console_dev);
uart_irq_tx_disable(uart_console_dev); uart_irq_tx_disable(uart_console_dev);
irq_connect(CONFIG_UART_CONSOLE_IRQ, CONFIG_UART_CONSOLE_IRQ_PRI, IRQ_CONNECT(CONFIG_UART_CONSOLE_IRQ, CONFIG_UART_CONSOLE_IRQ_PRI,
uart_console_isr, 0, UART_IRQ_FLAGS); uart_console_isr, 0, UART_IRQ_FLAGS);
irq_enable(CONFIG_UART_CONSOLE_IRQ); irq_enable(CONFIG_UART_CONSOLE_IRQ);

View file

@ -77,7 +77,7 @@ static void uart_pipe_setup(struct device *uart)
uart_irq_rx_disable(uart); uart_irq_rx_disable(uart);
uart_irq_tx_disable(uart); uart_irq_tx_disable(uart);
irq_connect(CONFIG_UART_PIPE_IRQ, CONFIG_UART_PIPE_IRQ_PRI, IRQ_CONNECT(CONFIG_UART_PIPE_IRQ, CONFIG_UART_PIPE_IRQ_PRI,
uart_pipe_isr, 0, UART_IRQ_FLAGS); uart_pipe_isr, 0, UART_IRQ_FLAGS);
irq_enable(CONFIG_UART_PIPE_IRQ); irq_enable(CONFIG_UART_PIPE_IRQ);

View file

@ -319,7 +319,7 @@ static void eth_config_0_irq(struct device *port)
#ifdef CONFIG_ETH_DW_0_IRQ_DIRECT #ifdef CONFIG_ETH_DW_0_IRQ_DIRECT
ARG_UNUSED(shared_irq_dev); ARG_UNUSED(shared_irq_dev);
irq_connect(CONFIG_ETH_DW_0_IRQ, CONFIG_ETH_DW_0_PRI, eth_dw_isr, IRQ_CONNECT(CONFIG_ETH_DW_0_IRQ, CONFIG_ETH_DW_0_PRI, eth_dw_isr,
DEVICE_GET(eth_dw_0), 0); DEVICE_GET(eth_dw_0), 0);
irq_enable(CONFIG_ETH_DW_0_IRQ); irq_enable(CONFIG_ETH_DW_0_IRQ);
#elif defined(CONFIG_ETH_DW_0_IRQ_SHARED) #elif defined(CONFIG_ETH_DW_0_IRQ_SHARED)

View file

@ -477,7 +477,7 @@ void gpio_config_0_irq(struct device *port)
#ifdef CONFIG_GPIO_DW_0_IRQ_DIRECT #ifdef CONFIG_GPIO_DW_0_IRQ_DIRECT
ARG_UNUSED(shared_irq_dev); ARG_UNUSED(shared_irq_dev);
irq_connect(CONFIG_GPIO_DW_0_IRQ, CONFIG_GPIO_DW_0_PRI, gpio_dw_isr, IRQ_CONNECT(CONFIG_GPIO_DW_0_IRQ, CONFIG_GPIO_DW_0_PRI, gpio_dw_isr,
DEVICE_GET(gpio_dw_0), GPIO_DW_0_IRQ_FLAGS); DEVICE_GET(gpio_dw_0), GPIO_DW_0_IRQ_FLAGS);
irq_enable(config->irq_num); irq_enable(config->irq_num);
#elif defined(CONFIG_GPIO_DW_0_IRQ_SHARED) #elif defined(CONFIG_GPIO_DW_0_IRQ_SHARED)
@ -551,7 +551,7 @@ void gpio_config_1_irq(struct device *port)
#ifdef CONFIG_GPIO_DW_1_IRQ_DIRECT #ifdef CONFIG_GPIO_DW_1_IRQ_DIRECT
ARG_UNUSED(shared_irq_dev); ARG_UNUSED(shared_irq_dev);
irq_connect(CONFIG_GPIO_DW_1_IRQ, CONFIG_GPIO_DW_1_PRI, gpio_dw_isr, IRQ_CONNECT(CONFIG_GPIO_DW_1_IRQ, CONFIG_GPIO_DW_1_PRI, gpio_dw_isr,
DEVICE_GET(gpio_dw_1), GPIO_DW_1_IRQ_FLAGS); DEVICE_GET(gpio_dw_1), GPIO_DW_1_IRQ_FLAGS);
irq_enable(config->irq_num); irq_enable(config->irq_num);
#elif defined(CONFIG_GPIO_DW_1_IRQ_SHARED) #elif defined(CONFIG_GPIO_DW_1_IRQ_SHARED)

View file

@ -258,7 +258,7 @@ int gpio_qmsi_init(struct device *port)
sys_write32(0, reg + INTEN); sys_write32(0, reg + INTEN);
sys_write32(~(0), reg + PORTA_EOI); sys_write32(~(0), reg + PORTA_EOI);
irq_connect(CONFIG_GPIO_QMSI_0_IRQ, CONFIG_GPIO_QMSI_0_PRI, qm_gpio_isr_0, IRQ_CONNECT(CONFIG_GPIO_QMSI_0_IRQ, CONFIG_GPIO_QMSI_0_PRI, qm_gpio_isr_0,
0, IOAPIC_EDGE | IOAPIC_HIGH); 0, IOAPIC_EDGE | IOAPIC_HIGH);
/* Enable GPIO IRQ and unmask interrupts for Lakemont. */ /* Enable GPIO IRQ and unmask interrupts for Lakemont. */

View file

@ -784,7 +784,7 @@ void i2c_config_0(struct device *port)
#if defined(CONFIG_I2C_DW_0_IRQ_DIRECT) #if defined(CONFIG_I2C_DW_0_IRQ_DIRECT)
ARG_UNUSED(shared_irq_dev); ARG_UNUSED(shared_irq_dev);
irq_connect(CONFIG_I2C_DW_0_IRQ, CONFIG_I2C_DW_0_INT_PRIORITY, IRQ_CONNECT(CONFIG_I2C_DW_0_IRQ, CONFIG_I2C_DW_0_INT_PRIORITY,
i2c_dw_isr, DEVICE_GET(i2c_0), I2C_DW_IRQ_FLAGS); i2c_dw_isr, DEVICE_GET(i2c_0), I2C_DW_IRQ_FLAGS);
irq_enable(config->irq_num); irq_enable(config->irq_num);
#elif defined(CONFIG_I2C_DW_0_IRQ_SHARED) #elif defined(CONFIG_I2C_DW_0_IRQ_SHARED)
@ -833,7 +833,7 @@ void i2c_config_1(struct device *port)
struct device *shared_irq_dev; struct device *shared_irq_dev;
ARG_UNUSED(shared_irq_dev); ARG_UNUSED(shared_irq_dev);
irq_connect(CONFIG_I2C_DW_1_IRQ, CONFIG_I2C_DW_1_INT_PRIORITY, IRQ_CONNECT(CONFIG_I2C_DW_1_IRQ, CONFIG_I2C_DW_1_INT_PRIORITY,
i2c_dw_isr, DEVICE_GET(i2c_1), I2C_DW_IRQ_FLAGS); i2c_dw_isr, DEVICE_GET(i2c_1), I2C_DW_IRQ_FLAGS);
irq_enable(config->irq_num); irq_enable(config->irq_num);
} }

View file

@ -686,13 +686,13 @@ void _i2c_qse_ss_config_irq_0(struct device *port)
_i2c_qse_ss_memory_write(SCSS_REGISTER_BASE, I2C_SS_0_STOP_MASK, mask); _i2c_qse_ss_memory_write(SCSS_REGISTER_BASE, I2C_SS_0_STOP_MASK, mask);
/* Connect the IRQs to ISR */ /* Connect the IRQs to ISR */
irq_connect(I2C_SS_0_ERR_VECTOR, 1, i2c_qse_ss_isr, IRQ_CONNECT(I2C_SS_0_ERR_VECTOR, 1, i2c_qse_ss_isr,
DEVICE_GET(i2c_ss_0), 0); DEVICE_GET(i2c_ss_0), 0);
irq_connect(I2C_SS_0_RX_VECTOR, 1, i2c_qse_ss_isr, IRQ_CONNECT(I2C_SS_0_RX_VECTOR, 1, i2c_qse_ss_isr,
DEVICE_GET(i2c_ss_0), 0); DEVICE_GET(i2c_ss_0), 0);
irq_connect(I2C_SS_0_TX_VECTOR, 1, i2c_qse_ss_isr, IRQ_CONNECT(I2C_SS_0_TX_VECTOR, 1, i2c_qse_ss_isr,
DEVICE_GET(i2c_ss_0), 0); DEVICE_GET(i2c_ss_0), 0);
irq_connect(I2C_SS_0_STOP_VECTOR, 1, i2c_qse_ss_isr, IRQ_CONNECT(I2C_SS_0_STOP_VECTOR, 1, i2c_qse_ss_isr,
DEVICE_GET(i2c_ss_0), 0); DEVICE_GET(i2c_ss_0), 0);
irq_enable(I2C_SS_0_ERR_VECTOR); irq_enable(I2C_SS_0_ERR_VECTOR);
@ -748,13 +748,13 @@ void _i2c_qse_ss_config_irq_1(struct device *port)
_i2c_qse_ss_memory_write(SCSS_REGISTER_BASE, I2C_SS_1_STOP_MASK, mask); _i2c_qse_ss_memory_write(SCSS_REGISTER_BASE, I2C_SS_1_STOP_MASK, mask);
/* Connect the IRQs to ISR */ /* Connect the IRQs to ISR */
irq_connect(I2C_SS_1_ERR_VECTOR, 1, i2c_qse_ss_isr, IRQ_CONNECT(I2C_SS_1_ERR_VECTOR, 1, i2c_qse_ss_isr,
DEVICE_GET(i2c_ss_1), 0); DEVICE_GET(i2c_ss_1), 0);
irq_connect(I2C_SS_1_RX_VECTOR, 1, i2c_qse_ss_isr, IRQ_CONNECT(I2C_SS_1_RX_VECTOR, 1, i2c_qse_ss_isr,
DEVICE_GET(i2c_ss_1), 0); DEVICE_GET(i2c_ss_1), 0);
irq_connect(I2C_SS_1_TX_VECTOR, 1, i2c_qse_ss_isr, IRQ_CONNECT(I2C_SS_1_TX_VECTOR, 1, i2c_qse_ss_isr,
DEVICE_GET(i2c_ss_1), 0); DEVICE_GET(i2c_ss_1), 0);
irq_connect(I2C_SS_1_STOP_VECTOR, 1, i2c_qse_ss_isr, IRQ_CONNECT(I2C_SS_1_STOP_VECTOR, 1, i2c_qse_ss_isr,
DEVICE_GET(i2c_ss_1), 0); DEVICE_GET(i2c_ss_1), 0);
irq_enable(I2C_SS_1_ERR_VECTOR); irq_enable(I2C_SS_1_ERR_VECTOR);

View file

@ -131,7 +131,7 @@ int _SysIntVecAlloc(
* This routine programs the interrupt controller with the given vector * This routine programs the interrupt controller with the given vector
* based on the given IRQ parameter. * based on the given IRQ parameter.
* *
* Drivers call this routine instead of irq_connect() when interrupts are * Drivers call this routine instead of IRQ_CONNECT() when interrupts are
* configured statically. * configured statically.
* *
* The Galileo board virtualizes IRQs as follows: * The Galileo board virtualizes IRQs as follows:

View file

@ -206,7 +206,7 @@ DEVICE_INIT(rtc, CONFIG_RTC_DRV_NAME, &rtc_dw_init,
int rtc_dw_init(struct device *dev) int rtc_dw_init(struct device *dev)
{ {
irq_connect(CONFIG_RTC_IRQ, CONFIG_RTC_IRQ_PRI, rtc_dw_isr, IRQ_CONNECT(CONFIG_RTC_IRQ, CONFIG_RTC_IRQ_PRI, rtc_dw_isr,
DEVICE_GET(rtc), 0); DEVICE_GET(rtc), 0);
irq_enable(CONFIG_RTC_IRQ); irq_enable(CONFIG_RTC_IRQ);

View file

@ -79,7 +79,7 @@ static struct rtc_driver_api api = {
static int rtc_qmsi_init(struct device *dev) static int rtc_qmsi_init(struct device *dev)
{ {
irq_connect(CONFIG_RTC_IRQ, CONFIG_RTC_IRQ_PRI, qm_rtc_isr_0, 0, IRQ_CONNECT(CONFIG_RTC_IRQ, CONFIG_RTC_IRQ_PRI, qm_rtc_isr_0, 0,
IOAPIC_EDGE | IOAPIC_HIGH); IOAPIC_EDGE | IOAPIC_HIGH);
/* Unmask RTC interrupt */ /* Unmask RTC interrupt */

View file

@ -166,7 +166,7 @@ DEVICE_INIT(shared_irq_0, CONFIG_SHARED_IRQ_0_NAME, shared_irq_initialize,
void shared_irq_config_0_irq(void) void shared_irq_config_0_irq(void)
{ {
irq_connect(CONFIG_SHARED_IRQ_0_IRQ, CONFIG_SHARED_IRQ_0_PRI, IRQ_CONNECT(CONFIG_SHARED_IRQ_0_IRQ, CONFIG_SHARED_IRQ_0_PRI,
shared_irq_isr, DEVICE_GET(shared_irq_0), shared_irq_isr, DEVICE_GET(shared_irq_0),
SHARED_IRQ_0_FLAGS); SHARED_IRQ_0_FLAGS);
} }
@ -206,7 +206,7 @@ DEVICE_INIT(shared_irq_1, CONFIG_SHARED_IRQ_1_NAME, shared_irq_initialize,
void shared_irq_config_1_irq(void) void shared_irq_config_1_irq(void)
{ {
irq_connect(CONFIG_SHARED_IRQ_1_IRQ, CONFIG_SHARED_IRQ_1_PRI, IRQ_CONNECT(CONFIG_SHARED_IRQ_1_IRQ, CONFIG_SHARED_IRQ_1_PRI,
shared_irq_isr, DEVICE_GET(shared_irq_1), shared_irq_isr, DEVICE_GET(shared_irq_1),
SHARED_IRQ_1_FLAGS); SHARED_IRQ_1_FLAGS);
} }

View file

@ -588,7 +588,7 @@ DEVICE_INIT(spi_dw_port_0, CONFIG_SPI_DW_PORT_0_DRV_NAME, spi_dw_init,
void spi_config_0_irq(void) void spi_config_0_irq(void)
{ {
irq_connect(CONFIG_SPI_DW_PORT_0_IRQ, CONFIG_SPI_DW_PORT_0_PRI, IRQ_CONNECT(CONFIG_SPI_DW_PORT_0_IRQ, CONFIG_SPI_DW_PORT_0_PRI,
spi_dw_isr, DEVICE_GET(spi_dw_port_0), spi_dw_isr, DEVICE_GET(spi_dw_port_0),
SPI_DW_IRQ_FLAGS); SPI_DW_IRQ_FLAGS);
irq_enable(CONFIG_SPI_DW_PORT_0_IRQ); irq_enable(CONFIG_SPI_DW_PORT_0_IRQ);
@ -619,7 +619,7 @@ DEVICE_INIT(spi_dw_port_1, CONFIG_SPI_DW_PORT_1_DRV_NAME, spi_dw_init,
void spi_config_1_irq(void) void spi_config_1_irq(void)
{ {
irq_connect(CONFIG_SPI_DW_PORT_1_IRQ, CONFIG_SPI_DW_PORT_1_PRI, IRQ_CONNECT(CONFIG_SPI_DW_PORT_1_IRQ, CONFIG_SPI_DW_PORT_1_PRI,
spi_dw_isr, DEVICE_GET(spi_dw_port_1), spi_dw_isr, DEVICE_GET(spi_dw_port_1),
SPI_DW_IRQ_FLAGS); SPI_DW_IRQ_FLAGS);
irq_enable(CONFIG_SPI_DW_PORT_1_IRQ); irq_enable(CONFIG_SPI_DW_PORT_1_IRQ);

View file

@ -474,7 +474,7 @@ DEVICE_INIT(spi_intel_port_0, CONFIG_SPI_INTEL_PORT_0_DRV_NAME, spi_intel_init,
void spi_config_0_irq(void) void spi_config_0_irq(void)
{ {
irq_connect(CONFIG_SPI_INTEL_PORT_0_IRQ, CONFIG_SPI_INTEL_PORT_0_PRI, IRQ_CONNECT(CONFIG_SPI_INTEL_PORT_0_IRQ, CONFIG_SPI_INTEL_PORT_0_PRI,
spi_intel_isr, DEVICE_GET(spi_intel_port_0), spi_intel_isr, DEVICE_GET(spi_intel_port_0),
SPI_INTEL_IRQ_FLAGS); SPI_INTEL_IRQ_FLAGS);
} }
@ -511,7 +511,7 @@ DEVICE_INIT(spi_intel_port_1, CONFIG_SPI_INTEL_PORT_1_DRV_NAME, spi_intel_init,
void spi_config_1_irq(void); void spi_config_1_irq(void);
{ {
irq_connect(CONFIG_SPI_INTEL_PORT_1_IRQ, CONFIG_SPI_INTEL_PORT_1_PRI, IRQ_CONNECT(CONFIG_SPI_INTEL_PORT_1_IRQ, CONFIG_SPI_INTEL_PORT_1_PRI,
spi_intel_isr, DEVICE_GET(spi_intel_port_1), spi_intel_isr, DEVICE_GET(spi_intel_port_1),
SPI_INTEL_IRQ_FLAGS); SPI_INTEL_IRQ_FLAGS);
} }

View file

@ -319,7 +319,7 @@ int _sys_clock_driver_init(struct device *device)
cycles_per_tick = sys_clock_hw_cycles_per_tick; cycles_per_tick = sys_clock_hw_cycles_per_tick;
irq_connect(CONFIG_ARCV2_TIMER0_INT_LVL, CONFIG_ARCV2_TIMER0_INT_PRI, IRQ_CONNECT(CONFIG_ARCV2_TIMER0_INT_LVL, CONFIG_ARCV2_TIMER0_INT_PRI,
_timer_int_handler, 0, 0); _timer_int_handler, 0, 0);
/* /*

View file

@ -612,7 +612,7 @@ int _sys_clock_driver_init(struct device *device)
* Although the stub has already been "connected", the vector number * Although the stub has already been "connected", the vector number
* still has to be programmed into the interrupt controller. * still has to be programmed into the interrupt controller.
*/ */
irq_connect(CONFIG_HPET_TIMER_IRQ, CONFIG_HPET_TIMER_IRQ_PRIORITY, IRQ_CONNECT(CONFIG_HPET_TIMER_IRQ, CONFIG_HPET_TIMER_IRQ_PRIORITY,
_timer_int_handler, 0, HPET_IOAPIC_FLAGS); _timer_int_handler, 0, HPET_IOAPIC_FLAGS);
/* enable the IRQ in the interrupt controller */ /* enable the IRQ in the interrupt controller */

View file

@ -567,7 +567,7 @@ int _sys_clock_driver_init(struct device *device)
initial_count_register_set(cycles_per_tick - 1); initial_count_register_set(cycles_per_tick - 1);
periodic_mode_set(); periodic_mode_set();
irq_connect(CONFIG_LOAPIC_TIMER_IRQ, CONFIG_LOAPIC_TIMER_IRQ_PRIORITY, IRQ_CONNECT(CONFIG_LOAPIC_TIMER_IRQ, CONFIG_LOAPIC_TIMER_IRQ_PRIORITY,
_timer_int_handler, 0, 0); _timer_int_handler, 0, 0);
/* Everything has been configured. It is now safe to enable the /* Everything has been configured. It is now safe to enable the

View file

@ -168,7 +168,7 @@ int wdt_dw_init(struct device *dev)
{ {
dev->driver_api = &wdt_dw_funcs; dev->driver_api = &wdt_dw_funcs;
irq_connect(CONFIG_WDT_DW_IRQ, CONFIG_WDT_DW_IRQ_PRI, wdt_dw_isr, IRQ_CONNECT(CONFIG_WDT_DW_IRQ, CONFIG_WDT_DW_IRQ_PRI, wdt_dw_isr,
DEVICE_GET(wdt), 0); DEVICE_GET(wdt), 0);
irq_enable(CONFIG_WDT_DW_IRQ); irq_enable(CONFIG_WDT_DW_IRQ);

View file

@ -85,7 +85,7 @@ void wdt_qmsi_isr(void *arg)
static int init(struct device *dev) static int init(struct device *dev)
{ {
irq_connect(CONFIG_WDT_QMSI_IRQ, CONFIG_WDT_QMSI_IRQ_PRI, IRQ_CONNECT(CONFIG_WDT_QMSI_IRQ, CONFIG_WDT_QMSI_IRQ_PRI,
wdt_qmsi_isr, 0, IOAPIC_EDGE | IOAPIC_HIGH); wdt_qmsi_isr, 0, IOAPIC_EDGE | IOAPIC_HIGH);
/* Unmask watchdog interrupt */ /* Unmask watchdog interrupt */

View file

@ -56,7 +56,7 @@ extern "C" {
#ifndef _ASMLANGUAGE #ifndef _ASMLANGUAGE
/* internal routine documented in C file, needed by irq_connect() macro */ /* internal routine documented in C file, needed by IRQ_CONNECT() macro */
extern void _irq_priority_set(unsigned int irq, unsigned int prio); extern void _irq_priority_set(unsigned int irq, unsigned int prio);
/** /**
@ -88,7 +88,7 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio);
* *
* @return The vector assigned to this interrupt * @return The vector assigned to this interrupt
*/ */
#define irq_connect(irq_p, priority_p, isr_p, isr_param_p, flags_p) \ #define IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
({ \ ({ \
enum { IRQ = irq_p }; \ enum { IRQ = irq_p }; \
static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \ static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \

View file

@ -56,7 +56,7 @@ extern void _IntExit(void);
#define DO_CONCAT(x, y) x ## y #define DO_CONCAT(x, y) x ## y
#define CONCAT(x, y) DO_CONCAT(x, y) #define CONCAT(x, y) DO_CONCAT(x, y)
/* internal routine documented in C file, needed by irq_connect() macro */ /* internal routine documented in C file, needed by IRQ_CONNECT() macro */
extern void _irq_priority_set(unsigned int irq, unsigned int prio); extern void _irq_priority_set(unsigned int irq, unsigned int prio);
@ -89,7 +89,7 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio);
* *
* @return The vector assigned to this interrupt * @return The vector assigned to this interrupt
*/ */
#define irq_connect(irq_p, priority_p, isr_p, isr_param_p, flags_p) \ #define IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
({ \ ({ \
enum { IRQ = irq_p }; \ enum { IRQ = irq_p }; \
static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \ static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \

View file

@ -171,7 +171,7 @@ typedef struct s_isrList {
* _IntExitWithEoi which does EOI to the interrupt controller, restores * _IntExitWithEoi which does EOI to the interrupt controller, restores
* context, and finally does 'iret'. * context, and finally does 'iret'.
* *
* This is only intended to be used by the irq_connect() macro. * This is only intended to be used by the IRQ_CONNECT() macro.
*/ */
#if CONFIG_X86_IAMCU #if CONFIG_X86_IAMCU
#define _IRQ_STUB_ASM \ #define _IRQ_STUB_ASM \
@ -208,7 +208,7 @@ typedef struct s_isrList {
* On MVIC, the mapping is fixed; the vector to use is just the irq line * On MVIC, the mapping is fixed; the vector to use is just the irq line
* number plus 0x20. The priority argument supplied by the user is discarded. * number plus 0x20. The priority argument supplied by the user is discarded.
* *
* These macros are only intended to be used by irq_connect() macro. * These macros are only intended to be used by IRQ_CONNECT() macro.
*/ */
#if CONFIG_MVIC #if CONFIG_MVIC
#define _PRIORITY_ARG(irq_p, priority_p) ((irq_p + 0x20) / 16) #define _PRIORITY_ARG(irq_p, priority_p) ((irq_p + 0x20) / 16)
@ -250,7 +250,7 @@ typedef struct s_isrList {
* *
* @return The vector assigned to this interrupt * @return The vector assigned to this interrupt
*/ */
#define irq_connect(irq_p, priority_p, isr_p, isr_param_p, flags_p) \ #define IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
({ \ ({ \
__asm__ __volatile__( \ __asm__ __volatile__( \
"jmp 2f\n\t" \ "jmp 2f\n\t" \
@ -524,7 +524,7 @@ extern int _SysIntVecAlloc(unsigned int irq,
* This routine programs the interrupt controller with the given vector * This routine programs the interrupt controller with the given vector
* based on the given IRQ parameter. * based on the given IRQ parameter.
* *
* Drivers call this routine instead of irq_connect() when interrupts are * Drivers call this routine instead of IRQ_CONNECT() when interrupts are
* configured statically. * configured statically.
* *
*/ */

View file

@ -64,7 +64,7 @@ static void uart1_init(void)
{ {
uart1_dev = device_get_binding("UART_1"); uart1_dev = device_get_binding("UART_1");
irq_connect(UART1_IRQ, UART1_IRQ_PRI, uart1_isr, 0, UART_IRQ_FLAGS); IRQ_CONNECT(UART1_IRQ, UART1_IRQ_PRI, uart1_isr, 0, UART_IRQ_FLAGS);
irq_enable(UART1_IRQ); irq_enable(UART1_IRQ);