1 | /* |
---|
2 | * RTEMS virtex BSP |
---|
3 | * |
---|
4 | * This file declares constants of the interrupt controller. |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) 2007 embedded brains GmbH. All rights reserved. |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifndef VIRTEX5_IRQ_IRQ_H |
---|
16 | #define VIRTEX5_IRQ_IRQ_H |
---|
17 | |
---|
18 | #include <rtems/irq.h> |
---|
19 | #include <bsp/irq-default.h> |
---|
20 | |
---|
21 | /* |
---|
22 | * the following definitions specify the indices used |
---|
23 | * to interface the interrupt handler API |
---|
24 | */ |
---|
25 | |
---|
26 | /* |
---|
27 | * Peripheral IRQ handlers related definitions |
---|
28 | */ |
---|
29 | /* Not supported at this level */ |
---|
30 | |
---|
31 | /* |
---|
32 | * Processor IRQ handlers related definitions |
---|
33 | */ |
---|
34 | #define BSP_PROCESSOR_IRQ_NUMBER 3 |
---|
35 | #define BSP_PROCESSOR_IRQ_LOWEST_OFFSET 0 |
---|
36 | #define BSP_PROCESSOR_IRQ_MAX_OFFSET (BSP_PROCESSOR_IRQ_LOWEST_OFFSET\ |
---|
37 | +BSP_PROCESSOR_IRQ_NUMBER-1) |
---|
38 | |
---|
39 | #define BSP_IS_PROCESSOR_IRQ(irqnum) \ |
---|
40 | (((irqnum) >= BSP_PROCESSOR_IRQ_LOWEST_OFFSET) && \ |
---|
41 | ((irqnum) <= BSP_PROCESSOR_IRQ_MAX_OFFSET)) |
---|
42 | |
---|
43 | /* |
---|
44 | * Summary |
---|
45 | */ |
---|
46 | #define BSP_IRQ_NUMBER (BSP_PROCESSOR_IRQ_MAX_OFFSET+1) |
---|
47 | #define BSP_LOWEST_OFFSET BSP_PROCESSOR_IRQ_LOWEST_OFFSET |
---|
48 | #define BSP_MAX_OFFSET BSP_PROCESSOR_IRQ_MAX_OFFSET |
---|
49 | |
---|
50 | #define BSP_IS_VALID_IRQ(irqnum) (BSP_IS_PROCESSOR_IRQ(irqnum)) |
---|
51 | |
---|
52 | #ifndef ASM |
---|
53 | #ifdef __cplusplus |
---|
54 | extern "C" { |
---|
55 | #endif |
---|
56 | |
---|
57 | /* |
---|
58 | * index table for the module specific handlers, a few entries are only placeholders |
---|
59 | */ |
---|
60 | typedef enum { |
---|
61 | BSP_EXT = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 0, |
---|
62 | BSP_PIT = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 1, |
---|
63 | BSP_CRIT = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 2 |
---|
64 | } rtems_irq_symbolic_name; |
---|
65 | |
---|
66 | extern rtems_irq_connect_data *BSP_rtems_irq_tbl; |
---|
67 | void BSP_irqexc_on_fnc(const rtems_irq_connect_data *conn_data); |
---|
68 | void BSP_irqexc_off_fnc(const rtems_irq_connect_data *unused); |
---|
69 | void BSP_rtems_irq_mngt_init(unsigned cpuId); |
---|
70 | |
---|
71 | #define BSP_DEC BSP_PIT |
---|
72 | #define BSP_DECREMENTER BSP_PIT |
---|
73 | |
---|
74 | #ifdef __cplusplus |
---|
75 | } |
---|
76 | #endif |
---|
77 | #endif /* ASM */ |
---|
78 | |
---|
79 | #endif /* VIRTEX5_IRQ_IRQ_H */ |
---|