4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * The initial developer of the original code is David A. Hinds
9 * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
10 * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
12 * (C) 1999 David A. Hinds
19 #include <linux/interrupt.h>
22 /* For AccessConfigurationRegister */
23 typedef struct conf_reg_t {
34 /* for AdjustResourceInfo */
36 #define REMOVE_MANAGED_RESOURCE 1
37 #define ADD_MANAGED_RESOURCE 2
39 /* For CardValues field */
40 #define CV_OPTION_VALUE 0x01
41 #define CV_STATUS_VALUE 0x02
42 #define CV_PIN_REPLACEMENT 0x04
43 #define CV_COPY_VALUE 0x08
44 #define CV_EXT_STATUS 0x10
46 /* ModifyConfiguration */
47 typedef struct modconf_t {
49 u_int Vcc, Vpp1, Vpp2;
52 /* Attributes for ModifyConfiguration */
53 #define CONF_IRQ_CHANGE_VALID 0x0100
54 #define CONF_VCC_CHANGE_VALID 0x0200
55 #define CONF_VPP1_CHANGE_VALID 0x0400
56 #define CONF_VPP2_CHANGE_VALID 0x0800
57 #define CONF_IO_CHANGE_WIDTH 0x1000
59 /* For RequestConfiguration */
60 typedef struct config_req_t {
62 u_int Vpp; /* both Vpp1 and Vpp2 */
65 u_char Status, Pin, Copy, ExtStatus;
70 /* Attributes for RequestConfiguration */
71 #define CONF_ENABLE_IRQ 0x01
72 #define CONF_ENABLE_DMA 0x02
73 #define CONF_ENABLE_SPKR 0x04
74 #define CONF_ENABLE_PULSE_IRQ 0x08
75 #define CONF_VALID_CLIENT 0x100
78 #define INT_MEMORY 0x01
79 #define INT_MEMORY_AND_IO 0x02
80 #define INT_CARDBUS 0x04
81 #define INT_ZOOMED_VIDEO 0x08
83 /* For RequestIO and ReleaseIO */
84 typedef struct io_req_t {
94 /* Attributes for RequestIO and ReleaseIO */
95 #define IO_SHARED 0x01
96 #define IO_FIRST_SHARED 0x02
97 #define IO_FORCE_ALIAS_ACCESS 0x04
98 #define IO_DATA_PATH_WIDTH 0x18
99 #define IO_DATA_PATH_WIDTH_8 0x00
100 #define IO_DATA_PATH_WIDTH_16 0x08
101 #define IO_DATA_PATH_WIDTH_AUTO 0x10
103 /* Bits in IRQInfo1 field */
104 #define IRQ_NMI_ID 0x01
105 #define IRQ_IOCK_ID 0x02
106 #define IRQ_BERR_ID 0x04
107 #define IRQ_VEND_ID 0x08
108 #define IRQ_INFO2_VALID 0x10
109 #define IRQ_LEVEL_ID 0x20
110 #define IRQ_PULSE_ID 0x40
111 #define IRQ_SHARE_ID 0x80
113 /* Configuration registers present */
114 #define PRESENT_OPTION 0x001
115 #define PRESENT_STATUS 0x002
116 #define PRESENT_PIN_REPLACE 0x004
117 #define PRESENT_COPY 0x008
118 #define PRESENT_EXT_STATUS 0x010
119 #define PRESENT_IOBASE_0 0x020
120 #define PRESENT_IOBASE_1 0x040
121 #define PRESENT_IOBASE_2 0x080
122 #define PRESENT_IOBASE_3 0x100
123 #define PRESENT_IOSIZE 0x200
125 /* For GetMemPage, MapMemPage */
126 typedef struct memreq_t {
131 /* For ModifyWindow */
132 typedef struct modwin_t {
137 /* For RequestWindow */
138 typedef struct win_req_t {
145 /* Attributes for RequestWindow */
146 #define WIN_ADDR_SPACE 0x0001
147 #define WIN_ADDR_SPACE_MEM 0x0000
148 #define WIN_ADDR_SPACE_IO 0x0001
149 #define WIN_MEMORY_TYPE 0x0002
150 #define WIN_MEMORY_TYPE_CM 0x0000
151 #define WIN_MEMORY_TYPE_AM 0x0002
152 #define WIN_ENABLE 0x0004
153 #define WIN_DATA_WIDTH 0x0018
154 #define WIN_DATA_WIDTH_8 0x0000
155 #define WIN_DATA_WIDTH_16 0x0008
156 #define WIN_DATA_WIDTH_32 0x0010
157 #define WIN_PAGED 0x0020
158 #define WIN_SHARED 0x0040
159 #define WIN_FIRST_SHARED 0x0080
160 #define WIN_USE_WAIT 0x0100
161 #define WIN_STRICT_ALIGN 0x0200
162 #define WIN_MAP_BELOW_1MB 0x0400
163 #define WIN_PREFETCH 0x0800
164 #define WIN_CACHEABLE 0x1000
165 #define WIN_BAR_MASK 0xe000
166 #define WIN_BAR_SHIFT 13
168 /* Flag to bind to all functions */
169 #define BIND_FN_ALL 0xff
171 #endif /* _LINUX_CS_H */