source: rtems/c/src/lib/libbsp/powerpc/qoriq/include/irq.h @ dc0a7df

4.115
Last change on this file since dc0a7df was dc0a7df, checked in by Sebastian Huber <sebastian.huber@…>, on 07/21/11 at 15:18:02

2011-07-21 Sebastian Huber <sebastian.huber@…>

PR 1799/bsps

  • .cvsignore, ChangeLog?, Makefile.am, README, bsp_specs, configure.ac, clock/clock-config.c, console/console-config.c, console/uart-bridge-master.c, console/uart-bridge-slave.c, include/.cvsignore, include/bsp.h, include/hwreg_vals.h, include/intercom.h, include/irq.h, include/mmu.h, include/qoriq.h, include/tm27.h, include/tsec-config.h, include/u-boot-config.h, include/uart-bridge.h, irq/irq.c, make/custom/qoriq.inc, make/custom/qoriq_core_0.cfg, make/custom/qoriq_core_1.cfg, make/custom/qoriq_p1020rdb.cfg, network/if_intercom.c, network/network.c, rtc/rtc-config.c, shmsupp/intercom-mpci.c, shmsupp/intercom.c, shmsupp/lock.S, start/start.S, startup/bsppredriverhook.c, startup/bspreset.c, startup/bspstart.c, startup/linkcmds.base, startup/linkcmds.qoriq_core_0, startup/linkcmds.qoriq_core_1, startup/linkcmds.qoriq_p1020rdb, startup/mmu-config.c, startup/mmu-tlb1.S, startup/mmu.c: New files.
  • Property mode set to 100644
