source: rtems/c/src/lib/libcpu/arm/at91rm9200/irq/irq.c @ f4dc319a

4.104.11
Last change on this file since f4dc319a was f4dc319a, checked in by Sebastian Huber <sebastian.huber@…>, on Apr 30, 2010 at 1:15:49 PM

2010-04-30 Sebastian Huber <sebastian.huber@…>

  • at91rm9200/irq/irq.c, at91rm9200/irq/irq.h, lpc22xx/irq/irq.c, lpc22xx/irq/irq.h, mc9328mxl/irq/irq.c, mc9328mxl/irq/irq.h, pxa255/irq/irq.c, pxa255/irq/irq.h, s3c24xx/irq/irq.c, s3c24xx/irq/irq.h: The previous interrupt warning fix changed the interrupt handler API. To fix this problem the generic interrupt support framework will be used now. This eliminates a lot of copy and paste code. The interrupt header file is now <bsp/irq.h>.
  • at91rm9200/clock/clock.c, lpc22xx/clock/clockdrv.c, mc9328mxl/clock/clockdrv.c, pxa255/clock/clock.c, s3c24xx/clock/clockdrv.c: Include <bsp/irq.h> instead of <irq.h>.
  • at91rm9200/irq/bsp_irq_asm.S, at91rm9200/irq/bsp_irq_init.c, mc9328mxl/irq/bsp_irq_asm.S, mc9328mxl/irq/bsp_irq_init.c, s3c24xx/irq/bsp_irq_asm.S, s3c24xx/irq/bsp_irq_init.c: Removed files.
  • Makefile.am, preinstall.am: Reflect changes above.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 * Atmel AT91RM9200 Interrupt handler
3 *
4 * Copyright (c) 2010 embedded brains GmbH.
5 *
6 * Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#include <bsp.h>
17#include <bsp/irq.h>
18#include <bsp/irq-generic.h>
19
20#include <at91rm9200.h>
21
22void bsp_interrupt_dispatch(void)
23{
24  rtems_vector_number vector = AIC_CTL_REG(AIC_ISR);
25
26  bsp_interrupt_handler_dispatch(vector);
27
28  AIC_CTL_REG(AIC_EOICR) = 0;
29}
30
31rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
32{
33  AIC_CTL_REG(AIC_IECR) = 1 << vector;
34
35  return RTEMS_SUCCESSFUL;
36}
37
38rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
39{
40  AIC_CTL_REG(AIC_IDCR) = 1 << vector;
41
42  return RTEMS_SUCCESSFUL;
43}
44
45rtems_status_code bsp_interrupt_facility_initialize(void)
46{
47  /* disable all interrupts */
48  AIC_CTL_REG(AIC_IDCR) = 0xffffffff;
49
50  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, arm_exc_interrupt, NULL);
51
52  return RTEMS_SUCCESSFUL;
53}
54
55void bsp_interrupt_handler_default(rtems_vector_number vector)
56{
57  printk("spurious interrupt: %u\n", vector);
58}
Note: See TracBrowser for help on using the repository browser.