2 * (C) Copyright 2000-2004
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
15 * Allow configuration to select PCMCIA slot,
16 * or try to generate a useful default
18 #if defined(CONFIG_CMD_PCMCIA)
20 #if !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B)
21 # error "PCMCIA Slot not configured"
22 #endif /* !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B) */
24 /* Make sure exactly one slot is defined - we support only one for now */
25 #if !defined(CONFIG_PCMCIA_SLOT_A) && !defined(CONFIG_PCMCIA_SLOT_B)
26 #error Neither CONFIG_PCMCIA_SLOT_A nor CONFIG_PCMCIA_SLOT_B configured
28 #if defined(CONFIG_PCMCIA_SLOT_A) && defined(CONFIG_PCMCIA_SLOT_B)
29 #error Both CONFIG_PCMCIA_SLOT_A and CONFIG_PCMCIA_SLOT_B configured
32 #ifndef PCMCIA_SOCKETS_NO
33 #define PCMCIA_SOCKETS_NO 1
35 #ifndef PCMCIA_MEM_WIN_NO
36 #define PCMCIA_MEM_WIN_NO 4
38 #define PCMCIA_IO_WIN_NO 2
40 /* define _slot_ to be able to optimize macros */
41 #ifdef CONFIG_PCMCIA_SLOT_A
43 # define PCMCIA_SLOT_MSG "slot A"
44 # define PCMCIA_SLOT_x PCMCIA_PSLOT_A
47 # define PCMCIA_SLOT_MSG "slot B"
48 # define PCMCIA_SLOT_x PCMCIA_PSLOT_B
52 * This structure is used to address each window in the PCMCIA controller.
54 * Keep in mind that we assume that pcmcia_win_t[n+1] is mapped directly
55 * after pcmcia_win_t[n]...
64 * Definitions for PCMCIA control registers to operate in IDE mode
66 * All timing related setup (PCMCIA_SHT, PCMCIA_SST, PCMCIA_SL)
67 * to be done later (depending on CPU clock)
71 * Base: 0xFE100000 CS1
77 #define CONFIG_SYS_PCMCIA_PBR0 0xFE100000
78 #define CONFIG_SYS_PCMCIA_POR0 ( PCMCIA_BSIZE_2 \
86 * Base: 0xFE100080 CS1
92 #define CONFIG_SYS_PCMCIA_PBR1 0xFE100080
93 #define CONFIG_SYS_PCMCIA_POR1 ( PCMCIA_BSIZE_8 \
101 * Base: 0xFE100100 CS2
104 * Common Memory Space
107 #define CONFIG_SYS_PCMCIA_PBR2 0xFE100100
108 #define CONFIG_SYS_PCMCIA_POR2 ( PCMCIA_BSIZE_8 \
118 #define CONFIG_SYS_PCMCIA_PBR3 0
119 #define CONFIG_SYS_PCMCIA_POR3 0
122 * Base: 0xFE100C00 CS1
125 * Common Memory Space
128 #define CONFIG_SYS_PCMCIA_PBR4 0xFE100C00
129 #define CONFIG_SYS_PCMCIA_POR4 ( PCMCIA_BSIZE_2 \
137 * Base: 0xFE100C80 CS1
140 * Common Memory Space
143 #define CONFIG_SYS_PCMCIA_PBR5 0xFE100C80
144 #define CONFIG_SYS_PCMCIA_POR5 ( PCMCIA_BSIZE_8 \
152 * Base: 0xFE100D00 CS2
155 * Common Memory Space
158 #define CONFIG_SYS_PCMCIA_PBR6 0xFE100D00
159 #define CONFIG_SYS_PCMCIA_POR6 ( PCMCIA_BSIZE_8 \
169 #define CONFIG_SYS_PCMCIA_PBR7 0
170 #define CONFIG_SYS_PCMCIA_POR7 0
172 /**********************************************************************/
177 #define CISTPL_NULL 0x00
178 #define CISTPL_DEVICE 0x01
179 #define CISTPL_LONGLINK_CB 0x02
180 #define CISTPL_INDIRECT 0x03
181 #define CISTPL_CONFIG_CB 0x04
182 #define CISTPL_CFTABLE_ENTRY_CB 0x05
183 #define CISTPL_LONGLINK_MFC 0x06
184 #define CISTPL_BAR 0x07
185 #define CISTPL_PWR_MGMNT 0x08
186 #define CISTPL_EXTDEVICE 0x09
187 #define CISTPL_CHECKSUM 0x10
188 #define CISTPL_LONGLINK_A 0x11
189 #define CISTPL_LONGLINK_C 0x12
190 #define CISTPL_LINKTARGET 0x13
191 #define CISTPL_NO_LINK 0x14
192 #define CISTPL_VERS_1 0x15
193 #define CISTPL_ALTSTR 0x16
194 #define CISTPL_DEVICE_A 0x17
195 #define CISTPL_JEDEC_C 0x18
196 #define CISTPL_JEDEC_A 0x19
197 #define CISTPL_CONFIG 0x1a
198 #define CISTPL_CFTABLE_ENTRY 0x1b
199 #define CISTPL_DEVICE_OC 0x1c
200 #define CISTPL_DEVICE_OA 0x1d
201 #define CISTPL_DEVICE_GEO 0x1e
202 #define CISTPL_DEVICE_GEO_A 0x1f
203 #define CISTPL_MANFID 0x20
204 #define CISTPL_FUNCID 0x21
205 #define CISTPL_FUNCE 0x22
206 #define CISTPL_SWIL 0x23
207 #define CISTPL_END 0xff
210 * CIS Function ID codes
212 #define CISTPL_FUNCID_MULTI 0x00
213 #define CISTPL_FUNCID_MEMORY 0x01
214 #define CISTPL_FUNCID_SERIAL 0x02
215 #define CISTPL_FUNCID_PARALLEL 0x03
216 #define CISTPL_FUNCID_FIXED 0x04
217 #define CISTPL_FUNCID_VIDEO 0x05
218 #define CISTPL_FUNCID_NETWORK 0x06
219 #define CISTPL_FUNCID_AIMS 0x07
220 #define CISTPL_FUNCID_SCSI 0x08
223 * Fixed Disk FUNCE codes
225 #define CISTPL_IDE_INTERFACE 0x01
227 #define CISTPL_FUNCE_IDE_IFACE 0x01
228 #define CISTPL_FUNCE_IDE_MASTER 0x02
229 #define CISTPL_FUNCE_IDE_SLAVE 0x03
231 /* First feature byte */
232 #define CISTPL_IDE_SILICON 0x04
233 #define CISTPL_IDE_UNIQUE 0x08
234 #define CISTPL_IDE_DUAL 0x10
236 /* Second feature byte */
237 #define CISTPL_IDE_HAS_SLEEP 0x01
238 #define CISTPL_IDE_HAS_STANDBY 0x02
239 #define CISTPL_IDE_HAS_IDLE 0x04
240 #define CISTPL_IDE_LOW_POWER 0x08
241 #define CISTPL_IDE_REG_INHIBIT 0x10
242 #define CISTPL_IDE_HAS_INDEX 0x20
243 #define CISTPL_IDE_IOIS16 0x40
247 #endif /* _PCMCIA_H */