]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - include/pcmcia/cs.h
xenbus: Xen paravirtualised PCI hotplug support.
[linux-2.6.git] / include / pcmcia / cs.h
index c78d9b11208033a58df7a5d29b266d1ac70c4a7f..68d8bde7e8d6e6649b554faeb3681cd87d68f777 100644 (file)
 #include <linux/interrupt.h>
 #endif
 
-/* For AccessConfigurationRegister */
-typedef struct conf_reg_t {
-    u_char     Function;
-    u_int      Action;
-    off_t      Offset;
-    u_int      Value;
-} conf_reg_t;
-
-/* Actions */
-#define CS_READ                1
-#define CS_WRITE       2
-
-/* for AdjustResourceInfo */
-/* Action field */
-#define REMOVE_MANAGED_RESOURCE                1
-#define ADD_MANAGED_RESOURCE           2
-
-/* For CardValues field */
-#define CV_OPTION_VALUE                0x01
-#define CV_STATUS_VALUE                0x02
-#define CV_PIN_REPLACEMENT     0x04
-#define CV_COPY_VALUE          0x08
-#define CV_EXT_STATUS          0x10
-
 /* ModifyConfiguration */
 typedef struct modconf_t {
     u_int      Attributes;
@@ -80,36 +56,6 @@ typedef struct config_req_t {
 #define INT_CARDBUS            0x04
 #define INT_ZOOMED_VIDEO       0x08
 
-/* For RequestIO and ReleaseIO */
-typedef struct io_req_t {
-    u_int      BasePort1;
-    u_int      NumPorts1;
-    u_int      Attributes1;
-    u_int      BasePort2;
-    u_int      NumPorts2;
-    u_int      Attributes2;
-    u_int      IOAddrLines;
-} io_req_t;
-
-/* Attributes for RequestIO and ReleaseIO */
-#define IO_SHARED              0x01
-#define IO_FIRST_SHARED                0x02
-#define IO_FORCE_ALIAS_ACCESS  0x04
-#define IO_DATA_PATH_WIDTH     0x18
-#define IO_DATA_PATH_WIDTH_8   0x00
-#define IO_DATA_PATH_WIDTH_16  0x08
-#define IO_DATA_PATH_WIDTH_AUTO        0x10
-
-/* Bits in IRQInfo1 field */
-#define IRQ_NMI_ID             0x01
-#define IRQ_IOCK_ID            0x02
-#define IRQ_BERR_ID            0x04
-#define IRQ_VEND_ID            0x08
-#define IRQ_INFO2_VALID                0x10
-#define IRQ_LEVEL_ID           0x20
-#define IRQ_PULSE_ID           0x40
-#define IRQ_SHARE_ID           0x80
-
 /* Configuration registers present */
 #define PRESENT_OPTION         0x001
 #define PRESENT_STATUS         0x002
@@ -122,18 +68,6 @@ typedef struct io_req_t {
 #define PRESENT_IOBASE_3       0x100
 #define PRESENT_IOSIZE         0x200
 
-/* For GetMemPage, MapMemPage */
-typedef struct memreq_t {
-    u_int      CardOffset;
-    u_short    Page;
-} memreq_t;
-
-/* For ModifyWindow */
-typedef struct modwin_t {
-    u_int      Attributes;
-    u_int      AccessSpeed;
-} modwin_t;
-
 /* For RequestWindow */
 typedef struct win_req_t {
     u_int      Attributes;
@@ -143,29 +77,19 @@ typedef struct win_req_t {
 } win_req_t;
 
 /* Attributes for RequestWindow */
-#define WIN_ADDR_SPACE         0x0001
-#define WIN_ADDR_SPACE_MEM     0x0000
-#define WIN_ADDR_SPACE_IO      0x0001
-#define WIN_MEMORY_TYPE                0x0002
-#define WIN_MEMORY_TYPE_CM     0x0000
-#define WIN_MEMORY_TYPE_AM     0x0002
-#define WIN_ENABLE             0x0004
-#define WIN_DATA_WIDTH         0x0018
-#define WIN_DATA_WIDTH_8       0x0000
-#define WIN_DATA_WIDTH_16      0x0008
-#define WIN_DATA_WIDTH_32      0x0010
-#define WIN_PAGED              0x0020
-#define WIN_SHARED             0x0040
-#define WIN_FIRST_SHARED       0x0080
-#define WIN_USE_WAIT           0x0100
-#define WIN_STRICT_ALIGN       0x0200
-#define WIN_MAP_BELOW_1MB      0x0400
-#define WIN_PREFETCH           0x0800
-#define WIN_CACHEABLE          0x1000
-#define WIN_BAR_MASK           0xe000
-#define WIN_BAR_SHIFT          13
-
-/* Flag to bind to all functions */
-#define BIND_FN_ALL    0xff
+#define WIN_MEMORY_TYPE_CM     0x00 /* default */
+#define WIN_MEMORY_TYPE_AM     0x20 /* MAP_ATTRIB */
+#define WIN_DATA_WIDTH_8       0x00 /* default */
+#define WIN_DATA_WIDTH_16      0x02 /* MAP_16BIT */
+#define WIN_ENABLE             0x01 /* MAP_ACTIVE */
+#define WIN_USE_WAIT           0x40 /* MAP_USE_WAIT */
+
+#define WIN_FLAGS_MAP          0x63 /* MAP_ATTRIB | MAP_16BIT | MAP_ACTIVE |
+                                       MAP_USE_WAIT */
+#define WIN_FLAGS_REQ          0x1c /* mapping to socket->win[i]:
+                                       0x04 -> 0
+                                       0x08 -> 1
+                                       0x0c -> 2
+                                       0x10 -> 3 */
 
 #endif /* _LINUX_CS_H */