source: rtems/c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.h @ 0c875c6a

4.115
Last change on this file since 0c875c6a was 0c875c6a, checked in by Joel Sherrill <joel.sherrill@…>, on 01/28/11 at 20:29:53

2011-01-28 Joel Sherrill <joel.sherrilL@…>

  • beatnik/include/bsp.h, beatnik/irq/irq.h, beatnik/pci/gt_pci_init.c, ep1a/console/polled_io.c, ep1a/irq/openpic_xxx_irq.c, gen5200/include/irq.h, gen5200/irq/irq.c, gen5200/startup/bspstart.c, haleakala/irq/irq.c, mbx8xx/irq/irq.c, mbx8xx/irq/irq.h, motorola_powerpc/include/bsp.h, mpc8260ads/irq/irq.c, mpc8260ads/irq/irq.h, mvme3100/include/bsp.h, mvme3100/irq/irq.h, mvme3100/start/start.S, mvme5500/include/bsp.h, mvme5500/irq/irq.h, psim/include/bsp.h, psim/include/coverhd.h, psim/irq/irq.h, psim/shmsupp/addrconv.c, psim/shmsupp/getcfg.c, psim/startup/linkcmds, psim/tools/psim-gdb-top.in, psim/tools/psim-top.in, psim/tools/runtest-top.in, qemuppc/irq/irq.h, score603e/irq/irq.c, shared/bootloader/bootldr.h, shared/bootloader/em86.c, shared/bootloader/em86real.S, shared/bootloader/exception.S, shared/bootloader/head.S, shared/bootloader/lib.c, shared/bootloader/misc.c, shared/bootloader/mm.c, shared/bootloader/pci.c, shared/console/console.c, shared/console/consoleIo.h, shared/console/inch.c, shared/console/keyboard.h, shared/console/polled_io.c, shared/irq/i8259.c, shared/irq/irq.h, shared/irq/openpic_i8259_irq.c, shared/motorola/motorola.c, shared/motorola/motorola.h, shared/openpic/openpic.c, shared/openpic/openpic.h, shared/pci/pci.c, shared/residual/residual.c, shared/start/start.S, ss555/irq/irq.h: Fix typo where license said found in found in.
  • Property mode set to 100644
