summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/shared/irq/irq_init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-27 01:04:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-27 01:04:11 +0000
commit08330bf0be8fed443402ffd1664b2ca4d16b6f8e (patch)
treed569b8f1786695e639ddef8e9caedf8874c1a24e /c/src/lib/libbsp/arm/shared/irq/irq_init.c
parentPatch from Charles-Antoine Gauthier <charles.gauthier@nrc.ca> that (diff)
downloadrtems-08330bf0be8fed443402ffd1664b2ca4d16b6f8e.tar.bz2
Port of RTEMS to the ARM processor family by Eric Valette
<valette@crf.canon.fr> and Emmanuel Raguet <raguet@crf.canon.fr> of Canon CRF - Communication Dept. This port includes a basic BSP that is sufficient to link hello world.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/arm/shared/irq/irq_init.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/shared/irq/irq_init.c b/c/src/lib/libbsp/arm/shared/irq/irq_init.c
new file mode 100644
index 0000000000..a815657f8d
--- /dev/null
+++ b/c/src/lib/libbsp/arm/shared/irq/irq_init.c
@@ -0,0 +1,51 @@
+/* irq_init.c
+ *
+ * This file contains the implementation of rtems initialization
+ * related to interrupt handling.
+ *
+ * CopyRight (C) 2000 Canon Research Centre France SA.
+ * Emmanuel Raguet, mailto:raguet@crf.canon.fr
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
+ * $Id$
+ */
+
+#include <irq.h>
+#include <bsp.h>
+#include <bspio.h>
+#include <registers.h>
+
+/*
+ * default int vector
+ */
+extern void _ISR_Handler();
+
+void default_int_handler()
+{
+ printk("raw_idt_notify has been called \n");
+}
+
+void rtems_irq_mngt_init()
+{
+ int i;
+ long *vectorTable;
+
+ vectorTable = VECTOR_TABLE;
+
+ _CPU_ISR_Disable(level);
+
+ /* First, connect the ISR_Handler for IRQ and FIQ interrupts */
+ _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ISR_Handler, NULL);
+ _CPU_ISR_install_vector(ARM_EXCEPTION_FIQ, _ISR_Handler, NULL);
+
+ /* Initialize the vector table contents with default handler */
+ for (i=0; i<BSP_MAX_INT; i++)
+ *(vectorTable + i) = (long)(default_int_handler);
+
+ /* Initialize the INT at the BSP level */
+ BSP_rtems_irq_mngt_init();
+}
+