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

4.104.115
Last change on this file since f4dc319a was f4dc319a, checked in by Sebastian Huber <sebastian.huber@…>, on 04/30/10 at 13:15:49

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
RevLine 
[af85485]1/*
2 * Atmel AT91RM9200 Interrupt handler
3 *
[f4dc319a]4 * Copyright (c) 2010 embedded brains GmbH.
5 *
[af85485]6 * Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
[359e537]7 *
[af85485]8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *
[93f4a906]11 *  http://www.rtems.com/license/LICENSE.
[af85485]12 *
13 *  $Id$
14 */
[f4dc319a]15
[af85485]16#include <bsp.h>
[f4dc319a]17#include <bsp/irq.h>
18#include <bsp/irq-generic.h>
[af85485]19
[f4dc319a]20#include <at91rm9200.h>
[af85485]21
[f4dc319a]22void bsp_interrupt_dispatch(void)
[af85485]23{
[f4dc319a]24  rtems_vector_number vector = AIC_CTL_REG(AIC_ISR);
[359e537]25
[f4dc319a]26  bsp_interrupt_handler_dispatch(vector);
[359e537]27
[f4dc319a]28  AIC_CTL_REG(AIC_EOICR) = 0;
[af85485]29}
30
[f4dc319a]31rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
[af85485]32{
[f4dc319a]33  AIC_CTL_REG(AIC_IECR) = 1 << vector;
[359e537]34
[f4dc319a]35  return RTEMS_SUCCESSFUL;
36}
[af85485]37
[f4dc319a]38rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
39{
40  AIC_CTL_REG(AIC_IDCR) = 1 << vector;
[af85485]41
[f4dc319a]42  return RTEMS_SUCCESSFUL;
43}
[359e537]44
[f4dc319a]45rtems_status_code bsp_interrupt_facility_initialize(void)
46{
47  /* disable all interrupts */
48  AIC_CTL_REG(AIC_IDCR) = 0xffffffff;
[af85485]49
[f4dc319a]50  _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, arm_exc_interrupt, NULL);
[359e537]51
[f4dc319a]52  return RTEMS_SUCCESSFUL;
53}
[af85485]54
[f4dc319a]55void bsp_interrupt_handler_default(rtems_vector_number vector)
56{
57  printk("spurious interrupt: %u\n", vector);
[af85485]58}
Note: See TracBrowser for help on using the repository browser.