File size: 6.8 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup QorIQInterrupt
5 *
6 * @brief Interrupt API.
7 */
8
9/*
10 * Copyright (c) 2010 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
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.com/license/LICENSE.
21 *
22 * $Id$
23 */
24
25#ifndef LIBBSP_POWERPC_QORIQ_IRQ_H
26#define LIBBSP_POWERPC_QORIQ_IRQ_H
27
28#include <rtems.h>
29#include <rtems/irq.h>
30#include <rtems/irq-extension.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif /* __cplusplus */
35
36/**
37 * @defgroup QoriqInterruptP1020 QorIQ - P1020 Internal Interrupt Sources
38 *
39 * @ingroup QorIQInterrupt
40 *
41 * @brief P1020 internal interrupt sources.
42 *
43 * @{
44 */
45
46#define QORIQ_IRQ_ERROR 0
47#define QORIQ_IRQ_ETSEC_TX_1_GROUP_1 1
48#define QORIQ_IRQ_ETSEC_RX_1_GROUP_1 2
49#define QORIQ_IRQ_ETSEC_ER_1_GROUP_1 8
50#define QORIQ_IRQ_ETSEC_TX_3_GROUP_1 9
51#define QORIQ_IRQ_ETSEC_RX_3_GROUP_1 10
52#define QORIQ_IRQ_ETSEC_ER_3_GROUP_1 11
53#define QORIQ_IRQ_ETSEC_TX_2_GROUP_1 35
54#define QORIQ_IRQ_ETSEC_RX_2_GROUP_1 36
55#define QORIQ_IRQ_TDM 46
56#define QORIQ_IRQ_TDM_ERROR 47
57#define QORIQ_IRQ_ETSEC_ER_2_GROUP_1 51
58
59/** @} */
60
61/**
62 * @defgroup QoriqInterruptP2020 QorIQ - P2020 Internal Interrupt Sources
63 *
64 * @ingroup QorIQInterrupt
65 *
66 * @brief P2020 internal interrupt sources.
67 *
68 * @{
69 */
70
71#define QORIQ_IRQ_L2_CACHE 0
72#define QORIQ_IRQ_ECM 1
73#define QORIQ_IRQ_DDR_CONTROLLER 2
74#define QORIQ_IRQ_PCI_EXPRESS_3 8
75#define QORIQ_IRQ_PCI_EXPRESS_2 9
76#define QORIQ_IRQ_PCI_EXPRESS_1 10
77#define QORIQ_IRQ_SRIO_ERR_WRT_1_2 32
78#define QORIQ_IRQ_SRIO_OUT_DOORBELL_1 33
79#define QORIQ_IRQ_SRIO_IN_DOORBELL_1 34
80#define QORIQ_IRQ_SRIO_OUT_MSG_1 37
81#define QORIQ_IRQ_SRIO_IN_MSG_1 38
82#define QORIQ_IRQ_SRIO_OUT_MSG_2 39
83#define QORIQ_IRQ_SRIO_IN_MSG_2 40
84
85/** @} */
86
87/**
88 * @defgroup QoriqInterruptAll QorIQ - Internal Interrupt Sources
89 *
90 * @ingroup QorIQInterrupt
91 *
92 * @brief Internal interrupt sources.
93 *
94 * @{
95 */
96
97#define QORIQ_IRQ_ELBC 3
98#define QORIQ_IRQ_DMA_CHANNEL_1_1 4
99#define QORIQ_IRQ_DMA_CHANNEL_2_1 5
100#define QORIQ_IRQ_DMA_CHANNEL_3_1 6
101#define QORIQ_IRQ_DMA_CHANNEL_4_1 7
102#define QORIQ_IRQ_USB_1 12
103#define QORIQ_IRQ_ETSEC_TX_1 13
104#define QORIQ_IRQ_ETSEC_RX_1 14
105#define QORIQ_IRQ_ETSEC_TX_3 15
106#define QORIQ_IRQ_ETSEC_RX_3 16
107#define QORIQ_IRQ_ETSEC_ER_3 17
108#define QORIQ_IRQ_ETSEC_ER_1 18
109#define QORIQ_IRQ_ETSEC_TX_2 19
110#define QORIQ_IRQ_ETSEC_RX_2 20
111#define QORIQ_IRQ_ETSEC_ER_2 24
112#define QORIQ_IRQ_DUART 26
113#define QORIQ_IRQ_I2C 27
114#define QORIQ_IRQ_PERFORMANCE_MONITOR 28
115#define QORIQ_IRQ_SECURITY_1 29
116#define QORIQ_IRQ_USB_2 30
117#define QORIQ_IRQ_GPIO 31
118#define QORIQ_IRQ_SECURITY_2 42
119#define QORIQ_IRQ_ESPI 43
120#define QORIQ_IRQ_ETSEC_IEEE_1588_1 52
121#define QORIQ_IRQ_ETSEC_IEEE_1588_2 53
122#define QORIQ_IRQ_ETSEC_IEEE_1588_3 54
123#define QORIQ_IRQ_ESDHC 56
124#define QORIQ_IRQ_DMA_CHANNEL_1_2 60
125#define QORIQ_IRQ_DMA_CHANNEL_2_2 61
126#define QORIQ_IRQ_DMA_CHANNEL_3_2 62
127#define QORIQ_IRQ_DMA_CHANNEL_4_2 63
128
129/** @} */
130
131/**
132 * @defgroup QoriqInterruptExternal QorIQ - External Interrupt Sources
133 *
134 * @ingroup QorIQInterrupt
135 *
136 * @brief External interrupt sources.
137 *
138 * @{
139 */
140
141#define QORIQ_IRQ_EXT_BASE 64
142#define QORIQ_IRQ_EXT_0 (QORIQ_IRQ_EXT_BASE + 0)
143#define QORIQ_IRQ_EXT_1 (QORIQ_IRQ_EXT_BASE + 1)
144#define QORIQ_IRQ_EXT_2 (QORIQ_IRQ_EXT_BASE + 2)
145#define QORIQ_IRQ_EXT_3 (QORIQ_IRQ_EXT_BASE + 3)
146#define QORIQ_IRQ_EXT_4 (QORIQ_IRQ_EXT_BASE + 4)
147#define QORIQ_IRQ_EXT_5 (QORIQ_IRQ_EXT_BASE + 5)
148#define QORIQ_IRQ_EXT_6 (QORIQ_IRQ_EXT_BASE + 6)
149#define QORIQ_IRQ_EXT_7 (QORIQ_IRQ_EXT_BASE + 7)
150#define QORIQ_IRQ_EXT_8 (QORIQ_IRQ_EXT_BASE + 8)
151#define QORIQ_IRQ_EXT_9 (QORIQ_IRQ_EXT_BASE + 9)
152#define QORIQ_IRQ_EXT_10 (QORIQ_IRQ_EXT_BASE + 10)
153#define QORIQ_IRQ_EXT_11 (QORIQ_IRQ_EXT_BASE + 11)
154
155/** @} */
156
157/**
158 * @defgroup QoriqInterruptIPI QorIQ - Interprocessor Interrupts
159 *
160 * @ingroup QorIQInterrupt
161 *
162 * @brief Interprocessor interrupts.
163 *
164 * @{
165 */
166
167#define QORIQ_IRQ_IPI_BASE (QORIQ_IRQ_EXT_11 + 1)
168#define QORIQ_IRQ_IPI_0 (QORIQ_IRQ_IPI_BASE + 0)
169#define QORIQ_IRQ_IPI_1 (QORIQ_IRQ_IPI_BASE + 1)
170#define QORIQ_IRQ_IPI_2 (QORIQ_IRQ_IPI_BASE + 2)
171#define QORIQ_IRQ_IPI_3 (QORIQ_IRQ_IPI_BASE + 3)
172
173/** @} */
174
175/**
176 * @defgroup QoriqInterruptIPI QorIQ - Message Interrupts
177 *
178 * @ingroup QorIQInterrupt
179 *
180 * @brief Message interrupts.
181 *
182 * @{
183 */
184
185#define QORIQ_IRQ_MI_BASE (QORIQ_IRQ_IPI_3 + 1)
186#define QORIQ_IRQ_MI_0 (QORIQ_IRQ_MI_BASE + 0)
187#define QORIQ_IRQ_MI_1 (QORIQ_IRQ_MI_BASE + 1)
188#define QORIQ_IRQ_MI_2 (QORIQ_IRQ_MI_BASE + 2)
189#define QORIQ_IRQ_MI_3 (QORIQ_IRQ_MI_BASE + 3)
190#define QORIQ_IRQ_MI_4 (QORIQ_IRQ_MI_BASE + 4)
191#define QORIQ_IRQ_MI_5 (QORIQ_IRQ_MI_BASE + 5)
192#define QORIQ_IRQ_MI_6 (QORIQ_IRQ_MI_BASE + 6)
193#define QORIQ_IRQ_MI_7 (QORIQ_IRQ_MI_BASE + 7)
194
195/** @} */
196
197/**
198 * @defgroup QoriqInterruptIPI QorIQ - Shared Message Signaled Interrupts
199 *
200 * @ingroup QorIQInterrupt
201 *
202 * @brief Shared message signaled interrupts.
203 *
204 * @{
205 */
206
207#define QORIQ_IRQ_MSI_BASE (QORIQ_IRQ_MI_7 + 1)
208#define QORIQ_IRQ_MSI_0 (QORIQ_IRQ_MSI_BASE + 0)
209#define QORIQ_IRQ_MSI_1 (QORIQ_IRQ_MSI_BASE + 1)
210#define QORIQ_IRQ_MSI_2 (QORIQ_IRQ_MSI_BASE + 2)
211#define QORIQ_IRQ_MSI_3 (QORIQ_IRQ_MSI_BASE + 3)
212#define QORIQ_IRQ_MSI_4 (QORIQ_IRQ_MSI_BASE + 4)
213#define QORIQ_IRQ_MSI_5 (QORIQ_IRQ_MSI_BASE + 5)
214#define QORIQ_IRQ_MSI_6 (QORIQ_IRQ_MSI_BASE + 6)
215#define QORIQ_IRQ_MSI_7 (QORIQ_IRQ_MSI_BASE + 7)
216
217/** @} */
218
219/**
220 * @defgroup QoriqInterruptIPI QorIQ - Global Timer Interrupts
221 *
222 * @ingroup QorIQInterrupt
223 *
224 * @brief Global Timer interrupts.
225 *
226 * @{
227 */
228
229#define QORIQ_IRQ_GT_BASE (QORIQ_IRQ_MSI_7 + 1)
230#define QORIQ_IRQ_GT_A_0 (QORIQ_IRQ_GT_BASE + 0)
231#define QORIQ_IRQ_GT_A_1 (QORIQ_IRQ_GT_BASE + 1)
232#define QORIQ_IRQ_GT_A_2 (QORIQ_IRQ_GT_BASE + 2)
233#define QORIQ_IRQ_GT_A_3 (QORIQ_IRQ_GT_BASE + 3)
234#define QORIQ_IRQ_GT_B_0 (QORIQ_IRQ_GT_BASE + 4)
235#define QORIQ_IRQ_GT_B_1 (QORIQ_IRQ_GT_BASE + 5)
236#define QORIQ_IRQ_GT_B_2 (QORIQ_IRQ_GT_BASE + 6)
237#define QORIQ_IRQ_GT_B_3 (QORIQ_IRQ_GT_BASE + 7)
238
239/** @} */
240
241/**
242 * @defgroup QorIQInterrupt QorIQ - Interrupt Support
243 *
244 * @ingroup QorIQ
245 *
246 * @brief Interrupt support.
247 *
248 * @{
249 */
250
251#define BSP_INTERRUPT_VECTOR_MIN 0
252#define BSP_INTERRUPT_VECTOR_MAX QORIQ_IRQ_GT_B_3
253
254#define QORIQ_PIC_PRIORITY_LOWEST 1
255#define QORIQ_PIC_PRIORITY_HIGHEST 15
256#define QORIQ_PIC_PRIORITY_DISABLED 0
257#define QORIQ_PIC_PRIORITY_INVALID (QORIQ_PIC_PRIORITY_HIGHEST + 1)
258#define QORIQ_PIC_PRIORITY_DEFAULT (QORIQ_PIC_PRIORITY_LOWEST + 1)
259#define QORIQ_PIC_PRIORITY_IS_VALID(p) \
260  ((p) >= QORIQ_PIC_PRIORITY_DISABLED && (p) <= QORIQ_PIC_PRIORITY_HIGHEST)
261
262rtems_status_code qoriq_pic_set_priority(
263  rtems_vector_number vector,
264  int new_priority,
265  int *old_priority
266);
267
268rtems_status_code qoriq_pic_set_affinity(
269  rtems_vector_number vector,
270  uint32_t processor_index
271);
272
273/** @} */
274
275#ifdef __cplusplus
276}
277#endif /* __cplusplus */
278
279#endif /* LIBBSP_POWERPC_QORIQ_IRQ_H */
Note: See TracBrowser for help on using the repository browser.