RTEMS
7.0-rc1
Loading...
Searching...
No Matches
bsps
powerpc
mvme3100
include
bsp
irq.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0+-with-RTEMS-exception */
2
21
/*
22
* Copyright (c) 1999 Eric Valette <eric.valette@free.fr>
23
* Adapted for the mvme3100 BSP by T. Straumann, 2007.
24
*
25
* The license and distribution terms for this file may be
26
* found in the file LICENSE in this distribution or at
27
* http://www.rtems.org/license/LICENSE.
28
*/
29
30
#ifndef BSP_POWERPC_IRQ_H
31
#define BSP_POWERPC_IRQ_H
32
33
#ifndef BSP_SHARED_HANDLER_SUPPORT
34
#define BSP_SHARED_HANDLER_SUPPORT 1
35
#endif
36
#include <
rtems/irq.h
>
37
38
#ifndef ASM
39
40
#include <
bsp/irq-default.h
>
41
42
#ifdef __cplusplus
43
extern
"C"
{
44
#endif
45
54
/* Must pad number of external sources to 16 because
55
* of the layout of vector/priority registers in the
56
* 8540's openpic where there is a gap between
57
* registers corresponding to external and core sources.
58
*/
59
#define BSP_EXT_IRQ_NUMBER (16)
60
#define BSP_CORE_IRQ_NUMBER (32)
61
62
/* openpic glue code from shared/irq assigns priorities and configures
63
* initial ISRs for BSP_PCI_IRQ_NUMBER entries (plus ISA stuff on legacy
64
* boards). Hence PCI_IRQ_NUMBER must also cover the internal sources
65
* even though they have nothing to do with PCI.
66
*/
67
#define BSP_PCI_IRQ_NUMBER (BSP_EXT_IRQ_NUMBER + BSP_CORE_IRQ_NUMBER)
68
#define BSP_PCI_IRQ_LOWEST_OFFSET (0)
69
#define BSP_PCI_IRQ_MAX_OFFSET (BSP_PCI_IRQ_LOWEST_OFFSET + BSP_PCI_IRQ_NUMBER - 1)
70
71
#define BSP_CORE_IRQ_LOWEST_OFFSET (BSP_PCI_IRQ_LOWEST_OFFSET + BSP_EXT_IRQ_NUMBER)
72
#define BSP_CORE_IRQ_MAX_OFFSET (BSP_CORE_IRQ_LOWEST_OFFSET + BSP_CORE_IRQ_NUMBER - 1)
73
74
/*
75
* PowerPC exceptions handled as interrupt where an RTEMS managed interrupt
76
* handler might be connected
77
*/
78
#define BSP_PROCESSOR_IRQ_NUMBER (1)
79
#define BSP_PROCESSOR_IRQ_LOWEST_OFFSET (BSP_CORE_IRQ_MAX_OFFSET + 1)
80
#define BSP_PROCESSOR_IRQ_MAX_OFFSET (BSP_PROCESSOR_IRQ_LOWEST_OFFSET + BSP_PROCESSOR_IRQ_NUMBER - 1)
81
/* Misc vectors for OPENPIC irqs (IPI, timers)
82
*/
83
#define BSP_MISC_IRQ_NUMBER (8)
84
#define BSP_MISC_IRQ_LOWEST_OFFSET (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
85
#define BSP_MISC_IRQ_MAX_OFFSET (BSP_MISC_IRQ_LOWEST_OFFSET + BSP_MISC_IRQ_NUMBER - 1)
86
/*
87
* Summary
88
*/
89
#define BSP_IRQ_NUMBER (BSP_MISC_IRQ_MAX_OFFSET + 1)
90
#define BSP_LOWEST_OFFSET (BSP_PCI_IRQ_LOWEST_OFFSET)
91
#define BSP_MAX_OFFSET (BSP_MISC_IRQ_MAX_OFFSET)
92
93
/*
94
* Some PCI IRQ symbolic name definition
95
*/
96
#define BSP_PCI_IRQ0 (BSP_PCI_IRQ_LOWEST_OFFSET)
97
98
#define BSP_VME0_IRQ (BSP_PCI_IRQ_LOWEST_OFFSET + 0)
99
#define BSP_VME1_IRQ (BSP_PCI_IRQ_LOWEST_OFFSET + 1)
100
#define BSP_VME2_IRQ (BSP_PCI_IRQ_LOWEST_OFFSET + 2)
101
#define BSP_VME3_IRQ (BSP_PCI_IRQ_LOWEST_OFFSET + 3)
102
103
#define BSP_ABORT_IRQ (BSP_PCI_IRQ_LOWEST_OFFSET + 8)
104
#define BSP_TEMP_IRQ (BSP_PCI_IRQ_LOWEST_OFFSET + 9)
105
#define BSP_PHY_IRQ (BSP_PCI_IRQ_LOWEST_OFFSET + 10)
106
#define BSP_RTC_IRQ (BSP_PCI_IRQ_LOWEST_OFFSET + 11)
107
108
/* Weird - they provide 3 different IRQ lines per ethernet controller
109
* but only one shared line for 2 UARTs ???
110
*/
111
#define BSP_UART_COM1_IRQ (BSP_CORE_IRQ_LOWEST_OFFSET + 26)
112
#define BSP_UART_COM2_IRQ (BSP_CORE_IRQ_LOWEST_OFFSET + 26)
113
#define BSP_I2C_IRQ (BSP_CORE_IRQ_LOWEST_OFFSET + 27)
114
115
/*
116
* Some internal (CORE) name definitions
117
*/
118
/* Ethernet (FEC) */
119
#define BSP_CORE_IRQ_FEC (BSP_CORE_IRQ_LOWEST_OFFSET + 25)
120
/* i2c controller */
121
#define BSP_CORE_IRQ_I2C (BSP_CORE_IRQ_LOWEST_OFFSET + 27)
122
123
/*
124
* Some Processor execption handled as RTEMS IRQ symbolic name definition
125
*/
126
#define BSP_DECREMENTER (BSP_PROCESSOR_IRQ_LOWEST_OFFSET)
127
128
/*-------------------------------------------------------------------------+
129
| Function Prototypes.
130
+--------------------------------------------------------------------------*/
131
132
extern
void
BSP_rtems_irq_mng_init(
unsigned
cpuId);
133
134
#include <bsp/irq_supp.h>
135
136
#ifdef __cplusplus
137
};
138
#endif
139
140
#endif
141
#endif
irq.h
Interrupt Handler Support.
irq-default.h
Generated by
1.9.6