2 * ss.h 1.31 2001/08/24 12:16:13
4 * The contents of this file are subject to the Mozilla Public License
5 * Version 1.1 (the "License"); you may not use this file except in
6 * compliance with the License. You may obtain a copy of the License
7 * at http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS"
10 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11 * the License for the specific language governing rights and
12 * limitations under the License.
14 * The initial developer of the original code is David A. Hinds
15 * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
16 * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
18 * Alternatively, the contents of this file may be used under the
19 * terms of the GNU General Public License version 2 (the "GPL"), in
20 * which case the provisions of the GPL are applicable instead of the
21 * above. If you wish to allow the use of your version of this file
22 * only under the terms of the GPL and not to allow others to use
23 * your version of this file under the MPL, indicate your decision by
24 * deleting the provisions above and replace them with the notice and
25 * other provisions required by the GPL. If you do not delete the
26 * provisions above, a recipient may use your version of this file
27 * under either the MPL or the GPL.
33 /* For RegisterCallback */
34 typedef struct ss_callback_t {
35 void (*handler)(void *info, u_int events);
39 /* Definitions for card status flags for GetStatus */
40 #define SS_WRPROT 0x0001
41 #define SS_CARDLOCK 0x0002
42 #define SS_EJECTION 0x0004
43 #define SS_INSERTION 0x0008
44 #define SS_BATDEAD 0x0010
45 #define SS_BATWARN 0x0020
46 #define SS_READY 0x0040
47 #define SS_DETECT 0x0080
48 #define SS_POWERON 0x0100
50 #define SS_STSCHG 0x0400
51 #define SS_CARDBUS 0x0800
52 #define SS_3VCARD 0x1000
53 #define SS_XVCARD 0x2000
54 #define SS_PENDING 0x4000
56 /* for InquireSocket */
57 typedef struct socket_cap_t {
63 struct pci_bus *cb_bus;
64 struct bus_operations *bus;
67 /* InquireSocket capabilities */
68 #define SS_CAP_PAGE_REGS 0x0001
69 #define SS_CAP_VIRTUAL_BUS 0x0002
70 #define SS_CAP_MEM_ALIGN 0x0004
71 #define SS_CAP_STATIC_MAP 0x0008
72 #define SS_CAP_PCCARD 0x4000
73 #define SS_CAP_CARDBUS 0x8000
75 /* for GetSocket, SetSocket */
76 typedef struct socket_state_t {
83 /* Socket configuration flags */
84 #define SS_PWR_AUTO 0x0010
85 #define SS_IOCARD 0x0020
86 #define SS_RESET 0x0040
87 #define SS_DMA_MODE 0x0080
88 #define SS_SPKR_ENA 0x0100
89 #define SS_OUTPUT_ENA 0x0200
90 #define SS_ZVCARD 0x0400
92 /* Flags for I/O port and memory windows */
93 #define MAP_ACTIVE 0x01
94 #define MAP_16BIT 0x02
95 #define MAP_AUTOSZ 0x04
97 #define MAP_WRPROT 0x10
98 #define MAP_ATTRIB 0x20
99 #define MAP_USE_WAIT 0x40
100 #define MAP_PREFETCH 0x80
102 /* Use this just for bridge windows */
103 #define MAP_IOSPACE 0x20
105 typedef struct pccard_io_map {
112 typedef struct pccard_mem_map {
116 u_long sys_start, sys_stop;
120 typedef struct cb_bridge_map {
127 SS_RegisterCallback, SS_InquireSocket,
128 SS_GetStatus, SS_GetSocket, SS_SetSocket,
129 SS_GetIOMap, SS_SetIOMap, SS_GetMemMap, SS_SetMemMap,
130 SS_GetBridge, SS_SetBridge, SS_ProcSetup
133 #endif /* _LINUX_SS_H */