source: rtems/bsps/powerpc/virtex4/include/bsp/irq.h @ 45d0659

5
Last change on this file since 45d0659 was 45d0659, checked in by Sebastian Huber <sebastian.huber@…>, on 05/11/19 at 12:57:39

bsps: Always build generic interrupt support

This makes it possible to write tests for the generic interrupt
controller support.

Update #3269.

  • Property mode set to 100644
File size: 2.9 KB
RevLine 
[16a8616]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|                                                                 |
[c499856]14| http://www.rtems.org/license/LICENSE.                           |
[16a8616]15|                                                                 |
16+-----------------------------------------------------------------+
17| this file declares constants of the interrupt controller        |
18\*===============================================================*/
19#ifndef VIRTEX4_IRQ_IRQ_H
20#define VIRTEX4_IRQ_IRQ_H
21
22#include <rtems/irq.h>
[45d0659]23#include <bsp/irq-default.h>
[16a8616]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
58extern "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;
[967278f]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);
[16a8616]73  void BSP_rtems_irq_mngt_init(unsigned cpuId);
74
75#ifdef __cplusplus
76}
77#endif
78#endif /* ASM */
79
80#endif /* VIRTEX4_IRQ_IRQ_H */
Note: See TracBrowser for help on using the repository browser.