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