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 | * 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 | |
---|
12 | #include <rtems/score/armv4.h> |
---|
13 | |
---|
14 | #include <bsp.h> |
---|
15 | #include <bsp/irq.h> |
---|
16 | #include <bsp/irq-generic.h> |
---|
17 | |
---|
18 | #include <pxa255.h> |
---|
19 | |
---|
20 | void 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 | |
---|
27 | rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector) |
---|
28 | { |
---|
29 | XSCALE_INT_ICMR |= 1 << vector; |
---|
30 | |
---|
31 | return RTEMS_SUCCESSFUL; |
---|
32 | } |
---|
33 | |
---|
34 | rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector) |
---|
35 | { |
---|
36 | XSCALE_INT_ICMR &= ~(1 << vector); |
---|
37 | |
---|
38 | return RTEMS_SUCCESSFUL; |
---|
39 | } |
---|
40 | |
---|
41 | rtems_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 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.