hd64461pcmciareg.h revision 1.3 1 1.3 uwe /* $NetBSD: hd64461pcmciareg.h,v 1.3 2005/12/18 21:47:10 uwe 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.3 uwe #ifndef _HPCSH_DEV_HD64461PCMCIAREG_H_
40 1.3 uwe #define _HPCSH_DEV_HD64461PCMCIAREG_H_
41 1.3 uwe
42 1.1 uch /*
43 1.1 uch * PCC0 SH7709 Area 6 (memory and I/O card)
44 1.1 uch */
45 1.3 uwe
46 1.1 uch /* PCC0 Interface Status Register (R) */
47 1.1 uch #define HD64461_PCC0ISR_REG8 0xb0002000
48 1.1 uch #define HD64461_PCC0ISR_P0READY HD64461_PCCISR_READY
49 1.1 uch #define HD64461_PCC0ISR_IREQ HD64461_PCCISR_READY
50 1.1 uch #define HD64461_PCC0ISR_P0MWP HD64461_PCCISR_MWP
51 1.1 uch #define HD64461_PCC0ISR_P0VS2 HD64461_PCCISR_VS2
52 1.1 uch #define HD64461_PCC0ISR_P0VS1 HD64461_PCCISR_VS1
53 1.1 uch #define HD64461_PCC0ISR_P0CD2 HD64461_PCCISR_CD2
54 1.1 uch #define HD64461_PCC0ISR_P0CD1 HD64461_PCCISR_CD1
55 1.1 uch #define HD64461_PCC0ISR_P0BVD2 HD64461_PCCISR_BVD2
56 1.1 uch #define HD64461_PCC0ISR_SPKR0 HD64461_PCCISR_BVD2
57 1.1 uch #define HD64461_PCC0ISR_P0BVD1 HD64461_PCCISR_BVD1
58 1.1 uch #define HD64461_PCC0ISR_STSCHG0 HD64461_PCCISR_BVD1
59 1.1 uch
60 1.1 uch /* PCC0 General Contorol Register (R/W) */
61 1.1 uch #define HD64461_PCC0GCR_REG8 0xb0002002
62 1.1 uch #define HD64461_PCC0GCR_P0DRVE HD64461_PCCGCR_DRVE
63 1.1 uch #define HD64461_PCC0GCR_P0PCCR HD64461_PCCGCR_PCCR
64 1.2 uch #define HD64461_PCC0GCR_P0PCCT HD64461_PCCGCR_PCCT
65 1.1 uch #define HD64461_PCC0GCR_P0VCC0 HD64461_PCCGCR_VCC0
66 1.1 uch #define HD64461_PCC0GCR_P0MMOD HD64461_PCCGCR_MMOD
67 1.1 uch #define HD64461_PCC0GCR_P0MMOD_16M HD64461_PCCGCR_MMOD_16M
68 1.1 uch #define HD64461_PCC0GCR_P0MMOD_32M HD64461_PCCGCR_MMOD_32M
69 1.1 uch /* these bits meaning different for P0MMOD mode */
70 1.1 uch #define HD64461_PCC0GCR_P0PA25 HD64461_PCCGCR_PA25
71 1.1 uch #define HD64461_PCC0GCR_P0PA24 HD64461_PCCGCR_PA24
72 1.1 uch #define HD64461_PCC0GCR_P0REG HD64461_PCCGCR_PREG
73 1.1 uch
74 1.1 uch /* PCC0 Card Status Change Register (R/W) */
75 1.1 uch #define HD64461_PCC0CSCR_REG8 0xb0002004
76 1.1 uch #define HD64461_PCC0CSCR_P0SCDI HD64461_PCCCSCR_SCDI
77 1.1 uch #define HD64461_PCC0CSCR_P0IREQ 0x20
78 1.1 uch #define HD64461_PCC0CSCR_P0SC 0x10
79 1.1 uch #define HD64461_PCC0CSCR_P0CDC HD64461_PCCCSCR_CDC
80 1.1 uch #define HD64461_PCC0CSCR_P0RC HD64461_PCCCSCR_RC
81 1.1 uch #define HD64461_PCC0CSCR_P0BW HD64461_PCCCSCR_BW
82 1.1 uch #define HD64461_PCC0CSCR_P0BD HD64461_PCCCSCR_BD
83 1.1 uch
84 1.1 uch /* PCC0 Card Status Change Interrupt Enable Register (R/W) */
85 1.1 uch #define HD64461_PCC0CSCIER_REG8 0xb0002006
86 1.1 uch #define HD64461_PCC0CSCIER_P0CRE HD64461_PCCCSCIER_CRE
87 1.1 uch
88 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_MASK 0x60
89 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_NONE 0x00
90 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_LEVEL 0x20
91 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_FEDGE 0x40
92 1.1 uch #define HD64461_PCC0CSCIER_P0IREQE_REDGE 0x60
93 1.1 uch
94 1.1 uch #define HD64461_PCC0CSCIER_P0SCE 0x10
95 1.1 uch #define HD64461_PCC0CSCIER_P0CDE HD64461_PCCCSCIER_CDE
96 1.1 uch #define HD64461_PCC0CSCIER_P0RE HD64461_PCCCSCIER_RE
97 1.1 uch #define HD64461_PCC0CSCIER_P0BWE HD64461_PCCCSCIER_BWE
98 1.1 uch #define HD64461_PCC0CSCIER_P0BDE HD64461_PCCCSCIER_BDE
99 1.1 uch
100 1.1 uch /* PCC0 Software Control Register (R/W) */
101 1.1 uch #define HD64461_PCC0SCR_REG8 0xb0002008
102 1.1 uch #define HD64461_PCC0SCR_P0VCC1 HD64461_PCCSCR_VCC1
103 1.1 uch #define HD64461_PCC0SCR_P0SWP HD64461_PCCSCR_SWP
104 1.1 uch
105 1.1 uch /*
106 1.1 uch * PCC1 SH7709 Area 5 (memory card only)
107 1.1 uch */
108 1.1 uch /* PCC1 Interface Status Register (R) */
109 1.1 uch #define HD64461_PCC1ISR_REG8 0xb0002010
110 1.1 uch #define HD64461_PCC1ISR_P1READY HD64461_PCCISR_READY
111 1.1 uch #define HD64461_PCC1ISR_P1MWP HD64461_PCCISR_MWP
112 1.1 uch #define HD64461_PCC1ISR_P1VS2 HD64461_PCCISR_VS2
113 1.1 uch #define HD64461_PCC1ISR_P1VS1 HD64461_PCCISR_VS1
114 1.1 uch #define HD64461_PCC1ISR_P1CD2 HD64461_PCCISR_CD2
115 1.1 uch #define HD64461_PCC1ISR_P1CD1 HD64461_PCCISR_CD1
116 1.1 uch #define HD64461_PCC1ISR_P1BVD2 HD64461_PCCISR_BVD2
117 1.1 uch #define HD64461_PCC1ISR_P1BVD1 HD64461_PCCISR_BVD1
118 1.1 uch
119 1.1 uch /* PCC1 General Contorol Register (R/W) */
120 1.1 uch #define HD64461_PCC1GCR_REG8 0xb0002012
121 1.1 uch #define HD64461_PCC1GCR_P1DRVE HD64461_PCCGCR_DRVE
122 1.1 uch #define HD64461_PCC1GCR_P1PCCR HD64461_PCCGCR_PCCR
123 1.2 uch #define HD64461_PCC1GCR_RESERVED HD64461_PCCGCR_PCCT
124 1.1 uch #define HD64461_PCC1GCR_P1VCC0 HD64461_PCCGCR_VCC0
125 1.1 uch #define HD64461_PCC1GCR_P1MMOD HD64461_PCCGCR_MMOD
126 1.1 uch #define HD64461_PCC1GCR_P1MMOD_16M HD64461_PCCGCR_MMOD_16M
127 1.1 uch #define HD64461_PCC1GCR_P1MMOD_32M HD64461_PCCGCR_MMOD_32M
128 1.1 uch #define HD64461_PCC1GCR_P1PA25 HD64461_PCCGCR_PA25
129 1.1 uch #define HD64461_PCC1GCR_P1PA24 HD64461_PCCGCR_PA24
130 1.1 uch #define HD64461_PCC1GCR_P1REG HD64461_PCCGCR_PREG
131 1.1 uch
132 1.1 uch /* PCC1 Card Status Change Register (R/W) */
133 1.1 uch #define HD64461_PCC1CSCR_REG8 0xb0002014
134 1.1 uch #define HD64461_PCC1CSCR_P1SCDI HD64461_PCCCSCR_SCDI
135 1.1 uch #define HD64461_PCC1CSCR_P1CDC HD64461_PCCCSCR_CDC
136 1.1 uch #define HD64461_PCC1CSCR_P1RC HD64461_PCCCSCR_RC
137 1.1 uch #define HD64461_PCC1CSCR_P1BW HD64461_PCCCSCR_BW
138 1.1 uch #define HD64461_PCC1CSCR_P1BD HD64461_PCCCSCR_BD
139 1.1 uch
140 1.1 uch /* PCC1 Card Status Change Interrupt Enable Register (R/W) */
141 1.1 uch #define HD64461_PCC1CSCIER_REG8 0xb0002016
142 1.1 uch #define HD64461_PCC1CSCIER_P1CRE HD64461_PCCCSCIER_CRE
143 1.1 uch #define HD64461_PCC1CSCIER_P1CDE HD64461_PCCCSCIER_CDE
144 1.1 uch #define HD64461_PCC1CSCIER_P1RE HD64461_PCCCSCIER_RE
145 1.1 uch #define HD64461_PCC1CSCIER_P1BWE HD64461_PCCCSCIER_BWE
146 1.1 uch #define HD64461_PCC1CSCIER_P1BDE HD64461_PCCCSCIER_BDE
147 1.1 uch
148 1.1 uch /* PCC1 Software Control Register (R/W) */
149 1.1 uch #define HD64461_PCC1SCR_REG8 0xb0002018
150 1.1 uch #define HD64461_PCC1SCR_P1VCC1 HD64461_PCCSCR_VCC1
151 1.1 uch #define HD64461_PCC1SCR_P1SWP HD64461_PCCSCR_SWP
152 1.1 uch
153 1.1 uch /*
154 1.1 uch * General Control
155 1.1 uch */
156 1.1 uch /* PCC0 Output pins Control Register (R/W) */
157 1.1 uch #define HD64461_PCCP0OCR_REG8 0xb000202a
158 1.1 uch #define HD64461_PCCP0OCR_P0DEPLUP 0x80
159 1.1 uch #define HD64461_PCCP0OCR_P0AEPLUP 0x10
160 1.1 uch
161 1.1 uch /* PCC1 Output pins Control Register (R/W) */
162 1.1 uch #define HD64461_PCCP1OCR_REG8 0xb000202c
163 1.1 uch #define HD64461_PCCP1OCR_P1RST8MA 0x08
164 1.1 uch #define HD64461_PCCP1OCR_P1RST4MA 0x04
165 1.1 uch #define HD64461_PCCP1OCR_P1RAS8MA 0x02
166 1.1 uch #define HD64461_PCCP1OCR_P1RAS4MA 0x01
167 1.1 uch
168 1.1 uch /* PC Card General Control Register (R/W) */
169 1.1 uch #define HD64461_PCCPGCR_REG8 0xb000202e
170 1.1 uch #define HD64461_PCCPGCR_PSSDIR 0x02
171 1.1 uch #define HD64461_PCCPGCR_PSSRDWR 0x01
172 1.1 uch
173 1.1 uch /*
174 1.1 uch * common defines.
175 1.1 uch */
176 1.1 uch #define HD64461_PCC0_REGBASE HD64461_PCC0ISR_REG8
177 1.1 uch #define HD64461_PCC1_REGBASE HD64461_PCC1ISR_REG8
178 1.1 uch #define HD64461_PCC_ISR_OFS 0x0
179 1.1 uch #define HD64461_PCC_GCR_OFS 0x2
180 1.1 uch #define HD64461_PCC_CSCR_OFS 0x4
181 1.1 uch #define HD64461_PCC_CSCIER_OFS 0x6
182 1.1 uch #define HD64461_PCC_SCR_OFS 0x8
183 1.1 uch
184 1.1 uch #define HD64461_PCCISR(x) \
185 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
186 1.1 uch HD64461_PCC_ISR_OFS)
187 1.1 uch #define HD64461_PCCGCR(x) \
188 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
189 1.1 uch HD64461_PCC_GCR_OFS)
190 1.1 uch #define HD64461_PCCCSCR(x) \
191 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
192 1.1 uch HD64461_PCC_CSCR_OFS)
193 1.1 uch #define HD64461_PCCCSCIER(x) \
194 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
195 1.1 uch HD64461_PCC_CSCIER_OFS)
196 1.1 uch #define HD64461_PCCSCR(x) \
197 1.1 uch (((x) ? HD64461_PCC1_REGBASE : HD64461_PCC0_REGBASE) + \
198 1.1 uch HD64461_PCC_SCR_OFS)
199 1.1 uch
200 1.1 uch #define HD64461_PCCISR_READY 0x80
201 1.1 uch #define HD64461_PCCISR_MWP 0x40
202 1.1 uch #define HD64461_PCCISR_VS2 0x20
203 1.1 uch #define HD64461_PCCISR_VS1 0x10
204 1.1 uch #define HD64461_PCCISR_CD2 0x08
205 1.1 uch #define HD64461_PCCISR_CD1 0x04
206 1.1 uch #define HD64461_PCCISR_BVD2 0x02
207 1.1 uch #define HD64461_PCCISR_BVD1 0x01
208 1.1 uch
209 1.1 uch #define HD64461_PCCGCR_DRVE 0x80
210 1.1 uch #define HD64461_PCCGCR_PCCR 0x40
211 1.2 uch #define HD64461_PCCGCR_PCCT 0x20
212 1.1 uch #define HD64461_PCCGCR_VCC0 0x10
213 1.1 uch #define HD64461_PCCGCR_MMOD 0x08
214 1.1 uch #define HD64461_PCCGCR_MMOD_16M 0x08
215 1.1 uch #define HD64461_PCCGCR_MMOD_32M 0x00
216 1.1 uch #define HD64461_PCCGCR_PA25 0x04
217 1.1 uch #define HD64461_PCCGCR_PA24 0x02
218 1.1 uch #define HD64461_PCCGCR_PREG 0x01
219 1.1 uch
220 1.1 uch #define HD64461_PCCCSCR_SCDI 0x80
221 1.1 uch #define HD64461_PCCCSCR_CDC 0x08
222 1.1 uch #define HD64461_PCCCSCR_RC 0x04
223 1.1 uch #define HD64461_PCCCSCR_BW 0x02
224 1.1 uch #define HD64461_PCCCSCR_BD 0x01
225 1.1 uch
226 1.1 uch #define HD64461_PCCCSCIER_CRE 0x80
227 1.1 uch #define HD64461_PCCCSCIER_CDE 0x08
228 1.1 uch #define HD64461_PCCCSCIER_RE 0x04
229 1.1 uch #define HD64461_PCCCSCIER_BWE 0x02
230 1.1 uch #define HD64461_PCCCSCIER_BDE 0x01
231 1.1 uch
232 1.1 uch #define HD64461_PCCSCR_VCC1 0x02
233 1.1 uch #define HD64461_PCCSCR_SWP 0x01
234 1.3 uwe
235 1.3 uwe #endif /* !_HPCSH_DEV_HD64461PCMCIAREG_H_ */
236