File size: 7.2 KB
Line 
1/* irq.h
2 *
3 *  This include file describe the data structure and the functions implemented
4 *  by rtems to write interrupt handlers.
5 *
6 *  CopyRight (C) 1999 valette@crf.canon.fr
7 *
8 *  This code is heavilly inspired by the public specification of STREAM V2
9 *  that can be found at :
10 *
11 *      <http://www.chorus.com/Documentation/index.html> by following
12 *  the STREAM API Specification Document link.
13 *
14 *  Modified for mpc8260 by Andy Dachs <a.dachs@sstl.co.uk>
15 *  Surrey Satellite Technology Limited
16 *    The interrupt handling on the mpc8260 seems quite different from
17 *    the 860 (I don't know the 860 well).  Although some interrupts
18 *    are routed via the CPM irq and some are direct to the SIU they all
19 *    appear logically the same.  Therefore I removed the distinction
20 *    between SIU and CPM interrupts.
21 *
22 *  The license and distribution terms for this file may be
23 *  found in the file LICENSE in this distribution or at
24 *  http://www.rtems.com/license/LICENSE.
25 *
26 *  $Id$
27 */
28
29#ifndef LIBBSP_POWERPC_IRQ_H
30#define LIBBSP_POWERPC_IRQ_H
31#include <rtems/irq.h>
32
33#ifndef ASM
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/*
40extern volatile unsigned int ppc_cached_irq_mask;
41*/
42
43/*
44 * Symblolic IRQ names and related definitions.
45 */
46
47  /*
48   * CPM IRQ handlers related definitions
49   * CAUTION : BSP_CPM_IRQ_LOWEST_OFFSET should be equal to OPENPIC_VEC_SOURCE
50   */
51#define BSP_CPM_IRQ_NUMBER              (64)
52#define BSP_CPM_IRQ_LOWEST_OFFSET       (0)
53#define BSP_CPM_IRQ_MAX_OFFSET          (BSP_CPM_IRQ_LOWEST_OFFSET + BSP_CPM_IRQ_NUMBER - 1)
54  /*
55   * PowerPc exceptions handled as interrupt where a rtems managed interrupt
56   * handler might be connected
57   */
58#define BSP_PROCESSOR_IRQ_NUMBER        (1)
59#define BSP_PROCESSOR_IRQ_LOWEST_OFFSET (BSP_CPM_IRQ_MAX_OFFSET + 1)
60#define BSP_PROCESSOR_IRQ_MAX_OFFSET    (BSP_PROCESSOR_IRQ_LOWEST_OFFSET + BSP_PROCESSOR_IRQ_NUMBER - 1)
61  /*
62   * Summary
63   */
64#define BSP_IRQ_NUMBER                  (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
65#define BSP_LOWEST_OFFSET               (BSP_CPM_IRQ_LOWEST_OFFSET)
66#define BSP_MAX_OFFSET                  (BSP_PROCESSOR_IRQ_MAX_OFFSET)
67
68  /*
69   * Some SIU IRQ symbolic name definition. Please note that
70   * INT IRQ are defined but a single one will be used to
71   * redirect all CPM interrupt.
72   *
73   * On the mpc8260 all this seems to be transparent.  Although the
74   * CPM, PIT and TMCNT interrupt may well be the only interrupts routed
75   * to the SIU at the hardware level all of them appear as CPM interupts
76   * to software apart from the registers for setting priority.
77   *
78   * The MPC8260 User Manual seems shot through with inconsistencies
79   * about this whole area.
80   */
81
82  /*
83   * Some CPM IRQ symbolic name definition
84   */
85#define BSP_CPM_IRQ_ERROR               (BSP_CPM_IRQ_LOWEST_OFFSET + 0)
86#define BSP_CPM_IRQ_I2C                 (BSP_CPM_IRQ_LOWEST_OFFSET + 1)
87#define BSP_CPM_IRQ_SPI                 (BSP_CPM_IRQ_LOWEST_OFFSET + 2)
88#define BSP_CPM_IRQ_RISC_TIMERS         (BSP_CPM_IRQ_LOWEST_OFFSET + 3)
89#define BSP_CPM_IRQ_SMC1                (BSP_CPM_IRQ_LOWEST_OFFSET + 4)
90#define BSP_CPM_IRQ_SMC2                (BSP_CPM_IRQ_LOWEST_OFFSET + 5)
91#define BSP_CPM_IRQ_IDMA1               (BSP_CPM_IRQ_LOWEST_OFFSET + 6)
92#define BSP_CPM_IRQ_IDMA2               (BSP_CPM_IRQ_LOWEST_OFFSET + 7)
93#define BSP_CPM_IRQ_IDMA3               (BSP_CPM_IRQ_LOWEST_OFFSET + 8)
94#define BSP_CPM_IRQ_IDMA4               (BSP_CPM_IRQ_LOWEST_OFFSET + 9)
95#define BSP_CPM_IRQ_SDMA                (BSP_CPM_IRQ_LOWEST_OFFSET + 10)
96
97#define BSP_CPM_IRQ_TIMER_1             (BSP_CPM_IRQ_LOWEST_OFFSET + 12)
98#define BSP_CPM_IRQ_TIMER_2             (BSP_CPM_IRQ_LOWEST_OFFSET + 13)
99#define BSP_CPM_IRQ_TIMER_3             (BSP_CPM_IRQ_LOWEST_OFFSET + 14)
100#define BSP_CPM_IRQ_TIMER_4             (BSP_CPM_IRQ_LOWEST_OFFSET + 15)
101#define BSP_CPM_IRQ_TMCNT               (BSP_CPM_IRQ_LOWEST_OFFSET + 16)
102#define BSP_CPM_IRQ_PIT                 (BSP_CPM_IRQ_LOWEST_OFFSET + 17)
103
104#define BSP_CPM_IRQ_IRQ1                (BSP_CPM_IRQ_LOWEST_OFFSET + 19)
105#define BSP_CPM_IRQ_IRQ2                (BSP_CPM_IRQ_LOWEST_OFFSET + 20)
106#define BSP_CPM_IRQ_IRQ3                (BSP_CPM_IRQ_LOWEST_OFFSET + 21)
107#define BSP_CPM_IRQ_IRQ4                (BSP_CPM_IRQ_LOWEST_OFFSET + 22)
108#define BSP_CPM_IRQ_IRQ5                (BSP_CPM_IRQ_LOWEST_OFFSET + 23)
109#define BSP_CPM_IRQ_IRQ6                (BSP_CPM_IRQ_LOWEST_OFFSET + 24)
110#define BSP_CPM_IRQ_IRQ7                (BSP_CPM_IRQ_LOWEST_OFFSET + 25)
111
112#define BSP_CPM_IRQ_FCC1                (BSP_CPM_IRQ_LOWEST_OFFSET + 32)
113#define BSP_CPM_IRQ_FCC2                (BSP_CPM_IRQ_LOWEST_OFFSET + 33)
114#define BSP_CPM_IRQ_FCC3                (BSP_CPM_IRQ_LOWEST_OFFSET + 34)
115#define BSP_CPM_IRQ_MCC1                (BSP_CPM_IRQ_LOWEST_OFFSET + 36)
116#define BSP_CPM_IRQ_MCC2                (BSP_CPM_IRQ_LOWEST_OFFSET + 37)
117
118#define BSP_CPM_IRQ_SCC1                (BSP_CPM_IRQ_LOWEST_OFFSET + 40)
119#define BSP_CPM_IRQ_SCC2                (BSP_CPM_IRQ_LOWEST_OFFSET + 41)
120#define BSP_CPM_IRQ_SCC3                (BSP_CPM_IRQ_LOWEST_OFFSET + 42)
121#define BSP_CPM_IRQ_SCC4                (BSP_CPM_IRQ_LOWEST_OFFSET + 43)
122
123#define BSP_CPM_IRQ_PC15                (BSP_CPM_IRQ_LOWEST_OFFSET + 48)
124#define BSP_CPM_IRQ_PC14                (BSP_CPM_IRQ_LOWEST_OFFSET + 49)
125#define BSP_CPM_IRQ_PC13                (BSP_CPM_IRQ_LOWEST_OFFSET + 50)
126#define BSP_CPM_IRQ_PC12                (BSP_CPM_IRQ_LOWEST_OFFSET + 51)
127#define BSP_CPM_IRQ_PC11                (BSP_CPM_IRQ_LOWEST_OFFSET + 52)
128#define BSP_CPM_IRQ_PC10                (BSP_CPM_IRQ_LOWEST_OFFSET + 53)
129#define BSP_CPM_IRQ_PC9                 (BSP_CPM_IRQ_LOWEST_OFFSET + 54)
130#define BSP_CPM_IRQ_PC8                 (BSP_CPM_IRQ_LOWEST_OFFSET + 55)
131#define BSP_CPM_IRQ_PC7                 (BSP_CPM_IRQ_LOWEST_OFFSET + 56)
132#define BSP_CPM_IRQ_PC6                 (BSP_CPM_IRQ_LOWEST_OFFSET + 57)
133#define BSP_CPM_IRQ_PC5                 (BSP_CPM_IRQ_LOWEST_OFFSET + 58)
134#define BSP_CPM_IRQ_PC4                 (BSP_CPM_IRQ_LOWEST_OFFSET + 59)
135#define BSP_CPM_IRQ_PC3                 (BSP_CPM_IRQ_LOWEST_OFFSET + 60)
136#define BSP_CPM_IRQ_PC2                 (BSP_CPM_IRQ_LOWEST_OFFSET + 61)
137#define BSP_CPM_IRQ_PC1                 (BSP_CPM_IRQ_LOWEST_OFFSET + 62)
138#define BSP_CPM_IRQ_PC0                 (BSP_CPM_IRQ_LOWEST_OFFSET + 63)
139
140    /*
141     * Some Processor exception handled as rtems IRQ symbolic name definition
142     */
143#define BSP_DECREMENTER                 (BSP_PROCESSOR_IRQ_LOWEST_OFFSET)
144#define BSP_PERIODIC_TIMER              (BSP_DECREMENTER)
145
146#define BSP_INTERRUPT_VECTOR_MIN BSP_LOWEST_OFFSET
147
148#define BSP_INTERRUPT_VECTOR_MAX BSP_MAX_OFFSET
149
150#define CPM_INTERRUPT
151
152/*-------------------------------------------------------------------------+
153| Function Prototypes.
154+--------------------------------------------------------------------------*/
155/*
156 * ------------------------ PPC CPM Mngt Routines -------
157 */
158
159/*
160 * function to disable a particular irq. After calling
161 * this function, even if the device asserts the interrupt line it will
162 * not be propagated further to the processor
163 */
164int BSP_irq_disable_at_cpm        (const rtems_irq_number irqLine);
165/*
166 * function to enable a particular irq. After calling
167 * this function, if the device asserts the interrupt line it will
168 * be propagated further to the processor
169 */
170int BSP_irq_enable_at_cpm               (const rtems_irq_number irqLine);
171/*
172 * function to acknoledge a particular irq. After calling
173 * this function, if a device asserts an enabled interrupt line it will
174 * be propagated further to the processor. Mainly usefull for people
175 * writting raw handlers as this is automagically done for rtems managed
176 * handlers.
177 */
178int BSP_irq_ack_at_cpm                  (const rtems_irq_number irqLine);
179/*
180 * function to check if a particular irq is enabled. After calling
181 */
182int BSP_irq_enabled_at_cpm      (const rtems_irq_number irqLine);
183
184extern void BSP_rtems_irq_mng_init(unsigned cpuId);
185
186#ifdef __cplusplus
187}
188#endif
189
190/* Now that we have defined some basics, include the generic support */
191#include <bsp/irq-generic.h>
192
193#endif
194
195#endif
Note: See TracBrowser for help on using the repository browser.