2 * ss.h 1.24 1999/08/28 04:12:33
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 * <dhinds@hyper.stanford.edu>. 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 Public License version 2 (the "GPL"), in which
20 * 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
55 /* for InquireSocket */
56 typedef struct socket_cap_t
{
62 struct pci_bus
*cb_bus
;
63 struct bus_operations
*bus
;
66 /* InquireSocket capabilities */
67 #define SS_CAP_PAGE_REGS 0x0001
68 #define SS_CAP_VIRTUAL_BUS 0x0002
69 #define SS_CAP_MEM_ALIGN 0x0004
70 #define SS_CAP_PCCARD 0x4000
71 #define SS_CAP_CARDBUS 0x8000
73 /* for GetSocket, SetSocket */
74 typedef struct socket_state_t
{
81 /* Socket configuration flags */
82 #define SS_PWR_AUTO 0x0010
83 #define SS_IOCARD 0x0020
84 #define SS_RESET 0x0040
85 #define SS_DMA_MODE 0x0080
86 #define SS_SPKR_ENA 0x0100
87 #define SS_OUTPUT_ENA 0x0200
89 /* Flags for I/O port and memory windows */
90 #define MAP_ACTIVE 0x01
91 #define MAP_16BIT 0x02
92 #define MAP_AUTOSZ 0x04
94 #define MAP_WRPROT 0x10
95 #define MAP_ATTRIB 0x20
96 #define MAP_USE_WAIT 0x40
97 #define MAP_PREFETCH 0x80
99 /* Use this just for bridge windows */
100 #define MAP_IOSPACE 0x20
102 typedef struct pccard_io_map
{
109 typedef struct pccard_mem_map
{
113 u_long sys_start
, sys_stop
;
117 typedef struct cb_bridge_map
{
124 SS_RegisterCallback
, SS_InquireSocket
,
125 SS_GetStatus
, SS_GetSocket
, SS_SetSocket
,
126 SS_GetIOMap
, SS_SetIOMap
, SS_GetMemMap
, SS_SetMemMap
,
127 SS_GetBridge
, SS_SetBridge
, SS_ProcSetup
130 #endif /* _LINUX_SS_H */