hd64461pcmciareg.h revision 1.1 1 1.1 uch /* $NetBSD: hd64461pcmciareg.h,v 1.1 2001/02/21 15:39:09 uch Exp $ */
2 1.1 uch
3 1.1 uch /*-
4 1.1 uch * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 1.1 uch * All rights reserved.
6 1.1 uch *
7 1.1 uch * This code is derived from software contributed to The NetBSD Foundation
8 1.1 uch * by UCHIYAMA Yasushi.
9 1.1 uch *
10 1.1 uch * Redistribution and use in source and binary forms, with or without
11 1.1 uch * modification, are permitted provided that the following conditions
12 1.1 uch * are met:
13 1.1 uch * 1. Redistributions of source code must retain the above copyright
14 1.1 uch * notice, this list of conditions and the following disclaimer.
15 1.1 uch * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 uch * notice, this list of conditions and the following disclaimer in the
17 1.1 uch * documentation and/or other materials provided with the distribution.
18 1.1 uch * 3. All advertising materials mentioning features or use of this software
19 1.1 uch * must display the following acknowledgement:
20 1.1 uch * This product includes software developed by the NetBSD
21 1.1 uch * Foundation, Inc. and its contributors.
22 1.1 uch * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.1 uch * contributors may be used to endorse or promote products derived
24 1.1 uch * from this software without specific prior written permission.
25 1.1 uch *
26 1.1 uch * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.1 uch * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.1 uch * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.1 uch * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.1 uch * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.1 uch * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.1 uch * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.1 uch * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.1 uch * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.1 uch * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.1 uch * POSSIBILITY OF SUCH DAMAGE.
37 1.1 uch */
38 1.1 uch
39 1.1 uch /*
40 1.1 uch * PCC0 SH7709 Area 6 (memory and I/O card)
41 1.1 uch */
42 1.1 uch /* PCC0 Interface Status Register (R) */
43 1.1 uch #define HD64461_PCC0ISR_REG8 0xb0002000
44 1.1 uch #define HD64461_PCC0ISR_P0READY HD64461_PCCISR_READY
45 1.1 uch #define HD64461_PCC0ISR_IREQ HD64461_PCCISR_READY
46 1.1 uch #define HD64461_PCC0ISR_P0MWP HD64461_PCCISR_MWP
47 1.1 uch #define HD64461_PCC0ISR_P0VS2 HD64461_PCCISR_VS2
48 1.1 uch #define HD64461_PCC0ISR_P0VS1 HD64461_PCCISR_VS1
49 1.1 uch #define HD64461_PCC0ISR_P0CD2 HD64461_PCCISR_CD2
50 1.1 uch #define HD64461_PCC0ISR_P0CD1 HD64461_PCCISR_CD1
51 1.1 uch #define HD64461_PCC0ISR_P0BVD2 HD64461_PCCISR_BVD2
52 1.1 uch #define HD64461_PCC0ISR_SPKR0 HD64461_PCCISR_BVD2
53 1.1 uch #define HD64461_PCC0ISR_P0BVD1 HD64461_PCCISR_BVD1
54 1.1 uch #define HD64461_PCC0ISR_STSCHG0 HD64461_PCCISR_BVD1
55 1.1 uch
56 1.1 uch /* PCC0 General Contorol Register (R/W) */
57 1.1 uch #define HD64461_PCC0GCR_REG8 0xb0002002
58 1.1 uch #define HD64461_PCC0GCR_P0DRVE HD64461_PCCGCR_DRVE
59 1.1 uch #define HD64461_PCC0GCR_P0PCCR HD64461_PCCGCR_PCCR
60 1.1 uch #define HD64461_PCC0GCR_P0PCCT 0x20
61 1.1 uch #define HD64461_PCC0GCR_P0VCC0 HD64461_PCCGCR_VCC0
62 1.1 uch #define HD64461_PCC0GCR_P0MMOD HD64461_PCCGCR_MMOD
63 1.1 uch #define HD64461_PCC0GCR_P0MMOD_16M HD64461_PCCGCR_MMOD_16M
64 1.1 uch #define HD64461_PCC0GCR_P0MMOD_32M HD64461_PCCGCR_MMOD_32M
65 1.1 uch /* these bits meaning different for P0MMOD mode */
66 1.1 uch #define HD64461_PCC0GCR_P0PA25 HD64461_PCCGCR_PA25
67 1.1 uch #define HD64461_PCC0GCR_P0PA24 HD64461_PCCGCR_PA24
68 1.1 uch #define HD64461_PCC0GCR_P0REG HD64461_PCCGCR_PREG
69 1.1 uch
70 1.1 uch /* PCC0 Card Status Change Register (R/W) */
71 1.1 uch #define HD64461_PCC0CSCR_REG8 0xb0002004
72 1.1 uch #define HD64461_PCC0CSCR_P0SCDI HD64461_PCCCSCR_SCDI
73 1.1 uch #define HD64461_PCC0CSCR_P0IREQ 0x20
74 1.1 uch #define HD64461_PCC0CSCR_P0SC 0x10
75 1.1 uch #define HD64461_PCC0CSCR_P0CDC HD64461_PCCCSCR_CDC
76 1.1 uch #define HD64461_PCC0CSCR_P0RC HD64461_PCCCSCR_RC
77 1.1 uch #define HD64461_PCC0CSCR_P0BW HD64461_PCCCSCR_BW
78 1.1 uch #define HD64461_PCC0CSCR_P0BD HD64461_PCCCSCR_BD
79 1.1 uch
80 1.1 uch /* PCC0 Card Status Change Interrupt Enable Register (R/W) */
81 1.1 uch #define HD64461_PCC0CSCIER_REG8 0xb0002006
82 1.1 uch #define HD64461_PCC0CSCIER_P0CRE HD64461_PCCCSCIER_CRE
83 1.1 uch
84 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_MASK 0x60
85 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_NONE 0x00
86 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_LEVEL 0x20
87 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_FEDGE 0x40
88 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_REDGE 0x60
89 1.1 uch
90 1.1 uch #define HD64461_PCC0CSCIER_P0SCE 0x10
91 1.1 uch #define HD64461_PCC0CSCIER_P0CDE HD64461_PCCCSCIER_CDE
92 1.1 uch #define HD64461_PCC0CSCIER_P0RE HD64461_PCCCSCIER_RE
93 1.1 uch #define HD64461_PCC0CSCIER_P0BWE HD64461_PCCCSCIER_BWE
94 1.1 uch #define HD64461_PCC0CSCIER_P0BDE HD64461_PCCCSCIER_BDE
95 1.1 uch
96 1.1 uch /* PCC0 Software Control Register (R/W) */
97 1.1 uch #define HD64461_PCC0SCR_REG8 0xb0002008
98 1.1 uch #define HD64461_PCC0SCR_P0VCC1 HD64461_PCCSCR_VCC1
99 1.1 uch #define HD64461_PCC0SCR_P0SWP HD64461_PCCSCR_SWP
100 1.1 uch
101 1.1 uch /*
102 1.1 uch * PCC1 SH7709 Area 5 (memory card only)
103 1.1 uch */
104 1.1 uch /* PCC1 Interface Status Register (R) */
105 1.1 uch #define HD64461_PCC1ISR_REG8 0xb0002010
106 1.1 uch #define HD64461_PCC1ISR_P1READY HD64461_PCCISR_READY
107 1.1 uch #define HD64461_PCC1ISR_P1MWP HD64461_PCCISR_MWP
108 1.1 uch #define HD64461_PCC1ISR_P1VS2 HD64461_PCCISR_VS2
109 1.1 uch #define HD64461_PCC1ISR_P1VS1 HD64461_PCCISR_VS1
110 1.1 uch #define HD64461_PCC1ISR_P1CD2 HD64461_PCCISR_CD2
111 1.1 uch #define HD64461_PCC1ISR_P1CD1 HD64461_PCCISR_CD1
112 1.1 uch #define HD64461_PCC1ISR_P1BVD2 HD64461_PCCISR_BVD2
113 1.1 uch #define HD64461_PCC1ISR_P1BVD1 HD64461_PCCISR_BVD1
114 1.1 uch
115 1.1 uch /* PCC1 General Contorol Register (R/W) */
116 1.1 uch #define HD64461_PCC1GCR_REG8 0xb0002012
117 1.1 uch #define HD64461_PCC1GCR_P1DRVE HD64461_PCCGCR_DRVE
118 1.1 uch #define HD64461_PCC1GCR_P1PCCR HD64461_PCCGCR_PCCR
119 1.1 uch #define HD64461_PCC1GCR_P1VCC0 HD64461_PCCGCR_VCC0
120 1.1 uch #define HD64461_PCC1GCR_P1MMOD HD64461_PCCGCR_MMOD
121 1.1 uch #define HD64461_PCC1GCR_P1MMOD_16M HD64461_PCCGCR_MMOD_16M
122 1.1 uch #define HD64461_PCC1GCR_P1MMOD_32M HD64461_PCCGCR_MMOD_32M
123 1.1 uch #define HD64461_PCC1GCR_P1PA25 HD64461_PCCGCR_PA25
124 1.1 uch #define HD64461_PCC1GCR_P1PA24 HD64461_PCCGCR_PA24
125 1.1 uch #define HD64461_PCC1GCR_P1REG HD64461_PCCGCR_PREG
126 1.1 uch
127 1.1 uch /* PCC1 Card Status Change Register (R/W) */
128 1.1 uch #define HD64461_PCC1CSCR_REG8 0xb0002014
129 1.1 uch #define HD64461_PCC1CSCR_P1SCDI HD64461_PCCCSCR_SCDI
130 1.1 uch #define HD64461_PCC1CSCR_P1CDC HD64461_PCCCSCR_CDC
131 1.1 uch #define HD64461_PCC1CSCR_P1RC HD64461_PCCCSCR_RC
132 1.1 uch #define HD64461_PCC1CSCR_P1BW HD64461_PCCCSCR_BW
133 1.1 uch #define HD64461_PCC1CSCR_P1BD HD64461_PCCCSCR_BD
134 1.1 uch
135 1.1 uch /* PCC1 Card Status Change Interrupt Enable Register (R/W) */
136 1.1 uch #define HD64461_PCC1CSCIER_REG8 0xb0002016
137 1.1 uch #define HD64461_PCC1CSCIER_P1CRE HD64461_PCCCSCIER_CRE
138 1.1 uch #define HD64461_PCC1CSCIER_P1CDE HD64461_PCCCSCIER_CDE
139 1.1 uch #define HD64461_PCC1CSCIER_P1RE HD64461_PCCCSCIER_RE
140 1.1 uch #define HD64461_PCC1CSCIER_P1BWE HD64461_PCCCSCIER_BWE
141 1.1 uch #define HD64461_PCC1CSCIER_P1BDE HD64461_PCCCSCIER_BDE
142 1.1 uch
143 1.1 uch /* PCC1 Software Control Register (R/W) */
144 1.1 uch #define HD64461_PCC1SCR_REG8 0xb0002018
145 1.1 uch #define HD64461_PCC1SCR_P1VCC1 HD64461_PCCSCR_VCC1
146 1.1 uch #define HD64461_PCC1SCR_P1SWP HD64461_PCCSCR_SWP
147 1.1 uch
148 1.1 uch /*
149 1.1 uch * General Control
150 1.1 uch */
151 1.1 uch /* PCC0 Output pins Control Register (R/W) */
152 1.1 uch #define HD64461_PCCP0OCR_REG8 0xb000202a
153 1.1 uch #define HD64461_PCCP0OCR_P0DEPLUP 0x80
154 1.1 uch #define HD64461_PCCP0OCR_P0AEPLUP 0x10
155 1.1 uch
156 1.1 uch /* PCC1 Output pins Control Register (R/W) */
157 1.1 uch #define HD64461_PCCP1OCR_REG8 0xb000202c
158 1.1 uch #define HD64461_PCCP1OCR_P1RST8MA 0x08
159 1.1 uch #define HD64461_PCCP1OCR_P1RST4MA 0x04
160 1.1 uch #define HD64461_PCCP1OCR_P1RAS8MA 0x02
161 1.1 uch #define HD64461_PCCP1OCR_P1RAS4MA 0x01
162 1.1 uch
163 1.1 uch /* PC Card General Control Register (R/W) */
164 1.1 uch #define HD64461_PCCPGCR_REG8 0xb000202e
165 1.1 uch #define HD64461_PCCPGCR_PSSDIR 0x02
166 1.1 uch #define HD64461_PCCPGCR_PSSRDWR 0x01
167 1.1 uch
168 1.1 uch /*
169 1.1 uch * common defines.
170 1.1 uch */
171 1.1 uch #define HD64461_PCC0_REGBASE HD64461_PCC0ISR_REG8
172 1.1 uch #define HD64461_PCC1_REGBASE HD64461_PCC1ISR_REG8
173 1.1 uch #define HD64461_PCC_ISR_OFS 0x0
174 1.1 uch #define HD64461_PCC_GCR_OFS 0x2
175 1.1 uch #define HD64461_PCC_CSCR_OFS 0x4
176 1.1 uch #define HD64461_PCC_CSCIER_OFS 0x6
177 1.1 uch #define HD64461_PCC_SCR_OFS 0x8
178 1.1 uch
179 1.1 uch #define HD64461_PCCISR(x) \
180 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
181 1.1 uch HD64461_PCC_ISR_OFS)
182 1.1 uch #define HD64461_PCCGCR(x) \
183 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
184 1.1 uch HD64461_PCC_GCR_OFS)
185 1.1 uch #define HD64461_PCCCSCR(x) \
186 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
187 1.1 uch HD64461_PCC_CSCR_OFS)
188 1.1 uch #define HD64461_PCCCSCIER(x) \
189 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
190 1.1 uch HD64461_PCC_CSCIER_OFS)
191 1.1 uch #define HD64461_PCCSCR(x) \
192 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
193 1.1 uch HD64461_PCC_SCR_OFS)
194 1.1 uch
195 1.1 uch #define HD64461_PCCISR_READY 0x80
196 1.1 uch #define HD64461_PCCISR_MWP 0x40
197 1.1 uch #define HD64461_PCCISR_VS2 0x20
198 1.1 uch #define HD64461_PCCISR_VS1 0x10
199 1.1 uch #define HD64461_PCCISR_CD2 0x08
200 1.1 uch #define HD64461_PCCISR_CD1 0x04
201 1.1 uch #define HD64461_PCCISR_BVD2 0x02
202 1.1 uch #define HD64461_PCCISR_BVD1 0x01
203 1.1 uch
204 1.1 uch #define HD64461_PCCGCR_DRVE 0x80
205 1.1 uch #define HD64461_PCCGCR_PCCR 0x40
206 1.1 uch #define HD64461_PCCGCR_VCC0 0x10
207 1.1 uch #define HD64461_PCCGCR_MMOD 0x08
208 1.1 uch #define HD64461_PCCGCR_MMOD_16M 0x08
209 1.1 uch #define HD64461_PCCGCR_MMOD_32M 0x00
210 1.1 uch #define HD64461_PCCGCR_PA25 0x04
211 1.1 uch #define HD64461_PCCGCR_PA24 0x02
212 1.1 uch #define HD64461_PCCGCR_PREG 0x01
213 1.1 uch
214 1.1 uch #define HD64461_PCCCSCR_SCDI 0x80
215 1.1 uch #define HD64461_PCCCSCR_CDC 0x08
216 1.1 uch #define HD64461_PCCCSCR_RC 0x04
217 1.1 uch #define HD64461_PCCCSCR_BW 0x02
218 1.1 uch #define HD64461_PCCCSCR_BD 0x01
219 1.1 uch
220 1.1 uch #define HD64461_PCCCSCIER_CRE 0x80
221 1.1 uch #define HD64461_PCCCSCIER_CDE 0x08
222 1.1 uch #define HD64461_PCCCSCIER_RE 0x04
223 1.1 uch #define HD64461_PCCCSCIER_BWE 0x02
224 1.1 uch #define HD64461_PCCCSCIER_BDE 0x01
225 1.1 uch
226 1.1 uch #define HD64461_PCCSCR_VCC1 0x02
227 1.1 uch #define HD64461_PCCSCR_SWP 0x01
228