source: rtems/c/src/lib/libcpu/arm/pxa255/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 100755
File size: 1.3 KB
Line 
1/*
2 * Copyright (c) 2010 embedded brains GmbH.
3 *
4 * PXA255 Interrupt handler by Yang Xi <hiyangxi@gmail.com>
5 * Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#include <bsp.h>
15#include <bsp/irq.h>
16#include <bsp/irq-generic.h>
17
18#include <pxa255.h>
19
20void bsp_interrupt_dispatch(void)
21{
22  rtems_vector_number vector = 31 - __builtin_clz(XSCALE_INT_ICIP);
23
24  bsp_interrupt_handler_dispatch(vector);
25}
26
27rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
28{
29  XSCALE_INT_ICMR |= 1 << vector;
30
31  return RTEMS_SUCCESSFUL;
32}
33
34rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
35{
36  XSCALE_INT_ICMR  &= ~(1 << vector);
37
38  return RTEMS_SUCCESSFUL;
39}
40
41rtems_status_code bsp_interrupt_facility_initialize(void)
42{
43  /* disable all interrupts */
44  XSCALE_INT_ICMR = 0x0;
45
46  /* Direct the interrupt to IRQ*/
47  XSCALE_INT_ICLR = 0x0;
48
49  /* Install the IRQ exception handler */
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.