source: rtems/c/src/lib/libbsp/arm/gba/irq/irq_init.c @ c193baad

4.104.115
Last change on this file since c193baad was c193baad, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on 04/09/10 at 20:24:57

unify irq data types and code, merge s3c2400/s3c2410 support

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[3c7ed6b]1/**
2 *  @file irq_init.c
3 *
4 *  This file contains the implementation of rtems initialization
5 *  related to interrupt handling.
6 */
7/*
8 *  RTEMS GBA BSP
9 *
10 *  CopyRight (C) 2000 Canon Research Centre France SA.
11 *      Emmanuel Raguet, mailto:raguet@crf.canon.fr
12 *
13 *  Copyright (c) 2004  Markku Puro <markku.puro@kopteri.net>
14 *
15 *  The license and distribution terms for this file may be
16 *  found in found in the file LICENSE in this distribution or at
17 *  http://www.rtems.com/license/LICENSE.
18 *
19 *  $Id$
20 */
21#include <stdint.h>
22#include <bsp.h>
23#include <irq.h>
24#include <rtems/bspIo.h>
25
26/**  default int vector */
27extern void _ISR_Handler(void);
28
29/** max number of vectors, defined in linkcmds  */
30extern  void _irq_max_vector;
31
32/**
33 *  @brief default_int_handler BSP routine is default int_handler
34 *
35 *  @param  None
36 *  @return None
37 */
[c193baad]38void default_int_handler(rtems_irq_hdl_param unused)
[3c7ed6b]39{
40    printk("raw_idt_notify has been called \n");
41}
42
43/**
44 *  @brief rtems_irq_mngt_init BSP routine initialize rtems_irq_mngt
45 *
46 *  @param  None
47 *  @return None
48 */
49void  rtems_irq_mngt_init(void)
50{
51    int   i;
52    uint32_t              *vectorTable;
53    rtems_interrupt_level  level;
54
55    vectorTable = (uint32_t *)VECTOR_TABLE;
56
[f3343c6e]57    rtems_interrupt_disable(level);
[3c7ed6b]58
59    /* @todo Can't use exception vectors in GBA because they are already in GBA ROM BIOS */
60    /* First, connect the ISR_Handler for IRQ and FIQ interrupts */
61    /*_CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ISR_Handler, NULL);*/
62    /*_CPU_ISR_install_vector(ARM_EXCEPTION_FIQ, _ISR_Handler, NULL);*/
63
64    /* Initialize the vector table contents with default handler */
65    for (i=0 ; i < (uint32_t)&_irq_max_vector ; i++) {
66       *(vectorTable + i) = (uint32_t)(default_int_handler);
67    }
68    /* Initialize the INT at the BSP level */
69    BSP_rtems_irq_mngt_init();
70}
71
Note: See TracBrowser for help on using the repository browser.