summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/gba/irq/irq_init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2005-07-06 18:46:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2005-07-06 18:46:04 +0000
commit3c7ed6b8cd505f696c9c2b6d90723094f334b348 (patch)
tree30da596d32865c2d042ece5735d16baeade7d17d /c/src/lib/libbsp/arm/gba/irq/irq_init.c
parente9b4f29a409d9dc192a85dbbe693aeb1fa87e43b (diff)
downloadrtems-3c7ed6b8cd505f696c9c2b6d90723094f334b348.tar.bz2
2005-07-06 Markku Puro <markku.puro@kopteri.net>
* .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac, clock/clockdrv.c, console/conio.c, console/console.c, console/defaultfont.c, include/arm_mode_bits.h, include/asm_macros.h, include/bsp.h, include/bspopts.h.in, include/conio.h, include/gba.h, include/gba_registers.h, include/tm27.h, irq/bsp_irq_asm.S, irq/bsp_irq_init.c, irq/irq.c, irq/irq.h, irq/irq_asm.S, irq/irq_init.c, start/logo.S, start/start.S, startup/bspstart.c, startup/cpu.c, startup/cpu_asm.S, startup/exit.c, startup/linkcmds, timer/timer.c: New files.
Diffstat (limited to 'c/src/lib/libbsp/arm/gba/irq/irq_init.c')
-rw-r--r--c/src/lib/libbsp/arm/gba/irq/irq_init.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/gba/irq/irq_init.c b/c/src/lib/libbsp/arm/gba/irq/irq_init.c
new file mode 100644
index 0000000000..c2b5c1da03
--- /dev/null
+++ b/c/src/lib/libbsp/arm/gba/irq/irq_init.c
@@ -0,0 +1,71 @@
+/**
+ * @file irq_init.c
+ *
+ * This file contains the implementation of rtems initialization
+ * related to interrupt handling.
+ */
+/*
+ * RTEMS GBA BSP
+ *
+ * CopyRight (C) 2000 Canon Research Centre France SA.
+ * Emmanuel Raguet, mailto:raguet@crf.canon.fr
+ *
+ * Copyright (c) 2004 Markku Puro <markku.puro@kopteri.net>
+ *
+ * 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$
+ */
+#include <stdint.h>
+#include <bsp.h>
+#include <irq.h>
+#include <rtems/bspIo.h>
+
+/** default int vector */
+extern void _ISR_Handler(void);
+
+/** max number of vectors, defined in linkcmds */
+extern void _irq_max_vector;
+
+/**
+ * @brief default_int_handler BSP routine is default int_handler
+ *
+ * @param None
+ * @return None
+ */
+void default_int_handler(void)
+{
+ printk("raw_idt_notify has been called \n");
+}
+
+/**
+ * @brief rtems_irq_mngt_init BSP routine initialize rtems_irq_mngt
+ *
+ * @param None
+ * @return None
+ */
+void rtems_irq_mngt_init(void)
+{
+ int i;
+ uint32_t *vectorTable;
+ rtems_interrupt_level level;
+
+ vectorTable = (uint32_t *)VECTOR_TABLE;
+
+ _CPU_ISR_Disable(level);
+
+ /* @todo Can't use exception vectors in GBA because they are already in GBA ROM BIOS */
+ /* 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 < (uint32_t)&_irq_max_vector ; i++) {
+ *(vectorTable + i) = (uint32_t)(default_int_handler);
+ }
+ /* Initialize the INT at the BSP level */
+ BSP_rtems_irq_mngt_init();
+}
+