source: rtems/bsps/powerpc/qoriq/include/bsp/irq.h @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 10.8 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup QorIQInterrupt
5 *
6 * @brief Interrupt API.
7 */
8
9/*
10 * Copyright (c) 2010-2015 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Dornierstr. 4
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.org/license/LICENSE.
21 */
22
23#ifndef LIBBSP_POWERPC_QORIQ_IRQ_H
24#define LIBBSP_POWERPC_QORIQ_IRQ_H
25
26#include <bsp.h>
27#include <rtems/irq.h>
28#include <rtems/irq-extension.h>
29#include <rtems/score/processormask.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif /* __cplusplus */
34
35#ifdef QORIQ_IS_HYPERVISOR_GUEST
36
37#define BSP_INTERRUPT_VECTOR_MAX 1023
38
39#else /* !QORIQ_IS_HYPERVISOR_GUEST */
40
41#define QORIQ_IRQ_ERROR 0
42
43#if QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT)
44
45#define QORIQ_IRQ_PCI_EXPRESS_1 4
46#define QORIQ_IRQ_PCI_EXPRESS_2 5
47#define QORIQ_IRQ_PCI_EXPRESS_3 6
48#define QORIQ_IRQ_PCI_EXPRESS_4 7
49#define QORIQ_IRQ_PAMU 8
50#define QORIQ_IRQ_IFC 9
51#define QORIQ_IRQ_DMA_CHANNEL_1_1 12
52#define QORIQ_IRQ_DMA_CHANNEL_1_2 13
53#define QORIQ_IRQ_DMA_CHANNEL_1_3 14
54#define QORIQ_IRQ_DMA_CHANNEL_1_4 15
55#define QORIQ_IRQ_DMA_CHANNEL_2_1 16
56#define QORIQ_IRQ_DMA_CHANNEL_2_2 17
57#define QORIQ_IRQ_DMA_CHANNEL_2_3 18
58#define QORIQ_IRQ_DMA_CHANNEL_2_4 19
59#define QORIQ_IRQ_DUART_1 20
60#define QORIQ_IRQ_DUART_2 21
61#define QORIQ_IRQ_DUARL_I2C_1 22
62#define QORIQ_IRQ_DUARL_I2C_2 23
63#define QORIQ_IRQ_PCI_EXPRESS_1_INTA 24
64#define QORIQ_IRQ_PCI_EXPRESS_2_INTA 25
65#define QORIQ_IRQ_PCI_EXPRESS_3_INTA 26
66#define QORIQ_IRQ_PCI_EXPRESS_4_INTA 27
67#define QORIQ_IRQ_USB_1 28
68#define QORIQ_IRQ_USB_2 29
69#define QORIQ_IRQ_ESDHC 32
70#define QORIQ_IRQ_PERF_MON 36
71#define QORIQ_IRQ_ESPI 37
72#define QORIQ_IRQ_GPIO_2 38
73#define QORIQ_IRQ_GPIO_1 39
74#define QORIQ_IRQ_SATA_1 52
75#define QORIQ_IRQ_SATA_2 53
76#define QORIQ_IRQ_DMA_CHANNEL_1_5 60
77#define QORIQ_IRQ_DMA_CHANNEL_1_6 61
78#define QORIQ_IRQ_DMA_CHANNEL_1_7 62
79#define QORIQ_IRQ_DMA_CHANNEL_1_8 63
80#define QORIQ_IRQ_DMA_CHANNEL_2_5 64
81#define QORIQ_IRQ_DMA_CHANNEL_2_6 65
82#define QORIQ_IRQ_DMA_CHANNEL_2_7 66
83#define QORIQ_IRQ_DMA_CHANNEL_2_8 67
84#define QORIQ_IRQ_EVENT_PROC_UNIT_1 68
85#define QORIQ_IRQ_EVENT_PROC_UNIT_2 69
86#define QORIQ_IRQ_GPIO_3 70
87#define QORIQ_IRQ_GPIO_4 71
88#define QORIQ_IRQ_SEC_5_2_JOB_QUEUE_1 72
89#define QORIQ_IRQ_SEC_5_2_JOB_QUEUE_2 73
90#define QORIQ_IRQ_SEC_5_2_JOB_QUEUE_3 74
91#define QORIQ_IRQ_SEC_5_2_JOB_QUEUE_4 75
92#define QORIQ_IRQ_SEC_5_2_GLOBAL_ERROR 76
93#define QORIQ_IRQ_SEC_MON 77
94#define QORIQ_IRQ_EVENT_PROC_UNIT_3 78
95#define QORIQ_IRQ_EVENT_PROC_UNIT_4 79
96#define QORIQ_IRQ_FRAME_MGR 80
97#define QORIQ_IRQ_MDIO_1 84
98#define QORIQ_IRQ_MDIO_2 85
99#define QORIQ_IRQ_QUEUE_MGR_PORTAL_0 88
100#define QORIQ_IRQ_BUFFER_MGR_PORTAL_0 89
101#define QORIQ_IRQ_QUEUE_MGR_PORTAL_1 90
102#define QORIQ_IRQ_BUFFER_MGR_PORTAL_1 91
103#define QORIQ_IRQ_QUEUE_MGR_PORTAL_2 92
104#define QORIQ_IRQ_BUFFER_MGR_PORTAL_2 93
105#define QORIQ_IRQ_QUEUE_MGR_PORTAL_3 94
106#define QORIQ_IRQ_BUFFER_MGR_PORTAL_3 95
107#define QORIQ_IRQ_QUEUE_MGR_PORTAL_4 96
108#define QORIQ_IRQ_BUFFER_MGR_PORTAL_4 97
109#define QORIQ_IRQ_QUEUE_MGR_PORTAL_5 98
110#define QORIQ_IRQ_BUFFER_MGR_PORTAL_5 99
111#define QORIQ_IRQ_QUEUE_MGR_PORTAL_6 100
112#define QORIQ_IRQ_BUFFER_MGR_PORTAL_6 101
113#define QORIQ_IRQ_QUEUE_MGR_PORTAL_7 102
114#define QORIQ_IRQ_BUFFER_MGR_PORTAL_7 103
115#define QORIQ_IRQ_QUEUE_MGR_PORTAL_8 104
116#define QORIQ_IRQ_BUFFER_MGR_PORTAL_8 105
117#define QORIQ_IRQ_QUEUE_MGR_PORTAL_9 106
118#define QORIQ_IRQ_BUFFER_MGR_PORTAL_9 107
119#define QORIQ_IRQ_QUEUE_MGR_PORTAL_10 109
120#define QORIQ_IRQ_BUFFER_MGR_PORTAL_10 109
121#define QORIQ_IRQ_QUEUE_MGR_PORTAL_11 110
122#define QORIQ_IRQ_BUFFER_MGR_PORTAL_11 111
123#define QORIQ_IRQ_QUEUE_MGR_PORTAL_12 112
124#define QORIQ_IRQ_BUFFER_MGR_PORTAL_12 113
125#define QORIQ_IRQ_QUEUE_MGR_PORTAL_13 114
126#define QORIQ_IRQ_BUFFER_MGR_PORTAL_13 115
127#define QORIQ_IRQ_QUEUE_MGR_PORTAL_14 116
128#define QORIQ_IRQ_BUFFER_MGR_PORTAL_14 117
129#define QORIQ_IRQ_QUEUE_MGR_PORTAL_15 118
130#define QORIQ_IRQ_BUFFER_MGR_PORTAL_15 119
131#define QORIQ_IRQ_QUEUE_MGR_PORTAL_16 120
132#define QORIQ_IRQ_BUFFER_MGR_PORTAL_16 121
133#define QORIQ_IRQ_QUEUE_MGR_PORTAL_17 122
134#define QORIQ_IRQ_BUFFER_MGR_PORTAL_17 123
135#define QORIQ_IRQ_DMA_CHANNEL_3_1 240
136#define QORIQ_IRQ_DMA_CHANNEL_3_2 241
137#define QORIQ_IRQ_DMA_CHANNEL_3_3 242
138#define QORIQ_IRQ_DMA_CHANNEL_3_4 243
139#define QORIQ_IRQ_DMA_CHANNEL_3_5 244
140#define QORIQ_IRQ_DMA_CHANNEL_3_6 245
141#define QORIQ_IRQ_DMA_CHANNEL_3_7 246
142#define QORIQ_IRQ_DMA_CHANNEL_3_8 247
143
144#define QORIQ_IRQ_EXT_BASE 256
145
146#else /* QORIQ_CHIP_VARIANT */
147
148/**
149 * @defgroup QoriqInterruptP1020 QorIQ - P1020 Internal Interrupt Sources
150 *
151 * @ingroup QorIQInterrupt
152 *
153 * @brief P1020 internal interrupt sources.
154 *
155 * @{
156 */
157
158#define QORIQ_IRQ_ETSEC_TX_1_GROUP_1 1
159#define QORIQ_IRQ_ETSEC_RX_1_GROUP_1 2
160#define QORIQ_IRQ_ETSEC_ER_1_GROUP_1 8
161#define QORIQ_IRQ_ETSEC_TX_3_GROUP_1 9
162#define QORIQ_IRQ_ETSEC_RX_3_GROUP_1 10
163#define QORIQ_IRQ_ETSEC_ER_3_GROUP_1 11
164#define QORIQ_IRQ_ETSEC_TX_2_GROUP_1 35
165#define QORIQ_IRQ_ETSEC_RX_2_GROUP_1 36
166#define QORIQ_IRQ_TDM 46
167#define QORIQ_IRQ_TDM_ERROR 47
168#define QORIQ_IRQ_ETSEC_ER_2_GROUP_1 51
169
170/** @} */
171
172/**
173 * @defgroup QoriqInterruptP2020 QorIQ - P2020 Internal Interrupt Sources
174 *
175 * @ingroup QorIQInterrupt
176 *
177 * @brief P2020 internal interrupt sources.
178 *
179 * @{
180 */
181
182#define QORIQ_IRQ_L2_CACHE 0
183#define QORIQ_IRQ_ECM 1
184#define QORIQ_IRQ_DDR_CONTROLLER 2
185#define QORIQ_IRQ_PCI_EXPRESS_3 8
186#define QORIQ_IRQ_PCI_EXPRESS_2 9
187#define QORIQ_IRQ_PCI_EXPRESS_1 10
188#define QORIQ_IRQ_SRIO_ERR_WRT_1_2 32
189#define QORIQ_IRQ_SRIO_OUT_DOORBELL_1 33
190#define QORIQ_IRQ_SRIO_IN_DOORBELL_1 34
191#define QORIQ_IRQ_SRIO_OUT_MSG_1 37
192#define QORIQ_IRQ_SRIO_IN_MSG_1 38
193#define QORIQ_IRQ_SRIO_OUT_MSG_2 39
194#define QORIQ_IRQ_SRIO_IN_MSG_2 40
195
196/** @} */
197
198/**
199 * @defgroup QoriqInterruptAll QorIQ - Internal Interrupt Sources
200 *
201 * @ingroup QorIQInterrupt
202 *
203 * @brief Internal interrupt sources.
204 *
205 * @{
206 */
207
208#define QORIQ_IRQ_ELBC 3
209#define QORIQ_IRQ_DMA_CHANNEL_1_1 4
210#define QORIQ_IRQ_DMA_CHANNEL_2_1 5
211#define QORIQ_IRQ_DMA_CHANNEL_3_1 6
212#define QORIQ_IRQ_DMA_CHANNEL_4_1 7
213#define QORIQ_IRQ_USB_1 12
214#define QORIQ_IRQ_ETSEC_TX_1 13
215#define QORIQ_IRQ_ETSEC_RX_1 14
216#define QORIQ_IRQ_ETSEC_TX_3 15
217#define QORIQ_IRQ_ETSEC_RX_3 16
218#define QORIQ_IRQ_ETSEC_ER_3 17
219#define QORIQ_IRQ_ETSEC_ER_1 18
220#define QORIQ_IRQ_ETSEC_TX_2 19
221#define QORIQ_IRQ_ETSEC_RX_2 20
222#define QORIQ_IRQ_ETSEC_ER_2 24
223#define QORIQ_IRQ_DUART_1 26
224#define QORIQ_IRQ_I2C 27
225#define QORIQ_IRQ_PERFORMANCE_MONITOR 28
226#define QORIQ_IRQ_SECURITY_1 29
227#define QORIQ_IRQ_USB_2 30
228#define QORIQ_IRQ_GPIO 31
229#define QORIQ_IRQ_SECURITY_2 42
230#define QORIQ_IRQ_ESPI 43
231#define QORIQ_IRQ_ETSEC_IEEE_1588_1 52
232#define QORIQ_IRQ_ETSEC_IEEE_1588_2 53
233#define QORIQ_IRQ_ETSEC_IEEE_1588_3 54
234#define QORIQ_IRQ_ESDHC 56
235#define QORIQ_IRQ_DMA_CHANNEL_1_2 60
236#define QORIQ_IRQ_DMA_CHANNEL_2_2 61
237#define QORIQ_IRQ_DMA_CHANNEL_3_2 62
238#define QORIQ_IRQ_DMA_CHANNEL_4_2 63
239
240/** @} */
241
242#define QORIQ_IRQ_EXT_BASE 64
243
244#endif /* QORIQ_CHIP_VARIANT */
245
246/**
247 * @defgroup QoriqInterruptExternal QorIQ - External Interrupt Sources
248 *
249 * @ingroup QorIQInterrupt
250 *
251 * @brief External interrupt sources.
252 *
253 * @{
254 */
255
256#define QORIQ_IRQ_EXT_0 (QORIQ_IRQ_EXT_BASE + 0)
257#define QORIQ_IRQ_EXT_1 (QORIQ_IRQ_EXT_BASE + 1)
258#define QORIQ_IRQ_EXT_2 (QORIQ_IRQ_EXT_BASE + 2)
259#define QORIQ_IRQ_EXT_3 (QORIQ_IRQ_EXT_BASE + 3)
260#define QORIQ_IRQ_EXT_4 (QORIQ_IRQ_EXT_BASE + 4)
261#define QORIQ_IRQ_EXT_5 (QORIQ_IRQ_EXT_BASE + 5)
262#define QORIQ_IRQ_EXT_6 (QORIQ_IRQ_EXT_BASE + 6)
263#define QORIQ_IRQ_EXT_7 (QORIQ_IRQ_EXT_BASE + 7)
264#define QORIQ_IRQ_EXT_8 (QORIQ_IRQ_EXT_BASE + 8)
265#define QORIQ_IRQ_EXT_9 (QORIQ_IRQ_EXT_BASE + 9)
266#define QORIQ_IRQ_EXT_10 (QORIQ_IRQ_EXT_BASE + 10)
267#define QORIQ_IRQ_EXT_11 (QORIQ_IRQ_EXT_BASE + 11)
268
269/** @} */
270
271/**
272 * @defgroup QoriqInterruptIPI QorIQ - Interprocessor Interrupts
273 *
274 * @ingroup QorIQInterrupt
275 *
276 * @brief Interprocessor interrupts.
277 *
278 * @{
279 */
280
281#define QORIQ_IRQ_IPI_BASE (QORIQ_IRQ_EXT_11 + 1)
282#define QORIQ_IRQ_IPI_0 (QORIQ_IRQ_IPI_BASE + 0)
283#define QORIQ_IRQ_IPI_1 (QORIQ_IRQ_IPI_BASE + 1)
284#define QORIQ_IRQ_IPI_2 (QORIQ_IRQ_IPI_BASE + 2)
285#define QORIQ_IRQ_IPI_3 (QORIQ_IRQ_IPI_BASE + 3)
286
287/** @} */
288
289/**
290 * @defgroup QoriqInterruptIPI QorIQ - Message Interrupts
291 *
292 * @ingroup QorIQInterrupt
293 *
294 * @brief Message interrupts.
295 *
296 * @{
297 */
298
299#define QORIQ_IRQ_MI_BASE (QORIQ_IRQ_IPI_3 + 1)
300#define QORIQ_IRQ_MI_0 (QORIQ_IRQ_MI_BASE + 0)
301#define QORIQ_IRQ_MI_1 (QORIQ_IRQ_MI_BASE + 1)
302#define QORIQ_IRQ_MI_2 (QORIQ_IRQ_MI_BASE + 2)
303#define QORIQ_IRQ_MI_3 (QORIQ_IRQ_MI_BASE + 3)
304#define QORIQ_IRQ_MI_4 (QORIQ_IRQ_MI_BASE + 4)
305#define QORIQ_IRQ_MI_5 (QORIQ_IRQ_MI_BASE + 5)
306#define QORIQ_IRQ_MI_6 (QORIQ_IRQ_MI_BASE + 6)
307#define QORIQ_IRQ_MI_7 (QORIQ_IRQ_MI_BASE + 7)
308
309/** @} */
310
311/**
312 * @defgroup QoriqInterruptIPI QorIQ - Shared Message Signaled Interrupts
313 *
314 * @ingroup QorIQInterrupt
315 *
316 * @brief Shared message signaled interrupts.
317 *
318 * @{
319 */
320
321#define QORIQ_IRQ_MSI_BASE (QORIQ_IRQ_MI_7 + 1)
322#define QORIQ_IRQ_MSI_0 (QORIQ_IRQ_MSI_BASE + 0)
323#define QORIQ_IRQ_MSI_1 (QORIQ_IRQ_MSI_BASE + 1)
324#define QORIQ_IRQ_MSI_2 (QORIQ_IRQ_MSI_BASE + 2)
325#define QORIQ_IRQ_MSI_3 (QORIQ_IRQ_MSI_BASE + 3)
326#define QORIQ_IRQ_MSI_4 (QORIQ_IRQ_MSI_BASE + 4)
327#define QORIQ_IRQ_MSI_5 (QORIQ_IRQ_MSI_BASE + 5)
328#define QORIQ_IRQ_MSI_6 (QORIQ_IRQ_MSI_BASE + 6)
329#define QORIQ_IRQ_MSI_7 (QORIQ_IRQ_MSI_BASE + 7)
330
331/** @} */
332
333/**
334 * @defgroup QoriqInterruptIPI QorIQ - Global Timer Interrupts
335 *
336 * @ingroup QorIQInterrupt
337 *
338 * @brief Global Timer interrupts.
339 *
340 * @{
341 */
342
343#define QORIQ_IRQ_GT_BASE (QORIQ_IRQ_MSI_7 + 1)
344#define QORIQ_IRQ_GT_A_0 (QORIQ_IRQ_GT_BASE + 0)
345#define QORIQ_IRQ_GT_A_1 (QORIQ_IRQ_GT_BASE + 1)
346#define QORIQ_IRQ_GT_A_2 (QORIQ_IRQ_GT_BASE + 2)
347#define QORIQ_IRQ_GT_A_3 (QORIQ_IRQ_GT_BASE + 3)
348#define QORIQ_IRQ_GT_B_0 (QORIQ_IRQ_GT_BASE + 4)
349#define QORIQ_IRQ_GT_B_1 (QORIQ_IRQ_GT_BASE + 5)
350#define QORIQ_IRQ_GT_B_2 (QORIQ_IRQ_GT_BASE + 6)
351#define QORIQ_IRQ_GT_B_3 (QORIQ_IRQ_GT_BASE + 7)
352
353#define BSP_INTERRUPT_VECTOR_MAX QORIQ_IRQ_GT_B_3
354
355/** @} */
356
357#endif /* QORIQ_IS_HYPERVISOR_GUEST */
358
359/**
360 * @defgroup QorIQInterrupt QorIQ - Interrupt Support
361 *
362 * @ingroup QorIQ
363 *
364 * @brief Interrupt support.
365 *
366 * @{
367 */
368
369#define BSP_INTERRUPT_VECTOR_MIN 0
370
371#define QORIQ_PIC_PRIORITY_LOWEST 1
372#define QORIQ_PIC_PRIORITY_HIGHEST 15
373#define QORIQ_PIC_PRIORITY_DISABLED 0
374#define QORIQ_PIC_PRIORITY_INVALID (QORIQ_PIC_PRIORITY_HIGHEST + 1)
375#define QORIQ_PIC_PRIORITY_DEFAULT (QORIQ_PIC_PRIORITY_LOWEST + 1)
376#define QORIQ_PIC_PRIORITY_IS_VALID(p) \
377  ((p) >= QORIQ_PIC_PRIORITY_DISABLED && (p) <= QORIQ_PIC_PRIORITY_HIGHEST)
378
379rtems_status_code qoriq_pic_set_priority(
380  rtems_vector_number vector,
381  int new_priority,
382  int *old_priority
383);
384
385void bsp_interrupt_set_affinity(
386  rtems_vector_number vector,
387  const Processor_mask *affinity
388);
389
390void bsp_interrupt_get_affinity(
391  rtems_vector_number vector,
392  Processor_mask *affinity
393);
394
395/** @} */
396
397#ifdef __cplusplus
398}
399#endif /* __cplusplus */
400
401#endif /* LIBBSP_POWERPC_QORIQ_IRQ_H */
Note: See TracBrowser for help on using the repository browser.