From 8d065343c22b5fa966020a3b81188ac280c6c9dd Mon Sep 17 00:00:00 2001 From: Dmitriy Korovkin Date: Thu, 4 Jun 2015 11:42:35 -0400 Subject: [PATCH] Use static interrupt registration in device drivers Make device drivers use static interrupt registration procedure. DYNAMIC_INT_STUBS configuration parameter was used only by device drivers to switch between static and dynamic interrupt registration procedures. Now it is obsolete and is removed. uart_int_connect() function is removed. If UART device driver still needs to register interrupt dynamically, it should use irq_connect(uart_irq_get()). Change-Id: I80c695f337456e9b0c1b0fd56716e35794f7bdb7 Signed-off-by: Dmitriy Korovkin --- arch/x86/Kconfig | 8 ------ .../micro_generic_pc_atom_n28xx_defconfig | 1 - arch/x86/configs/micro_generic_pc_defconfig | 1 - .../micro_generic_pc_minuteia_defconfig | 1 - .../micro_generic_pc_pentium4_defconfig | 1 - arch/x86/configs/micro_quark_defconfig | 1 - .../nano_generic_pc_atom_n28xx_defconfig | 1 - arch/x86/configs/nano_generic_pc_defconfig | 1 - .../nano_generic_pc_minuteia_defconfig | 1 - .../nano_generic_pc_pentium4_defconfig | 1 - arch/x86/configs/nano_quark_defconfig | 1 - arch/x86/defconfig | 1 - arch/x86/driver_static_irq_stubs.S | 12 ++++++--- arch/x86/generic_pc/system.c | 8 ------ drivers/bluetooth/uart.c | 6 ++++- drivers/console/uart_console.c | 6 ++++- drivers/serial/k20UartDrv.c | 26 ++++--------------- drivers/serial/ns16550.c | 23 ++++------------ drivers/serial/stellarisUartDrv.c | 26 ++++--------------- drivers/simple/uart.c | 6 ++++- drivers/timer/hpet.c | 18 ------------- drivers/timer/i8253.c | 12 --------- drivers/timer/loapic_timer.c | 19 -------------- include/drivers/uart.h | 2 +- 24 files changed, 39 insertions(+), 144 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 6a05fa987dd..807074b946a 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -223,17 +223,9 @@ config CACHE_LINE_SIZE endmenu menu "Specific BSP Capability Support" -config DYNAMIC_INT_STUBS - bool "Dynamic INT stubs" - default n - help - This option allows a BSP's drivers to install interrupt handlers - at run time, if desired. If not enabled, interrupt handlers can only - be installed statically when the image is created. config NUM_DYNAMIC_STUBS int "Number of dynamic int stubs" - default 10 if DYNAMIC_INT_STUBS default 0 help This option specifies the number of interrupt handlers that can be diff --git a/arch/x86/configs/micro_generic_pc_atom_n28xx_defconfig b/arch/x86/configs/micro_generic_pc_atom_n28xx_defconfig index 2cc6f7560bd..d826167da10 100644 --- a/arch/x86/configs/micro_generic_pc_atom_n28xx_defconfig +++ b/arch/x86/configs/micro_generic_pc_atom_n28xx_defconfig @@ -120,7 +120,6 @@ CONFIG_CACHE_LINE_SIZE=64 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/configs/micro_generic_pc_defconfig b/arch/x86/configs/micro_generic_pc_defconfig index 53446cf1d86..44a5c222e1e 100644 --- a/arch/x86/configs/micro_generic_pc_defconfig +++ b/arch/x86/configs/micro_generic_pc_defconfig @@ -120,7 +120,6 @@ CONFIG_CACHE_LINE_SIZE=64 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/configs/micro_generic_pc_minuteia_defconfig b/arch/x86/configs/micro_generic_pc_minuteia_defconfig index dd158345e0a..c331616bb91 100644 --- a/arch/x86/configs/micro_generic_pc_minuteia_defconfig +++ b/arch/x86/configs/micro_generic_pc_minuteia_defconfig @@ -122,7 +122,6 @@ CONFIG_CACHE_LINE_SIZE=0 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/configs/micro_generic_pc_pentium4_defconfig b/arch/x86/configs/micro_generic_pc_pentium4_defconfig index 53446cf1d86..44a5c222e1e 100644 --- a/arch/x86/configs/micro_generic_pc_pentium4_defconfig +++ b/arch/x86/configs/micro_generic_pc_pentium4_defconfig @@ -120,7 +120,6 @@ CONFIG_CACHE_LINE_SIZE=64 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/configs/micro_quark_defconfig b/arch/x86/configs/micro_quark_defconfig index 20c2fcd9685..f10c38f0dcb 100644 --- a/arch/x86/configs/micro_quark_defconfig +++ b/arch/x86/configs/micro_quark_defconfig @@ -122,7 +122,6 @@ CONFIG_CACHE_LINE_SIZE=0 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/configs/nano_generic_pc_atom_n28xx_defconfig b/arch/x86/configs/nano_generic_pc_atom_n28xx_defconfig index 8b998a13799..02f396b7cbe 100644 --- a/arch/x86/configs/nano_generic_pc_atom_n28xx_defconfig +++ b/arch/x86/configs/nano_generic_pc_atom_n28xx_defconfig @@ -99,7 +99,6 @@ CONFIG_CACHE_LINE_SIZE=64 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/configs/nano_generic_pc_defconfig b/arch/x86/configs/nano_generic_pc_defconfig index ba02d574e5f..432ea8948f9 100644 --- a/arch/x86/configs/nano_generic_pc_defconfig +++ b/arch/x86/configs/nano_generic_pc_defconfig @@ -99,7 +99,6 @@ CONFIG_CACHE_LINE_SIZE=64 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/configs/nano_generic_pc_minuteia_defconfig b/arch/x86/configs/nano_generic_pc_minuteia_defconfig index 2e1ca4f9d06..85ea51863b5 100644 --- a/arch/x86/configs/nano_generic_pc_minuteia_defconfig +++ b/arch/x86/configs/nano_generic_pc_minuteia_defconfig @@ -101,7 +101,6 @@ CONFIG_CACHE_LINE_SIZE=0 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/configs/nano_generic_pc_pentium4_defconfig b/arch/x86/configs/nano_generic_pc_pentium4_defconfig index ba02d574e5f..432ea8948f9 100644 --- a/arch/x86/configs/nano_generic_pc_pentium4_defconfig +++ b/arch/x86/configs/nano_generic_pc_pentium4_defconfig @@ -99,7 +99,6 @@ CONFIG_CACHE_LINE_SIZE=64 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/configs/nano_quark_defconfig b/arch/x86/configs/nano_quark_defconfig index e4277f3581a..29c46852cb7 100644 --- a/arch/x86/configs/nano_quark_defconfig +++ b/arch/x86/configs/nano_quark_defconfig @@ -101,7 +101,6 @@ CONFIG_CACHE_LINE_SIZE=0 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/defconfig b/arch/x86/defconfig index 20c2fcd9685..f10c38f0dcb 100644 --- a/arch/x86/defconfig +++ b/arch/x86/defconfig @@ -122,7 +122,6 @@ CONFIG_CACHE_LINE_SIZE=0 # # Specific BSP Capability Support # -# CONFIG_DYNAMIC_INT_STUBS is not set # CONFIG_PROT_MODE_SWITCH_PROMPT is not set # CONFIG_ADVANCED_IDLE_SUPPORTED is not set CONFIG_BOOTLOADER_UNKNOWN=y diff --git a/arch/x86/driver_static_irq_stubs.S b/arch/x86/driver_static_irq_stubs.S index 246945d82c1..aa390d9ecf7 100644 --- a/arch/x86/driver_static_irq_stubs.S +++ b/arch/x86/driver_static_irq_stubs.S @@ -38,8 +38,6 @@ by x86 BSPs. #define _ASMLANGUAGE -#ifndef CONFIG_DYNAMIC_INT_STUBS - #include #include #include @@ -79,6 +77,14 @@ by x86 BSPs. #endif /* CONFIG_PIC */ #endif /* CONFIG_CONSOLE_HANDLER */ +#if defined(CONFIG_UART_SIMPLE) +#if defined(CONFIG_PIC) + pic_master_mkstub uart_simple uart_simple_isr +#elif defined(CONFIG_IOAPIC) + ioapic_mkstub uart_simple uart_simple_isr +#endif /* CONFIG_PIC */ +#endif /* CONFIG_UART_SIMPLE */ + /* externs (internal APIs) */ GTEXT(_IntEnt) @@ -126,5 +132,3 @@ SECTION_FUNC(TEXT, _pic_slave__i8259_boi_slave_stub) * jmp _IntExit /+ Inform kernel interrupt is done +/ */ #endif /* CONFIG_PIC */ - -#endif /* !CONFIG_DYNAMIC_INT_STUBS */ diff --git a/arch/x86/generic_pc/system.c b/arch/x86/generic_pc/system.c index aa83df96875..c1b703d9422 100644 --- a/arch/x86/generic_pc/system.c +++ b/arch/x86/generic_pc/system.c @@ -104,11 +104,6 @@ static void uartGenericInfoInit(struct uart_init_info *p_info) #endif /* DO_CONSOLE_INIT */ -#if defined(CONFIG_CONSOLE_HANDLER) -IRQ_CONNECT_STATIC(console, CONFIG_UART_CONSOLE_IRQ, - CONFIG_UART_CONSOLE_INT_PRI, uart_console_isr, 0); -#endif /* CONFIG_CONSOLE_HANDLER */ - #if defined(DO_CONSOLE_INIT) /******************************************************************************* @@ -141,9 +136,6 @@ static void consoleInit(void) #if defined(CONFIG_BLUETOOTH) #if defined(CONFIG_BLUETOOTH_UART) #include -/* Interrupt handling */ -IRQ_CONNECT_STATIC(bluetooth, CONFIG_BLUETOOTH_UART_IRQ, - CONFIG_BLUETOOTH_UART_INT_PRI, bt_uart_isr, 0); #endif /* CONFIG_BLUETOOTH_UART */ static void bluetooth_init(void) { diff --git a/drivers/bluetooth/uart.c b/drivers/bluetooth/uart.c index 6215ba79c99..3c06c8408c2 100644 --- a/drivers/bluetooth/uart.c +++ b/drivers/bluetooth/uart.c @@ -250,6 +250,9 @@ static int bt_uart_send(struct bt_buf *buf) return uart_fifo_fill(UART, buf->data, buf->len); } +IRQ_CONNECT_STATIC(bluetooth, CONFIG_BLUETOOTH_UART_IRQ, + CONFIG_BLUETOOTH_UART_INT_PRI, bt_uart_isr, 0); + static void bt_uart_setup(int uart, struct uart_init_info *info) { BT_DBG("\n"); @@ -258,7 +261,8 @@ static void bt_uart_setup(int uart, struct uart_init_info *info) uart_irq_rx_disable(uart); uart_irq_tx_disable(uart); - uart_int_connect(uart, bt_uart_isr, NULL, NULL); + IRQ_CONFIG(bluetooth, uart_irq_get(uart)); + irq_enable(uart_irq_get(uart)); /* Drain the fifo */ while (uart_irq_rx_ready(uart)) { diff --git a/drivers/console/uart_console.c b/drivers/console/uart_console.c index 9243c1e676f..0c5c0391d67 100644 --- a/drivers/console/uart_console.c +++ b/drivers/console/uart_console.c @@ -174,13 +174,17 @@ void uart_console_isr(void *unused) } } +IRQ_CONNECT_STATIC(console, CONFIG_UART_CONSOLE_IRQ, + CONFIG_UART_CONSOLE_INT_PRI, uart_console_isr, 0); + static void console_input_init(void) { uint8_t c; uart_irq_rx_disable(UART); uart_irq_tx_disable(UART); - uart_int_connect(UART, uart_console_isr, NULL, NULL); + IRQ_CONFIG(console, uart_irq_get(UART)); + irq_enable(uart_irq_get(UART)); /* Drain the fifo */ while (uart_irq_rx_ready(UART)) diff --git a/drivers/serial/k20UartDrv.c b/drivers/serial/k20UartDrv.c index fddad4693d3..aeb91ad6949 100644 --- a/drivers/serial/k20UartDrv.c +++ b/drivers/serial/k20UartDrv.c @@ -369,32 +369,16 @@ int uart_irq_update(int port) /******************************************************************************* * -* uart_int_connect - connect an ISR to an interrupt line +* uart_irq_get - returns UART interrupt number * -* The kernel configuration allows to setup an interrupt line for a particular -* DUART. This routine installs the ISR of a UART user to the interrupt line -* chosen for the hardware at configuration time. +* Returns the IRQ number used by the specified UART port * * RETURNS: N/A */ -void uart_int_connect(int port, /* UART to port to connect */ - void (*isr)(void *), /* interrupt handler */ - void *arg, /* argument to pass to handler */ - void *stub /* ptr to interrupt stub code */ - ) +unsigned int uart_irq_get(int port /* UART port */ + ) { -#if !defined(CONFIG_SW_ISR_TABLE_DYNAMIC) - ARG_UNUSED(isr); - ARG_UNUSED(arg); - ARG_UNUSED(stub); -#else - irq_connect((unsigned int)uart[port].irq, - (unsigned int)uart[port].intPri, - isr, - arg); -#endif - - irq_enable((unsigned int)uart[port].irq); + return (unsigned int)uart[port].irq; } #endif /* CONFIG_UART_INTERRUPT_DRIVEN */ diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index dbd2d8acf23..4a1dcd8306b 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -534,29 +534,16 @@ int uart_irq_update(int port /* UART to update */ /******************************************************************************* * -* uart_int_connect - connect an ISR to an interrupt line +* uart_irq_get - returns UART interrupt number * -* The kernel configuration allows to setup an interrupt line for a particular -* DUART. This routine installs the ISR of a UART user to the interrupt line -* chosen for the hardware at configuration time. +* Returns the IRQ number used by the specified UART port * * RETURNS: N/A */ -void uart_int_connect(int port, /* UART to port to connect */ - void (*isr)(void *), /* interrupt handler */ - void *arg, /* argument to pass to handler */ - void *stub /* ptr to interrupt stub code */ - ) +unsigned int uart_irq_get(int port /* UART port */ + ) { -#if !defined(CONFIG_DYNAMIC_INT_STUBS) - ARG_UNUSED(isr); - ARG_UNUSED(arg); - ARG_UNUSED(stub); -#else - irq_connect(port, isr, arg); -#endif /* CONFIG_DYNAMIC_INT_STUBS */ - - irq_enable((unsigned int)uart[port].irq); + return (unsigned int)uart[port].irq; } #endif /* CONFIG_UART_INTERRUPT_DRIVEN */ diff --git a/drivers/serial/stellarisUartDrv.c b/drivers/serial/stellarisUartDrv.c index 75cee5f1e0c..cefce548eb3 100644 --- a/drivers/serial/stellarisUartDrv.c +++ b/drivers/serial/stellarisUartDrv.c @@ -567,32 +567,16 @@ int uart_irq_update(int port) /******************************************************************************* * -* uart_int_connect - connect an ISR to an interrupt line +* uart_irq_get - returns UART interrupt number * -* The kernel configuration allows to setup an interrupt line for a particular -* UART. This routine installs the ISR of a UART user to the interrupt line -* chosen for the hardware at configuration time. +* Returns the IRQ number used by the specified UART port * * RETURNS: N/A */ -void uart_int_connect(int port, /* UART port to connect to */ - void (*isr)(void *), /* interrupt handler */ - void *arg, /* argument to pass to handler */ - void *stub /* ptr to interrupt stub code */ - ) +unsigned int uart_irq_get(int port /* UART port */ + ) { -#if !defined(CONFIG_SW_ISR_TABLE_DYNAMIC) - ARG_UNUSED(isr); - ARG_UNUSED(arg); - ARG_UNUSED(stub); -#else - irq_connect((unsigned int)ports[port].irq, - (unsigned int)ports[port].intPri, - isr, - arg); -#endif - - irq_enable((unsigned int)ports[port].irq); + return (unsigned int)ports[port].irq; } #endif /* CONFIG_UART_INTERRUPT_DRIVEN */ diff --git a/drivers/simple/uart.c b/drivers/simple/uart.c index 57a2b0ece85..91c0b7dc5f9 100644 --- a/drivers/simple/uart.c +++ b/drivers/simple/uart.c @@ -81,13 +81,17 @@ int uart_simple_send(const uint8_t *data, int len) return uart_fifo_fill(UART, data, len); } +IRQ_CONNECT_STATIC(uart_simple, CONFIG_UART_SIMPLE_IRQ, + CONFIG_UART_SIMPLE_INT_PRI, uart_simple_isr, 0); + static void uart_simple_setup(int uart, struct uart_init_info *info) { uart_init(uart, info); uart_irq_rx_disable(uart); uart_irq_tx_disable(uart); - uart_int_connect(uart, uart_simple_isr, NULL, NULL); + IRQ_CONFIG(uart_simple, uart_irq_get(uart)); + irq_enable(uart_irq_get(uart)); /* Drain the fifo */ while (uart_irq_rx_ready(uart)) { diff --git a/drivers/timer/hpet.c b/drivers/timer/hpet.c index 2dc543d958c..17aad2282b0 100644 --- a/drivers/timer/hpet.c +++ b/drivers/timer/hpet.c @@ -192,12 +192,8 @@ extern struct nano_stack _k_command_stack; #define HPET_COMP_DELAY 192 -#ifdef CONFIG_DYNAMIC_INT_STUBS -static NANO_CPU_INT_STUB_DECL(_hpetIntStub); /* interrupt stub memory */ -#else /* !CONFIG_DYNAMIC_INT_STUBS */ IRQ_CONNECT_STATIC(hpet, HPET_TIMER0_IRQ, HPET_TIMER0_INT_PRI, _timer_int_handler, 0); -#endif #ifdef CONFIG_INT_LATENCY_BENCHMARK static uint32_t main_count_first_irq_value = 0; @@ -606,19 +602,6 @@ void timer_driver(int priority /* priority parameter is ignored by this driver ; #endif -#ifdef CONFIG_DYNAMIC_INT_STUBS - /* - * Connect specified routine/parameter to LOAPIC interrupt vector. - * The "connect" will result in the LOAPIC interrupt controller being - * programmed with the allocated vector, i.e. there is no need for - * an explicit setting of the interrupt vector in this driver. - */ - - irq_connect(HPET_TIMER0_IRQ, - HPET_TIMER0_INT_PRI, - _timer_int_handler, - 0); -#else /* * Although the stub has already been "connected", the vector number * still @@ -626,7 +609,6 @@ void timer_driver(int priority /* priority parameter is ignored by this driver */ IRQ_CONFIG(hpet, HPET_TIMER0_IRQ); -#endif /* enable the IRQ in the interrupt controller */ diff --git a/drivers/timer/i8253.c b/drivers/timer/i8253.c index f10a267b74e..6376ddf5095 100644 --- a/drivers/timer/i8253.c +++ b/drivers/timer/i8253.c @@ -115,9 +115,7 @@ extern int32_t _sys_idle_elapsed_ticks; /* interrupt stub memory for irq_connect() */ -#ifndef CONFIG_DYNAMIC_INT_STUBS IRQ_CONNECT_STATIC(i8253, PIT_INT_LVL, PIT_INT_PRI, _timer_int_handler, 0); -#endif static uint16_t __noinit counterLoadVal; /* computed counter */ static volatile uint32_t clock_accumulated_count = 0; @@ -494,17 +492,7 @@ void timer_driver(int priority /* priority parameter ignored by this driver */ _i8253CounterPeriodic(counterLoadVal); -#ifndef CONFIG_DYNAMIC_INT_STUBS IRQ_CONFIG(i8253, PIT_INT_LVL); -#else - /* connect specified routine/parameter to PIT interrupt vector */ - - (void)irq_connect(PIT_INT_LVL, - PIT_INT_PRI, - _timer_int_handler, - 0); - -#endif /* CONFIG_DYNAMIC_INT_STUBS */ _i8253TicklessIdleSkew(); diff --git a/drivers/timer/loapic_timer.c b/drivers/timer/loapic_timer.c index bea60251a59..f1f16be07b5 100644 --- a/drivers/timer/loapic_timer.c +++ b/drivers/timer/loapic_timer.c @@ -110,14 +110,8 @@ After reset, the timer is initialized to zero. extern int32_t _sys_idle_elapsed_ticks; #endif /* TIMER_SUPPORTS_TICKLESS */ -#ifdef CONFIG_DYNAMIC_INT_STUBS -static NANO_CPU_INT_STUB_DECL( - _loapic_timer_irq_stub); /* interrupt stub memory for */ - /* irq_connect() */ -#else /* !CONFIG_DYNAMIC_INT_STUBS */ IRQ_CONNECT_STATIC(loapic, LOAPIC_TIMER_IRQ, LOAPIC_TIMER_INT_PRI, _timer_int_handler, 0); -#endif static uint32_t __noinit counterLoadVal; /* computed counter 0 initial count value */ @@ -562,25 +556,12 @@ void timer_driver(int priority /* priority parameter ignored by this driver */ _loApicTimerSetCount(counterLoadVal); _loApicTimerPeriodic(); -#ifdef CONFIG_DYNAMIC_INT_STUBS - /* - * Connect specified routine/parameter to LOAPIC interrupt vector. - * The "connect" will result in the LOAPIC interrupt controller being - * programmed with the allocated vector, i.e. there is no need for - * an explicit setting of the interrupt vector in this driver. - */ - irq_connect(LOAPIC_TIMER_IRQ, - LOAPIC_TIMER_INT_PRI, - _timer_int_handler, - 0); -#else /* !CONFIG_DYNAMIC_INT_STUBS */ /* * Although the stub has already been "connected", the vector number * still * has to be programmed into the interrupt controller. */ IRQ_CONFIG(loapic, LOAPIC_TIMER_IRQ); -#endif /* CONFIG_DYNAMIC_INT_STUBS */ _loApicTimerTicklessIdleSkew(); diff --git a/include/drivers/uart.h b/include/drivers/uart.h index 5f3b2f80c33..34c314a24ad 100644 --- a/include/drivers/uart.h +++ b/include/drivers/uart.h @@ -65,7 +65,7 @@ void uart_irq_err_enable(int port); void uart_irq_err_disable(int port); int uart_irq_is_pending(int port); int uart_irq_update(int port); -void uart_int_connect(int port, void (*isr)(void *), void *arg, void *stub); +unsigned int uart_irq_get(int port); #ifdef __cplusplus }