source: rtems/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_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.5 KB
Line 
1/*
2 *  NXP/Philips LPC22XX/LPC21xx Interrupt handler
3 *  Ray 2007 <rayx.cn@gmail.com> to support LPC ARM
4 *  The license and distribution terms for this file may be
5 *  found in the file LICENSE in this distribution or at
6 *
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *
10 *  $Id$
11 */
12#include <irq.h>
13#include <bsp.h>
14#include <lpc22xx.h>
15
16
17/*
18 * Interrupt system initialization. Disable interrupts, clear
19 * any that are pending.
20 */
21void BSP_rtems_irq_mngt_init(void)
22{
23  long *vectorTable;
24  int i;
25
26    /* disable all interrupts */
27  VICIntEnClr = 0xFFFFFFFF;
28
29  vectorTable = (long *) VECTOR_TABLE;
30  /* Initialize the vector table contents with default handler */
31  for (i=0; i<BSP_MAX_INT; i++) {
32      *(vectorTable + i) = (long)(default_int_handler);
33  }
34
35  /*
36   * Set IRQHandler
37   */
38  IRQ_VECTOR_ADDR = 0xE59FF018;           /* LDR PC,[PC,#0x18] instruction */
39
40  /*
41   * Set FIQHandler
42   */
43  FIQ_VECTOR_ADDR = 0xE59FF018;           /* LDR PC,[PC,#0x18] instruction */
44
45  /*
46   * We does not need the next interrupt sources in the moment,
47   * therefore jump to itself.
48   */
49  UNDEFINED_INSTRUCTION_VECTOR_ADDR = 0xEAFFFFFE;
50  SOFTWARE_INTERRUPT_VECTOR_ADDR    = 0xEAFFFFFE;
51  PREFETCH_ABORT_VECTOR_ADDR        = 0xEAFFFFFE;
52
53  /*
54   * In case we must find an ABORT error,
55   * enable the next lines and set a breakpoint
56   * in ABORTHandler.
57   */
58#if 1
59  DATA_ABORT_VECTOR_ADDR = 0xE59FF018;
60#endif
61
62  /*
63   * Init the Vectored Interrupt Controller (VIC)
64   */
65  VICProtection = 0;
66  VICIntSelect = 0;
67  VICVectAddr = 0;
68}
69
Note: See TracBrowser for help on using the repository browser.