RTEMS 7.0-rc1
Loading...
Searching...
No Matches
irq.h
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/*
4 * RTEMS virtex BSP
5 *
6 * This file declares constants of the interrupt controller.
7 */
8
9/*
10 * Copyright (c) 2007 embedded brains GmbH & Co. KG
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#ifndef VIRTEX4_IRQ_IRQ_H
35#define VIRTEX4_IRQ_IRQ_H
36
37#include <rtems/irq.h>
38#include <bsp/irq-default.h>
39
40/*
41 * the following definitions specify the indices used
42 * to interface the interrupt handler API
43 */
44
45/*
46 * Peripheral IRQ handlers related definitions
47 */
48 /* Not supported at this level */
49
50/*
51 * Processor IRQ handlers related definitions
52 */
53#define BSP_PROCESSOR_IRQ_NUMBER 3
54#define BSP_PROCESSOR_IRQ_LOWEST_OFFSET 0
55#define BSP_PROCESSOR_IRQ_MAX_OFFSET (BSP_PROCESSOR_IRQ_LOWEST_OFFSET\
56 +BSP_PROCESSOR_IRQ_NUMBER-1)
57
58#define BSP_IS_PROCESSOR_IRQ(irqnum) \
59 ((irqnum) <= BSP_PROCESSOR_IRQ_MAX_OFFSET)
60
61/*
62 * Summary
63 */
64#define BSP_IRQ_NUMBER (BSP_PROCESSOR_IRQ_MAX_OFFSET+1)
65#define BSP_LOWEST_OFFSET BSP_PROCESSOR_IRQ_LOWEST_OFFSET
66#define BSP_MAX_OFFSET BSP_PROCESSOR_IRQ_MAX_OFFSET
67
68#define BSP_IS_VALID_IRQ(irqnum) BSP_IS_PROCESSOR_IRQ(irqnum)
69
70#ifndef ASM
71#ifdef __cplusplus
72extern "C" {
73#endif
74
75/*
76 * index table for the module specific handlers, a few entries are only placeholders
77 */
78 typedef enum {
79 BSP_EXT = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 0,
80 BSP_PIT = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 1,
81 BSP_CRIT = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + 2
82 } rtems_irq_symbolic_name;
83
84 extern rtems_irq_connect_data *BSP_rtems_irq_tbl;
85 void BSP_irqexc_on_fnc(const rtems_irq_connect_data *conn_data);
86 void BSP_irqexc_off_fnc(const rtems_irq_connect_data *unused);
87 void BSP_rtems_irq_mngt_init(unsigned cpuId);
88
89#ifdef __cplusplus
90}
91#endif
92#endif /* ASM */
93
94#endif /* VIRTEX4_IRQ_IRQ_H */
Interrupt Handler Support.
Definition: irq.h:65