source: rtems/bsps/powerpc/virtex/include/bsp/irq.h @ f0f6e888

Last change on this file since f0f6e888 was f0f6e888, checked in by Christian Mauderer <christian.mauderer@…>, on 03/03/22 at 09:17:19

bsps/powerpc: Manual file header clean up

Updates #4625.

  • Property mode set to 100644
File size: 2.6 KB
Line 
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 VIRTEX_IRQ_IRQ_H
16#define VIRTEX_IRQ_IRQ_H
17
18#include <rtems/irq.h>
19#include <rtems/irq-extension.h>
20#include <bsp/opbintctrl.h>
21
22/*
23 * the following definitions specify the indices used
24 * to interface the interrupt handler API
25 */
26
27/*
28 * Peripheral IRQ handlers related definitions
29 */
30#define BSP_OPBINTC_PER_IRQ_NUMBER      XPAR_INTC_MAX_NUM_INTR_INPUTS
31#define BSP_OPBINTC_IRQ_LOWEST_OFFSET   0
32#define BSP_OPBINTC_IRQ_MAX_OFFSET      (BSP_OPBINTC_IRQ_LOWEST_OFFSET\
33                                         +BSP_OPBINTC_PER_IRQ_NUMBER-1)
34
35#define BSP_IS_OPBINTC_IRQ(irqnum)                              \
36          (((irqnum) >= BSP_OPBINTC_IRQ_LOWEST_OFFSET) &&       \
37           ((irqnum) <= BSP_OPBINTC_IRQ_MAX_OFFSET))
38/*
39 * Processor IRQ handlers related definitions
40 */
41#define BSP_PROCESSOR_IRQ_NUMBER        3
42#define BSP_PROCESSOR_IRQ_LOWEST_OFFSET (BSP_OPBINTC_IRQ_MAX_OFFSET+1)
43#define BSP_PROCESSOR_IRQ_MAX_OFFSET    (BSP_PROCESSOR_IRQ_LOWEST_OFFSET\
44                                         +BSP_PROCESSOR_IRQ_NUMBER-1)
45
46#define BSP_IS_PROCESSOR_IRQ(irqnum)                            \
47          (((irqnum) >= BSP_PROCESSOR_IRQ_LOWEST_OFFSET) &&     \
48           ((irqnum) <= BSP_PROCESSOR_IRQ_MAX_OFFSET))
49/*
50 * Summary
51 */
52#define BSP_IRQ_NUMBER                  (BSP_PROCESSOR_IRQ_MAX_OFFSET+1)
53#define BSP_LOWEST_OFFSET               BSP_OPBINTC_IRQ_LOWEST_OFFSET
54#define BSP_MAX_OFFSET                  BSP_PROCESSOR_IRQ_MAX_OFFSET
55
56#define BSP_IS_VALID_IRQ(irqnum)        \
57          (BSP_IS_PROCESSOR_IRQ(irqnum) \
58           || BSP_IS_OPBINTC_IRQ(irqnum))
59
60#define BSP_INTERRUPT_VECTOR_COUNT (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
61
62#ifndef ASM
63#ifdef __cplusplus
64extern "C" {
65#endif
66
67/*
68 * index table for the module specific handlers, a few entries are only placeholders
69 */
70  typedef enum {
71    BSP_OPBINTC_IRQ_FIRST       = BSP_OPBINTC_IRQ_LOWEST_OFFSET,
72    /*
73     * Note: for this BSP, the peripheral names are derived
74     * from the Xilinx parameter file
75     */
76    BSP_OPBINTC_IRQ_LAST        = BSP_OPBINTC_IRQ_MAX_OFFSET,
77    BSP_EXT               = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 0,
78    BSP_PIT               = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 1,
79    BSP_CRIT              = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 2
80  } rtems_irq_symbolic_name;
81
82#define BSP_OPBINTC_XPAR(xname) (BSP_OPBINTC_IRQ_LOWEST_OFFSET+xname)
83
84#ifdef __cplusplus
85}
86#endif
87#endif /* ASM */
88
89#endif /* VIRTEX_IRQ_IRQ_H */
Note: See TracBrowser for help on using the repository browser.