4.115
Last change
on this file since 9b2e7143 was
9b2e7143,
checked in by Sebastian Huber <sebastian.huber@…>, on 01/04/13 at 12:05:28
|
arm: Move prototypes to new file
Move bsp_interrupt_dispatch() and arm_exc_interrupt() prototypes to new
file <rtems/score/armv4.h> since they have nothing to do with the CPU
port.
|
-
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 | * http://www.rtems.com/license/LICENSE. |
---|
11 | */ |
---|
12 | |
---|
13 | #include <rtems/score/armv4.h> |
---|
14 | |
---|
15 | #include <bsp.h> |
---|
16 | #include <bsp/irq.h> |
---|
17 | #include <bsp/irq-generic.h> |
---|
18 | |
---|
19 | #include <at91rm9200.h> |
---|
20 | |
---|
21 | void bsp_interrupt_dispatch(void) |
---|
22 | { |
---|
23 | rtems_vector_number vector = AIC_CTL_REG(AIC_IVR); |
---|
24 | |
---|
25 | bsp_interrupt_handler_dispatch(vector); |
---|
26 | |
---|
27 | AIC_CTL_REG(AIC_EOICR) = 0; |
---|
28 | } |
---|
29 | |
---|
30 | rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector) |
---|
31 | { |
---|
32 | AIC_CTL_REG(AIC_IECR) = 1 << vector; |
---|
33 | |
---|
34 | return RTEMS_SUCCESSFUL; |
---|
35 | } |
---|
36 | |
---|
37 | rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector) |
---|
38 | { |
---|
39 | AIC_CTL_REG(AIC_IDCR) = 1 << vector; |
---|
40 | |
---|
41 | return RTEMS_SUCCESSFUL; |
---|
42 | } |
---|
43 | |
---|
44 | rtems_status_code bsp_interrupt_facility_initialize(void) |
---|
45 | { |
---|
46 | unsigned long i = 0; |
---|
47 | |
---|
48 | for (i = 0; i < 32; ++i) { |
---|
49 | AIC_SVR_REG(i<<2) = i; |
---|
50 | } |
---|
51 | |
---|
52 | /* disable all interrupts */ |
---|
53 | AIC_CTL_REG(AIC_IDCR) = 0xffffffff; |
---|
54 | |
---|
55 | _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, arm_exc_interrupt, NULL); |
---|
56 | |
---|
57 | return RTEMS_SUCCESSFUL; |
---|
58 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.