5
Last change
on this file since 8f8ccee was
8f8ccee,
checked in by Sebastian Huber <sebastian.huber@…>, on 04/23/18 at 07:50:39
|
bsps: Move interrupt controller support to bsps
This patch is a part of the BSP source reorganization.
Update #3285.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * Motorola MC9328MXL 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.org/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 <mc9328mxl.h> |
---|
20 | |
---|
21 | void bsp_interrupt_dispatch(void) |
---|
22 | { |
---|
23 | |
---|
24 | rtems_vector_number vector = MC9328MXL_AITC_NIVECSR >> 16; |
---|
25 | |
---|
26 | bsp_interrupt_handler_dispatch(vector); |
---|
27 | } |
---|
28 | |
---|
29 | void bsp_interrupt_vector_enable(rtems_vector_number vector) |
---|
30 | { |
---|
31 | bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector)); |
---|
32 | |
---|
33 | if (vector < MC9328MXL_NUM_INTS) |
---|
34 | MC9328MXL_AITC_INTENNUM = vector; |
---|
35 | } |
---|
36 | |
---|
37 | void bsp_interrupt_vector_disable(rtems_vector_number vector) |
---|
38 | { |
---|
39 | bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector)); |
---|
40 | |
---|
41 | if (vector < MC9328MXL_NUM_INTS) |
---|
42 | MC9328MXL_AITC_INTDISNUM = vector; |
---|
43 | } |
---|
44 | |
---|
45 | rtems_status_code bsp_interrupt_facility_initialize(void) |
---|
46 | { |
---|
47 | |
---|
48 | _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt, NULL); |
---|
49 | |
---|
50 | return RTEMS_SUCCESSFUL; |
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.