diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2007-12-09 00:14:06 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2007-12-09 00:14:06 +0000 |
commit | b672bca70bbc361484bcf51d567660ca463a04cf (patch) | |
tree | dd58ff3e4f6907974d3b858ec4208d30caa8507e /c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h | |
parent | 2007-12-08 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-b672bca70bbc361484bcf51d567660ca463a04cf.tar.bz2 |
2007-12-08 Till Straumann <strauman@slac.stanford.edu>
* irq_supp.h: was moved from shared/irq to
libcpu/powerpc/new-exceptions/bspsupport.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h b/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h deleted file mode 100644 index a2d814aa1b..0000000000 --- a/c/src/lib/libbsp/powerpc/shared/irq/irq_supp.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * The license and distribution terms for this file may be - * found in found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#ifndef IRQ_SHARED_IRQ_C_GLUE_H -#define IRQ_SHARED_IRQ_C_GLUE_H -/* - * This header describes the routines that are needed by the shared - * version of 'irq.c' (implementing the RTEMS irq API). They - * must be provided by the BSP. - * - * The license and distribution terms for this file may be - * found in found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - */ - -#ifndef BSP_SHARED_HANDLER_SUPPORT -#define BSP_SHARED_HANDLER_SUPPORT 1 -#endif - -#include <rtems.h> -#include <stdint.h> -#include <rtems/irq.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * PIC-independent functions to enable/disable interrupt lines at - * the pic. - * - * NOTE: the routines must ignore requests for enabling/disabling - * interrupts that are outside of the range handled by the - * PIC(s). - */ -extern void BSP_enable_irq_at_pic(const rtems_irq_number irqLine); -/* - * RETURNS: nonzero (> 0 ) if irq was enabled originally, zero if irq - * was off and negative value if there was an error. - */ -extern int BSP_disable_irq_at_pic(const rtems_irq_number irqLine); - -/* - * Initialize the PIC. - * Return nonzero on success, zero on failure (which will be treated - * as fatal by the manager). - */ -extern int BSP_setup_the_pic(rtems_irq_global_settings* config); - -struct _BSP_Exception_frame; - -/* IRQ dispatcher to be defined by the PIC driver; note that it MUST - * implement shared interrupts. - * Note also that the exception frame passed to this handler is not very - * meaningful. Only the volatile registers and vector info are stored. - * - ******************************************************************* - * The routine must return zero if the interrupt was handled. If a - * nonzero value is returned the dispatcher may panic and flag an - * uncaught exception. - ******************************************************************* - */ -int C_dispatch_irq_handler (struct _BSP_Exception_frame *frame, unsigned int excNum); - -/* - * Snippet to be used by PIC drivers; - * enables interrupts, traverses list of - * shared handlers for a given interrupt - * and restores original irq level - */ - -static inline void -bsp_irq_dispatch_list( - rtems_irq_connect_data *tbl, - unsigned irq, - rtems_irq_hdl sentinel -) -{ - register uint32_t l_orig; - - l_orig = _ISR_Get_level(); - - /* Enable all interrupts */ - _ISR_Set_level(0); - - rtems_irq_connect_data* vchain; - for( vchain = &tbl[irq]; - ((int)vchain != -1 && vchain->hdl != sentinel); - vchain = (rtems_irq_connect_data*)vchain->next_handler ) - { - vchain->hdl(vchain->handle); - } - - /* Restore original level */ - _ISR_Set_level(l_orig); -} - -#ifdef __cplusplus -} -#endif - -#endif |