1 |
27 |
unneback |
//=============================================================================
|
2 |
|
|
//
|
3 |
|
|
// mod_regs_intc.h
|
4 |
|
|
//
|
5 |
|
|
// INTC (interrupt controller) Module register definitions
|
6 |
|
|
//
|
7 |
|
|
//=============================================================================
|
8 |
|
|
//####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
// -------------------------------------------
|
10 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
|
12 |
|
|
//
|
13 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
14 |
|
|
// the terms of the GNU General Public License as published by the Free
|
15 |
|
|
// Software Foundation; either version 2 or (at your option) any later version.
|
16 |
|
|
//
|
17 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
|
18 |
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
19 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
20 |
|
|
// for more details.
|
21 |
|
|
//
|
22 |
|
|
// You should have received a copy of the GNU General Public License along
|
23 |
|
|
// with eCos; if not, write to the Free Software Foundation, Inc.,
|
24 |
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
25 |
|
|
//
|
26 |
|
|
// As a special exception, if other files instantiate templates or use macros
|
27 |
|
|
// or inline functions from this file, or you compile this file and link it
|
28 |
|
|
// with other works to produce a work based on this file, this file does not
|
29 |
|
|
// by itself cause the resulting work to be covered by the GNU General Public
|
30 |
|
|
// License. However the source code for this file must still be made available
|
31 |
|
|
// in accordance with section (3) of the GNU General Public License.
|
32 |
|
|
//
|
33 |
|
|
// This exception does not invalidate any other reasons why a work based on
|
34 |
|
|
// this file might be covered by the GNU General Public License.
|
35 |
|
|
//
|
36 |
|
|
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
|
37 |
|
|
// at http://sources.redhat.com/ecos/ecos-license/
|
38 |
|
|
// -------------------------------------------
|
39 |
|
|
//####ECOSGPLCOPYRIGHTEND####
|
40 |
|
|
//=============================================================================
|
41 |
|
|
//#####DESCRIPTIONBEGIN####
|
42 |
|
|
//
|
43 |
|
|
// Author(s): jskov
|
44 |
|
|
// Contributors:jskov
|
45 |
|
|
// Date: 2000-10-30
|
46 |
|
|
//
|
47 |
|
|
//####DESCRIPTIONEND####
|
48 |
|
|
//
|
49 |
|
|
//=============================================================================
|
50 |
|
|
|
51 |
|
|
//--------------------------------------------------------------------------
|
52 |
|
|
// Interrupt registers, module type 1
|
53 |
|
|
#define CYGARC_REG_EXCEVT 0xffffffd4
|
54 |
|
|
#define CYGARC_REG_INTEVT 0xffffffd8
|
55 |
|
|
|
56 |
|
|
#define CYGARC_REG_ICR 0xfffffee0
|
57 |
|
|
#define CYGARC_REG_IPRA 0xfffffee2
|
58 |
|
|
#define CYGARC_REG_IPRB 0xfffffee4
|
59 |
|
|
|
60 |
|
|
#define CYGARC_REG_IPRA_TMU0_MASK 0xf000
|
61 |
|
|
#define CYGARC_REG_IPRA_TMU0_PRI1 0x1000
|
62 |
|
|
#define CYGARC_REG_IPRA_TMU1_MASK 0x0f00
|
63 |
|
|
#define CYGARC_REG_IPRA_TMU1_PRI1 0x0100
|
64 |
|
|
#define CYGARC_REG_IPRA_TMU2_MASK 0x00f0
|
65 |
|
|
#define CYGARC_REG_IPRA_TMU2_PRI1 0x0010
|
66 |
|
|
#define CYGARC_REG_IPRA_RTC_MASK 0x000f
|
67 |
|
|
#define CYGARC_REG_IPRA_RTC_PRI1 0x0001
|
68 |
|
|
|
69 |
|
|
#define CYGARC_REG_IPRB_WDT_MASK 0xf000
|
70 |
|
|
#define CYGARC_REG_IPRB_WDT_PRI1 0x1000
|
71 |
|
|
#define CYGARC_REG_IPRB_REF_MASK 0x0f00
|
72 |
|
|
#define CYGARC_REG_IPRB_REF_PRI1 0x0100
|
73 |
|
|
#define CYGARC_REG_IPRB_SCI_MASK 0x00f0
|
74 |
|
|
#define CYGARC_REG_IPRB_SCI_PRI1 0x0010
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
#if (CYGARC_SH_MOD_INTC >= 2)
|
78 |
|
|
# define CYGARC_REG_INTEVT2 0xa4000000
|
79 |
|
|
# define CYGARC_REG_IRR0 0xa4000004
|
80 |
|
|
# define CYGARC_REG_IRR1 0xa4000006
|
81 |
|
|
# define CYGARC_REG_IRR2 0xa4000008
|
82 |
|
|
# define CYGARC_REG_ICR0 CYGARC_REG_ICR
|
83 |
|
|
# define CYGARC_REG_ICR1 0xa4000010
|
84 |
|
|
# define CYGARC_REG_ICR2 0xa4000012
|
85 |
|
|
# define CYGARC_REG_INTER 0xa4000014
|
86 |
|
|
# define CYGARC_REG_IPRC 0xa4000016
|
87 |
|
|
# define CYGARC_REG_IPRD 0xa4000018
|
88 |
|
|
# define CYGARC_REG_IPRE 0xa400001a
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
#define CYGARC_REG_IPRC_IRQ3_MASK 0xf000
|
92 |
|
|
#define CYGARC_REG_IPRC_IRQ3_PRI1 0x1000
|
93 |
|
|
#define CYGARC_REG_IPRC_IRQ2_MASK 0x0f00
|
94 |
|
|
#define CYGARC_REG_IPRC_IRQ2_PRI1 0x0100
|
95 |
|
|
#define CYGARC_REG_IPRC_IRQ1_MASK 0x00f0
|
96 |
|
|
#define CYGARC_REG_IPRC_IRQ1_PRI1 0x0010
|
97 |
|
|
#define CYGARC_REG_IPRC_IRQ0_MASK 0x000f
|
98 |
|
|
#define CYGARC_REG_IPRC_IRQ0_PRI1 0x0001
|
99 |
|
|
|
100 |
|
|
#define CYGARC_REG_IPRD_PINT07_MASK 0xf000
|
101 |
|
|
#define CYGARC_REG_IPRD_PINT07_PRI1 0x1000
|
102 |
|
|
#define CYGARC_REG_IPRD_PINT8F_MASK 0x0f00
|
103 |
|
|
#define CYGARC_REG_IPRD_PINT8F_PRI1 0x0100
|
104 |
|
|
#define CYGARC_REG_IPRD_IRQ5_MASK 0x00f0
|
105 |
|
|
#define CYGARC_REG_IPRD_IRQ5_PRI1 0x0010
|
106 |
|
|
#define CYGARC_REG_IPRD_IRQ4_MASK 0x000f
|
107 |
|
|
#define CYGARC_REG_IPRD_IRQ4_PRI1 0x0001
|
108 |
|
|
|
109 |
|
|
#define CYGARC_REG_IPRE_DMAC_MASK 0xf000
|
110 |
|
|
#define CYGARC_REG_IPRE_DMAC_PRI1 0x1000
|
111 |
|
|
#define CYGARC_REG_IPRE_IRDA_MASK 0x0f00
|
112 |
|
|
#define CYGARC_REG_IPRE_IRDA_PRI1 0x0100
|
113 |
|
|
#define CYGARC_REG_IPRE_SCIF_MASK 0x00f0
|
114 |
|
|
#define CYGARC_REG_IPRE_SCIF_PRI1 0x0010
|
115 |
|
|
#define CYGARC_REG_IPRE_ADC_MASK 0x000f
|
116 |
|
|
#define CYGARC_REG_IPRE_ADC_PRI1 0x0001
|
117 |
|
|
|
118 |
|
|
#define CYGARC_REG_ICR1_MAI 0x8000
|
119 |
|
|
#define CYGARC_REG_ICR1_IRQLVL 0x4000
|
120 |
|
|
#define CYGARC_REG_ICR1_BLMSK 0x2000
|
121 |
|
|
#define CYGARC_REG_ICR1_IRLSEN 0x1000
|
122 |
|
|
#define CYGARC_REG_ICR1_SENSE_IRQ5_shift 10
|
123 |
|
|
#define CYGARC_REG_ICR1_SENSE_IRQ4_shift 8
|
124 |
|
|
#define CYGARC_REG_ICR1_SENSE_IRQ3_shift 6
|
125 |
|
|
#define CYGARC_REG_ICR1_SENSE_IRQ2_shift 4
|
126 |
|
|
#define CYGARC_REG_ICR1_SENSE_IRQ1_shift 2
|
127 |
|
|
#define CYGARC_REG_ICR1_SENSE_IRQ0_shift 0
|
128 |
|
|
#define CYGARC_REG_ICR1_SENSE_LEVEL 0x2
|
129 |
|
|
#define CYGARC_REG_ICR1_SENSE_UP 0x1
|
130 |
|
|
|
131 |
|
|
// The (initial) IRQ mode is controlled by configuration.
|
132 |
|
|
#ifdef CYGHWR_HAL_SH_IRQ_USE_IRQLVL
|
133 |
|
|
# ifdef CYGHWR_HAL_SH_IRQ_ENABLE_IRLS_INTERRUPTS
|
134 |
|
|
# define CYGARC_REG_ICR1_INIT (CYGARC_REG_ICR1_IRLSEN|CYGARC_REG_ICR1_IRQLVL)
|
135 |
|
|
# else
|
136 |
|
|
# define CYGARC_REG_ICR1_INIT (CYGARC_REG_ICR1_IRQLVL)
|
137 |
|
|
# endif
|
138 |
|
|
#else
|
139 |
|
|
# define CYGARC_REG_ICR1_INIT 0x0000
|
140 |
|
|
#endif
|
141 |
|
|
|
142 |
|
|
#define CYGARC_REG_IRR0_PINT07 0x80
|
143 |
|
|
#define CYGARC_REG_IRR0_PINT8F 0x40
|
144 |
|
|
#define CYGARC_REG_IRR0_IRQ5 0x20
|
145 |
|
|
#define CYGARC_REG_IRR0_IRQ4 0x10
|
146 |
|
|
#define CYGARC_REG_IRR0_IRQ3 0x08
|
147 |
|
|
#define CYGARC_REG_IRR0_IRQ2 0x04
|
148 |
|
|
#define CYGARC_REG_IRR0_IRQ1 0x02
|
149 |
|
|
#define CYGARC_REG_IRR0_IRQ0 0x01
|
150 |
|
|
|
151 |
|
|
#endif
|
152 |
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
|
|
#if (CYGARC_SH_MOD_INTC >= 3)
|
156 |
|
|
# define CYGARC_REG_IRR3 0xa400000a
|
157 |
|
|
# define CYGARC_REG_IRR4 0xa400000c
|
158 |
|
|
# define CYGARC_REG_IPRF 0xa400001c
|
159 |
|
|
|
160 |
|
|
#define CYGARC_REG_IPRF_LCDI_MASK 0x0f00
|
161 |
|
|
#define CYGARC_REG_IPRF_LCDI_PRI1 0x0100
|
162 |
|
|
#define CYGARC_REG_IPRF_PCC0_MASK 0x00f0
|
163 |
|
|
#define CYGARC_REG_IPRF_PCC0_PRI1 0x0010
|
164 |
|
|
#define CYGARC_REG_IPRF_PCC1_MASK 0x000f
|
165 |
|
|
#define CYGARC_REG_IPRF_PCC1_PRI1 0x0001
|
166 |
|
|
|
167 |
|
|
#endif
|