diff options
author | Andrew Boie <andrew.p.boie@intel.com> | 2016-01-27 10:07:31 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2016-02-05 20:25:25 -0500 |
commit | 897ffaeb2c821a20cf2df8c53958bc865009a7d1 (patch) | |
tree | 342a12365df641499c4f9fec61ccef33926cf0d1 | |
parent | a4ec9631380abf8ffdc4385e38dc386858df846a (diff) |
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>
35 files changed, 64 insertions, 68 deletions
diff --git a/arch/arc/soc/quark_se_ss/soc_config.c b/arch/arc/soc/quark_se_ss/soc_config.c index aadc37210..377f8cca8 100644 --- a/arch/arc/soc/quark_se_ss/soc_config.c +++ b/arch/arc/soc/quark_se_ss/soc_config.c @@ -24,7 +24,7 @@ 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); irq_enable(QUARK_SE_IPM_INTERRUPT); return DEV_OK; diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 031b32ece..3c07221ff 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -228,7 +228,7 @@ config NUM_DYNAMIC_STUBS default 0 help 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 int "Number of dynamic exception stubs" diff --git a/arch/x86/core/i386_sysV_abi/intstub.S b/arch/x86/core/i386_sysV_abi/intstub.S index 644f43441..cd40cdaa2 100644 --- a/arch/x86/core/i386_sysV_abi/intstub.S +++ b/arch/x86/core/i386_sysV_abi/intstub.S @@ -60,7 +60,7 @@ * * @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 * _nanokernel.nested (to support interrupt nesting), switches to the * 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 * how long interrupt are disabled. - * The interrupt gate created by irq_connect disables the + * The interrupt gate created by IRQ_CONNECT disables the * interrupt. * * 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 * - * 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 * completed. This routine decrements _nanokernel.nested (to support interrupt * nesting), restores the volatile integer registers, and then switches diff --git a/arch/x86/core/intconnect.c b/arch/x86/core/intconnect.c index 659764c76..cc28f0524 100644 --- a/arch/x86/core/intconnect.c +++ b/arch/x86/core/intconnect.c @@ -21,10 +21,6 @@ * This module provides routines to manage asynchronous interrupts * 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 * 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 @@ -34,8 +30,8 @@ * 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 * 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 - * the associated dynamic stub in the IDT. + * This array is populated by calls to irq_connect_dynamic(), which also + * installs the associated dynamic stub in the IDT. */ @@ -89,7 +85,7 @@ void *__attribute__((section(".spurNoErrIsr"))) * @return N/A * * 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 * Descriptor Table (IDT) such that the specified routine is invoked when the * 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, - * but irq_connect is still used, which causes system failure. - * If ALL_DYN_IRQ_STUBS is left 0, but irq_connect is used, linker + * but irq_connect_dynamic is still used, which causes system failure. + * If ALL_DYN_IRQ_STUBS is left 0, but irq_connect_dynamic is used, linker * generates an error */ struct dyn_irq_info { diff --git a/arch/x86/soc/quark_se/soc_config.c b/arch/x86/soc/quark_se/soc_config.c index 81035ade0..09bfc4de0 100644 --- a/arch/x86/soc/quark_se/soc_config.c +++ b/arch/x86/soc/quark_se/soc_config.c @@ -29,7 +29,7 @@ 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); irq_enable(QUARK_SE_IPM_INTERRUPT); return DEV_OK; diff --git a/arch/x86/soc/quark_x1000/soc.h b/arch/x86/soc/quark_x1000/soc.h index 638ea3f19..ce00c922f 100644 --- a/arch/x86/soc/quark_x1000/soc.h +++ b/arch/x86/soc/quark_x1000/soc.h @@ -53,7 +53,7 @@ extern "C" { #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. * The Quark board virtualizes IRQs as follows: * diff --git a/doc/collaboration/code/doxygen/irq_test_common_commented.h b/doc/collaboration/code/doxygen/irq_test_common_commented.h index a750d54f4..56350715d 100644 --- a/doc/collaboration/code/doxygen/irq_test_common_commented.h +++ b/doc/collaboration/code/doxygen/irq_test_common_commented.h @@ -62,7 +62,7 @@ typedef void (*vvpfn)(void *); * Opcode for generating a software interrupt. The ISR associated with each * 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 - * filled in after calling irq_connect(). + * filled in after calling IRQ_CONNECT(). */ static char sw_isr_trigger_0[] = @@ -125,7 +125,7 @@ static int initIRQ 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); if (-1 == vector) { @@ -137,7 +137,7 @@ static int initIRQ #if NUM_SW_IRQS >= 2 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); if (-1 == vector) { @@ -150,12 +150,12 @@ static int initIRQ #if defined(CONFIG_CPU_CORTEX_M) 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); } 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); } #endif /* CONFIG_CPU_CORTEX_M */ diff --git a/doc/kernel/nanokernel/nanokernel_interrupts.rst b/doc/kernel/nanokernel/nanokernel_interrupts.rst index c04f30a93..27aa605a8 100644 --- a/doc/kernel/nanokernel/nanokernel_interrupts.rst +++ b/doc/kernel/nanokernel/nanokernel_interrupts.rst @@ -107,7 +107,7 @@ Example 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 */ ... } @@ -254,6 +254,6 @@ Macros 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. diff --git a/doc/platform/frdm_k64f.rst b/doc/platform/frdm_k64f.rst index d4ce5e3f9..e15b288dd 100644 --- a/doc/platform/frdm_k64f.rst +++ b/doc/platform/frdm_k64f.rst @@ -277,7 +277,7 @@ For example, if 3 bits are implemented, use 1, 2, and 3, not 0x20h, 0x40h, and 0x60h. 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 (ZLI) or not. diff --git a/drivers/adc/adc_dw.c b/drivers/adc/adc_dw.c index 72c326981..3f545bc6e 100644 --- a/drivers/adc/adc_dw.c +++ b/drivers/adc/adc_dw.c @@ -535,11 +535,11 @@ DEVICE_INIT(adc_dw_0, CONFIG_ADC_DW_NAME_0, &adc_dw_init, 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); 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); irq_enable(CONFIG_ADC_DW_0_ERR_IRQ); } diff --git a/drivers/aio/aio_dw_comparator.c b/drivers/aio/aio_dw_comparator.c index 281c5679e..b6dfb62e5 100644 --- a/drivers/aio/aio_dw_comparator.c +++ b/drivers/aio/aio_dw_comparator.c @@ -213,7 +213,7 @@ static int dw_aio_cmp_config(struct device *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); return DEV_OK; } diff --git a/drivers/bluetooth/h4.c b/drivers/bluetooth/h4.c index 3da097745..6dcd21468 100644 --- a/drivers/bluetooth/h4.c +++ b/drivers/bluetooth/h4.c @@ -224,7 +224,7 @@ static int h4_open(void) uart_irq_rx_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); irq_enable(CONFIG_BLUETOOTH_UART_IRQ); diff --git a/drivers/bluetooth/h5.c b/drivers/bluetooth/h5.c index 12d723ff2..4db70ea3b 100644 --- a/drivers/bluetooth/h5.c +++ b/drivers/bluetooth/h5.c @@ -752,7 +752,7 @@ static int h5_open(void) uart_irq_rx_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); irq_enable(CONFIG_BLUETOOTH_UART_IRQ); diff --git a/drivers/console/uart_console.c b/drivers/console/uart_console.c index a158b86d2..221fea7d3 100644 --- a/drivers/console/uart_console.c +++ b/drivers/console/uart_console.c @@ -372,7 +372,7 @@ static void console_input_init(void) uart_irq_rx_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); irq_enable(CONFIG_UART_CONSOLE_IRQ); diff --git a/drivers/console/uart_pipe.c b/drivers/console/uart_pipe.c index bd7aa2f87..0c7139726 100644 --- a/drivers/console/uart_pipe.c +++ b/drivers/console/uart_pipe.c @@ -77,7 +77,7 @@ static void uart_pipe_setup(struct device *uart) uart_irq_rx_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); irq_enable(CONFIG_UART_PIPE_IRQ); diff --git a/drivers/ethernet/eth_dw.c b/drivers/ethernet/eth_dw.c index 99c8b8d2a..36b110314 100644 --- a/drivers/ethernet/eth_dw.c +++ b/drivers/ethernet/eth_dw.c @@ -319,7 +319,7 @@ static void eth_config_0_irq(struct device *port) #ifdef CONFIG_ETH_DW_0_IRQ_DIRECT 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); irq_enable(CONFIG_ETH_DW_0_IRQ); #elif defined(CONFIG_ETH_DW_0_IRQ_SHARED) diff --git a/drivers/gpio/gpio_dw.c b/drivers/gpio/gpio_dw.c index fb81bcc59..85150a6f3 100644 --- a/drivers/gpio/gpio_dw.c +++ b/drivers/gpio/gpio_dw.c @@ -477,7 +477,7 @@ void gpio_config_0_irq(struct device *port) #ifdef CONFIG_GPIO_DW_0_IRQ_DIRECT 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); irq_enable(config->irq_num); #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 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); irq_enable(config->irq_num); #elif defined(CONFIG_GPIO_DW_1_IRQ_SHARED) diff --git a/drivers/gpio/gpio_qmsi.c b/drivers/gpio/gpio_qmsi.c index 4911392c4..132c6c8d2 100644 --- a/drivers/gpio/gpio_qmsi.c +++ b/drivers/gpio/gpio_qmsi.c @@ -258,7 +258,7 @@ int gpio_qmsi_init(struct device *port) sys_write32(0, reg + INTEN); 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); /* Enable GPIO IRQ and unmask interrupts for Lakemont. */ diff --git a/drivers/i2c/i2c_dw.c b/drivers/i2c/i2c_dw.c index 43ff11251..9d5e37743 100644 --- a/drivers/i2c/i2c_dw.c +++ b/drivers/i2c/i2c_dw.c @@ -784,7 +784,7 @@ void i2c_config_0(struct device *port) #if defined(CONFIG_I2C_DW_0_IRQ_DIRECT) 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); irq_enable(config->irq_num); #elif defined(CONFIG_I2C_DW_0_IRQ_SHARED) @@ -833,7 +833,7 @@ void i2c_config_1(struct device *port) struct device *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); irq_enable(config->irq_num); } diff --git a/drivers/i2c/i2c_quark_se_ss.c b/drivers/i2c/i2c_quark_se_ss.c index 944b9d006..103eec6d1 100644 --- a/drivers/i2c/i2c_quark_se_ss.c +++ b/drivers/i2c/i2c_quark_se_ss.c @@ -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); /* 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); - 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); - 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); - 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); 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); /* 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); - 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); - 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); - 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); irq_enable(I2C_SS_1_ERR_VECTOR); diff --git a/drivers/interrupt_controller/system_apic.c b/drivers/interrupt_controller/system_apic.c index 49af28a14..ff8788fca 100644 --- a/drivers/interrupt_controller/system_apic.c +++ b/drivers/interrupt_controller/system_apic.c @@ -131,7 +131,7 @@ int _SysIntVecAlloc( * This routine programs the interrupt controller with the given vector * 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. * * The Galileo board virtualizes IRQs as follows: diff --git a/drivers/rtc/rtc_dw.c b/drivers/rtc/rtc_dw.c index 3c961b97b..6694456da 100644 --- a/drivers/rtc/rtc_dw.c +++ b/drivers/rtc/rtc_dw.c @@ -206,7 +206,7 @@ DEVICE_INIT(rtc, CONFIG_RTC_DRV_NAME, &rtc_dw_init, 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); irq_enable(CONFIG_RTC_IRQ); diff --git a/drivers/rtc/rtc_qmsi.c b/drivers/rtc/rtc_qmsi.c index 9865112cc..59690d98f 100644 --- a/drivers/rtc/rtc_qmsi.c +++ b/drivers/rtc/rtc_qmsi.c @@ -79,7 +79,7 @@ static struct rtc_driver_api api = { 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); /* Unmask RTC interrupt */ diff --git a/drivers/shared_irq/shared_irq.c b/drivers/shared_irq/shared_irq.c index 0847e170c..2ff756790 100644 --- a/drivers/shared_irq/shared_irq.c +++ b/drivers/shared_irq/shared_irq.c @@ -166,7 +166,7 @@ DEVICE_INIT(shared_irq_0, CONFIG_SHARED_IRQ_0_NAME, shared_irq_initialize, 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_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) { - 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_1_FLAGS); } diff --git a/drivers/spi/spi_dw.c b/drivers/spi/spi_dw.c index 7809b7fc1..e8dd9c337 100644 --- a/drivers/spi/spi_dw.c +++ b/drivers/spi/spi_dw.c @@ -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) { - 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_IRQ_FLAGS); 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) { - 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_IRQ_FLAGS); irq_enable(CONFIG_SPI_DW_PORT_1_IRQ); diff --git a/drivers/spi/spi_intel.c b/drivers/spi/spi_intel.c index fac41f28b..994d9b8fa 100644 --- a/drivers/spi/spi_intel.c +++ b/drivers/spi/spi_intel.c @@ -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) { - 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_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); { - 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_IRQ_FLAGS); } diff --git a/drivers/timer/arcv2_timer0.c b/drivers/timer/arcv2_timer0.c index 3c967e7a0..0e74e9e20 100644 --- a/drivers/timer/arcv2_timer0.c +++ b/drivers/timer/arcv2_timer0.c @@ -319,7 +319,7 @@ int _sys_clock_driver_init(struct device *device) 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); /* diff --git a/drivers/timer/hpet.c b/drivers/timer/hpet.c index 59f06d5dc..34120f42f 100644 --- a/drivers/timer/hpet.c +++ b/drivers/timer/hpet.c @@ -612,7 +612,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_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); /* enable the IRQ in the interrupt controller */ diff --git a/drivers/timer/loapic_timer.c b/drivers/timer/loapic_timer.c index 30f93f3f0..473dc414c 100644 --- a/drivers/timer/loapic_timer.c +++ b/drivers/timer/loapic_timer.c @@ -567,7 +567,7 @@ int _sys_clock_driver_init(struct device *device) initial_count_register_set(cycles_per_tick - 1); 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); /* Everything has been configured. It is now safe to enable the diff --git a/drivers/watchdog/wdt_dw.c b/drivers/watchdog/wdt_dw.c index 32884f135..09ea11220 100644 --- a/drivers/watchdog/wdt_dw.c +++ b/drivers/watchdog/wdt_dw.c @@ -168,7 +168,7 @@ int wdt_dw_init(struct device *dev) { 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); irq_enable(CONFIG_WDT_DW_IRQ); diff --git a/drivers/watchdog/wdt_qmsi.c b/drivers/watchdog/wdt_qmsi.c index 57f6c2cb6..3368c656c 100644 --- a/drivers/watchdog/wdt_qmsi.c +++ b/drivers/watchdog/wdt_qmsi.c @@ -85,7 +85,7 @@ void wdt_qmsi_isr(void *arg) 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); /* Unmask watchdog interrupt */ diff --git a/include/arch/arc/arch.h b/include/arch/arc/arch.h index 70745b059..017cb73c4 100644 --- a/include/arch/arc/arch.h +++ b/include/arch/arc/arch.h @@ -56,7 +56,7 @@ extern "C" { #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); /** @@ -88,7 +88,7 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio); * * @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 }; \ static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \ diff --git a/include/arch/arm/cortex_m/irq.h b/include/arch/arm/cortex_m/irq.h index 4901da97d..7c0cac8a1 100644 --- a/include/arch/arm/cortex_m/irq.h +++ b/include/arch/arm/cortex_m/irq.h @@ -56,7 +56,7 @@ extern void _IntExit(void); #define DO_CONCAT(x, y) 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); @@ -89,7 +89,7 @@ extern void _irq_priority_set(unsigned int irq, unsigned int prio); * * @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 }; \ static struct _IsrTableEntry _CONCAT(_isr_irq, irq_p) \ diff --git a/include/arch/x86/arch.h b/include/arch/x86/arch.h index da5e195da..c8ba55fa8 100644 --- a/include/arch/x86/arch.h +++ b/include/arch/x86/arch.h @@ -171,7 +171,7 @@ typedef struct s_isrList { * _IntExitWithEoi which does EOI to the interrupt controller, restores * 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 #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 * 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 #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 */ -#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__( \ "jmp 2f\n\t" \ @@ -524,7 +524,7 @@ extern int _SysIntVecAlloc(unsigned int irq, * This routine programs the interrupt controller with the given vector * 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. * */ diff --git a/samples/microkernel/apps/nfc_hello/src/main.c b/samples/microkernel/apps/nfc_hello/src/main.c index 8dccfbeb6..18a3e4263 100644 --- a/samples/microkernel/apps/nfc_hello/src/main.c +++ b/samples/microkernel/apps/nfc_hello/src/main.c @@ -64,7 +64,7 @@ static void uart1_init(void) { 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); |