summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_init.c
blob: aeabc1f1457e3e6f034b1887a0165b3f18d36404 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * PXA255 interrupt controller by Yang Xi <hiyangxi@gmail.com>
 * Copyright (c) 2004 by Jay Monkman <jtm@lopgindog.com>
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.org/license/LICENSE.
 */

#include <irq.h>
#include <bsp.h>
#include <pxa255.h>

void dummy_handler(rtems_irq_hdl_param unused)
{
  printk("I am dummy handler\n");
}

void (*IRQ_table[PRIMARY_IRQS])(rtems_irq_hdl_param param);

/*
 * Interrupt system initialization. Disable interrupts, clear
 * any that are pending.
 */
void BSP_rtems_irq_mngt_init(void)
{
  int i;

  /* Initialize the vector table contents with default handler */
  for (i=0; i<PRIMARY_IRQS; i++) {
    IRQ_table[i] = dummy_handler;
  }

  /* disable all interrupts */
  XSCALE_INT_ICMR = 0x0;

  /* Direct the interrupt to IRQ*/
  XSCALE_INT_ICLR = 0x0;
}