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 AdjustResourceInfo */
24 #define REMOVE_MANAGED_RESOURCE 1
25 #define ADD_MANAGED_RESOURCE 2
27 /* For CardValues field */
28 #define CV_OPTION_VALUE 0x01
29 #define CV_STATUS_VALUE 0x02
30 #define CV_PIN_REPLACEMENT 0x04
31 #define CV_COPY_VALUE 0x08
32 #define CV_EXT_STATUS 0x10
34 /* ModifyConfiguration */
35 typedef struct modconf_t {
37 u_int Vcc, Vpp1, Vpp2;
40 /* Attributes for ModifyConfiguration */
41 #define CONF_IRQ_CHANGE_VALID 0x0100
42 #define CONF_VCC_CHANGE_VALID 0x0200
43 #define CONF_VPP1_CHANGE_VALID 0x0400
44 #define CONF_VPP2_CHANGE_VALID 0x0800
45 #define CONF_IO_CHANGE_WIDTH 0x1000
47 /* For RequestConfiguration */
48 typedef struct config_req_t {
50 u_int Vpp; /* both Vpp1 and Vpp2 */
53 u_char Status, Pin, Copy, ExtStatus;
58 /* Attributes for RequestConfiguration */
59 #define CONF_ENABLE_IRQ 0x01
60 #define CONF_ENABLE_DMA 0x02
61 #define CONF_ENABLE_SPKR 0x04
62 #define CONF_ENABLE_PULSE_IRQ 0x08
63 #define CONF_VALID_CLIENT 0x100
66 #define INT_MEMORY 0x01
67 #define INT_MEMORY_AND_IO 0x02
68 #define INT_CARDBUS 0x04
69 #define INT_ZOOMED_VIDEO 0x08
71 /* For RequestIO and ReleaseIO */
72 typedef struct io_req_t {
82 /* Attributes for RequestIO and ReleaseIO */
83 #define IO_SHARED 0x01
84 #define IO_FIRST_SHARED 0x02
85 #define IO_FORCE_ALIAS_ACCESS 0x04
86 #define IO_DATA_PATH_WIDTH 0x18
87 #define IO_DATA_PATH_WIDTH_8 0x00
88 #define IO_DATA_PATH_WIDTH_16 0x08
89 #define IO_DATA_PATH_WIDTH_AUTO 0x10
91 /* Bits in IRQInfo1 field */
92 #define IRQ_NMI_ID 0x01
93 #define IRQ_IOCK_ID 0x02
94 #define IRQ_BERR_ID 0x04
95 #define IRQ_VEND_ID 0x08
96 #define IRQ_INFO2_VALID 0x10
97 #define IRQ_LEVEL_ID 0x20
98 #define IRQ_PULSE_ID 0x40
99 #define IRQ_SHARE_ID 0x80
101 /* Configuration registers present */
102 #define PRESENT_OPTION 0x001
103 #define PRESENT_STATUS 0x002
104 #define PRESENT_PIN_REPLACE 0x004
105 #define PRESENT_COPY 0x008
106 #define PRESENT_EXT_STATUS 0x010
107 #define PRESENT_IOBASE_0 0x020
108 #define PRESENT_IOBASE_1 0x040
109 #define PRESENT_IOBASE_2 0x080
110 #define PRESENT_IOBASE_3 0x100
111 #define PRESENT_IOSIZE 0x200
113 /* For GetMemPage, MapMemPage */
114 typedef struct memreq_t {
119 /* For ModifyWindow */
120 typedef struct modwin_t {
125 /* For RequestWindow */
126 typedef struct win_req_t {
133 /* Attributes for RequestWindow */
134 #define WIN_ADDR_SPACE 0x0001
135 #define WIN_ADDR_SPACE_MEM 0x0000
136 #define WIN_ADDR_SPACE_IO 0x0001
137 #define WIN_MEMORY_TYPE 0x0002
138 #define WIN_MEMORY_TYPE_CM 0x0000
139 #define WIN_MEMORY_TYPE_AM 0x0002
140 #define WIN_ENABLE 0x0004
141 #define WIN_DATA_WIDTH 0x0018
142 #define WIN_DATA_WIDTH_8 0x0000
143 #define WIN_DATA_WIDTH_16 0x0008
144 #define WIN_DATA_WIDTH_32 0x0010
145 #define WIN_PAGED 0x0020
146 #define WIN_SHARED 0x0040
147 #define WIN_FIRST_SHARED 0x0080
148 #define WIN_USE_WAIT 0x0100
149 #define WIN_STRICT_ALIGN 0x0200
150 #define WIN_MAP_BELOW_1MB 0x0400
151 #define WIN_PREFETCH 0x0800
152 #define WIN_CACHEABLE 0x1000
153 #define WIN_BAR_MASK 0xe000
154 #define WIN_BAR_SHIFT 13
156 /* Flag to bind to all functions */
157 #define BIND_FN_ALL 0xff
159 #endif /* _LINUX_CS_H */