nfsd: track last inode only in use_wgather case
[safe/jmp/linux-2.6] / include / pcmcia / cs.h
index 60a3dec..904468a 100644 (file)
@@ -28,84 +28,16 @@ typedef struct conf_reg_t {
 #define CS_WRITE       2
 
 /* for AdjustResourceInfo */
-typedef struct adjust_t {
-    u_int      Action;
-    u_int      Resource;
-    u_int      Attributes;
-    union {
-       struct memory {
-           u_long      Base;
-           u_long      Size;
-       } memory;
-       struct io {
-           ioaddr_t    BasePort;
-           ioaddr_t    NumPorts;
-           u_int       IOAddrLines;
-       } io;
-       struct irq {
-           u_int       IRQ;
-       } irq;
-    } resource;
-} adjust_t;
-
 /* Action field */
 #define REMOVE_MANAGED_RESOURCE                1
 #define ADD_MANAGED_RESOURCE           2
-#define GET_FIRST_MANAGED_RESOURCE     3
-#define GET_NEXT_MANAGED_RESOURCE      4
-/* Resource field */
-#define RES_MEMORY_RANGE               1
-#define RES_IO_RANGE                   2
-#define RES_IRQ                                3
-/* Attribute field */
-#define RES_IRQ_TYPE                   0x03
-#define RES_IRQ_TYPE_EXCLUSIVE         0
-#define RES_IRQ_TYPE_TIME              1
-#define RES_IRQ_TYPE_DYNAMIC           2
-#define RES_IRQ_CSC                    0x04
-#define RES_SHARED                     0x08
-#define RES_RESERVED                   0x10
-#define RES_ALLOCATED                  0x20
-#define RES_REMOVED                    0x40
 
-typedef struct servinfo_t {
-    char       Signature[2];
-    u_int      Count;
-    u_int      Revision;
-    u_int      CSLevel;
-    char       *VendorString;
-} servinfo_t;
 
 typedef struct event_callback_args_t {
-    client_handle_t client_handle;
-    void       *info;
-    void       *mtdrequest;
-    void       *buffer;
-    void       *misc;
-    void       *client_data;
+       struct pcmcia_device    *client_handle;
+       void                    *client_data;
 } event_callback_args_t;
 
-/* for GetConfigurationInfo */
-typedef struct config_info_t {
-    u_char     Function;
-    u_int      Attributes;
-    u_int      Vcc, Vpp1, Vpp2;
-    u_int      IntType;
-    u_int      ConfigBase;
-    u_char     Status, Pin, Copy, Option, ExtStatus;
-    u_int      Present;
-    u_int      CardValues;
-    u_int      AssignedIRQ;
-    u_int      IRQAttributes;
-    ioaddr_t   BasePort1;
-    ioaddr_t   NumPorts1;
-    u_int      Attributes1;
-    ioaddr_t   BasePort2;
-    ioaddr_t   NumPorts2;
-    u_int      Attributes2;
-    u_int      IOAddrLines;
-} config_info_t;
-
 /* For CardValues field */
 #define CV_OPTION_VALUE                0x01
 #define CV_STATUS_VALUE                0x02
@@ -121,17 +53,6 @@ typedef struct client_req_t {
 
 #define CLIENT_THIS_SOCKET     0x01
 
-/* For RegisterClient */
-typedef struct client_reg_t {
-    dev_info_t *dev_info;
-    u_int      Attributes;  /* UNUSED */
-    u_int      EventMask;
-    int                (*event_handler)(event_t event, int priority,
-                                event_callback_args_t *);
-    event_callback_args_t event_callback_args;
-    u_int      Version;
-} client_reg_t;
-
 /* ModifyConfiguration */
 typedef struct modconf_t {
     u_int      Attributes;
@@ -139,15 +60,16 @@ typedef struct modconf_t {
 } modconf_t;
 
 /* Attributes for ModifyConfiguration */
-#define CONF_IRQ_CHANGE_VALID  0x100
-#define CONF_VCC_CHANGE_VALID  0x200
-#define CONF_VPP1_CHANGE_VALID 0x400
-#define CONF_VPP2_CHANGE_VALID 0x800
+#define CONF_IRQ_CHANGE_VALID  0x0100
+#define CONF_VCC_CHANGE_VALID  0x0200
+#define CONF_VPP1_CHANGE_VALID 0x0400
+#define CONF_VPP2_CHANGE_VALID 0x0800
+#define CONF_IO_CHANGE_WIDTH   0x1000
 
 /* For RequestConfiguration */
 typedef struct config_req_t {
     u_int      Attributes;
-    u_int      Vcc, Vpp1, Vpp2;
+    u_int      Vpp; /* both Vpp1 and Vpp2 */
     u_int      IntType;
     u_int      ConfigBase;
     u_char     Status, Pin, Copy, ExtStatus;
@@ -169,11 +91,11 @@ typedef struct config_req_t {
 
 /* For RequestIO and ReleaseIO */
 typedef struct io_req_t {
-    ioaddr_t   BasePort1;
-    ioaddr_t   NumPorts1;
+    u_int      BasePort1;
+    u_int      NumPorts1;
     u_int      Attributes1;
-    ioaddr_t   BasePort2;
-    ioaddr_t   NumPorts2;
+    u_int      BasePort2;
+    u_int      NumPorts2;
     u_int      Attributes2;
     u_int      IOAddrLines;
 } io_req_t;
@@ -279,22 +201,6 @@ typedef struct win_req_t {
 #define WIN_BAR_MASK           0xe000
 #define WIN_BAR_SHIFT          13
 
-/* Attributes for RegisterClient -- UNUSED -- */
-#define INFO_MASTER_CLIENT     0x01
-#define INFO_IO_CLIENT         0x02
-#define INFO_MTD_CLIENT                0x04
-#define INFO_MEM_CLIENT                0x08
-#define MAX_NUM_CLIENTS                3
-
-#define INFO_CARD_SHARE                0x10
-#define INFO_CARD_EXCL         0x20
-
-typedef struct cs_status_t {
-    u_char     Function;
-    event_t    CardState;
-    event_t    SocketState;
-} cs_status_t;
-
 typedef struct error_info_t {
     int                func;
     int                retcode;
@@ -330,97 +236,4 @@ typedef struct error_info_t {
 #define CS_EVENT_3VCARD                        0x200000
 #define CS_EVENT_XVCARD                        0x400000
 
-/* Return codes */
-#define CS_SUCCESS             0x00
-#define CS_BAD_ADAPTER         0x01
-#define CS_BAD_ATTRIBUTE       0x02
-#define CS_BAD_BASE            0x03
-#define CS_BAD_EDC             0x04
-#define CS_BAD_IRQ             0x06
-#define CS_BAD_OFFSET          0x07
-#define CS_BAD_PAGE            0x08
-#define CS_READ_FAILURE                0x09
-#define CS_BAD_SIZE            0x0a
-#define CS_BAD_SOCKET          0x0b
-#define CS_BAD_TYPE            0x0d
-#define CS_BAD_VCC             0x0e
-#define CS_BAD_VPP             0x0f
-#define CS_BAD_WINDOW          0x11
-#define CS_WRITE_FAILURE       0x12
-#define CS_NO_CARD             0x14
-#define CS_UNSUPPORTED_FUNCTION        0x15
-#define CS_UNSUPPORTED_MODE    0x16
-#define CS_BAD_SPEED           0x17
-#define CS_BUSY                        0x18
-#define CS_GENERAL_FAILURE     0x19
-#define CS_WRITE_PROTECTED     0x1a
-#define CS_BAD_ARG_LENGTH      0x1b
-#define CS_BAD_ARGS            0x1c
-#define CS_CONFIGURATION_LOCKED        0x1d
-#define CS_IN_USE              0x1e
-#define CS_NO_MORE_ITEMS       0x1f
-#define CS_OUT_OF_RESOURCE     0x20
-#define CS_BAD_HANDLE          0x21
-
-#define CS_BAD_TUPLE           0x40
-
-#ifdef __KERNEL__
-
-/*
- *  The main Card Services entry point
- */
-
-enum service {
-    AccessConfigurationRegister, AddSocketServices,
-    AdjustResourceInfo, CheckEraseQueue, CloseMemory, CopyMemory,
-    DeregisterClient, DeregisterEraseQueue, GetCardServicesInfo,
-    GetClientInfo, GetConfigurationInfo, GetEventMask,
-    GetFirstClient, GetFirstPartion, GetFirstRegion, GetFirstTuple,
-    GetNextClient, GetNextPartition, GetNextRegion, GetNextTuple,
-    GetStatus, GetTupleData, MapLogSocket, MapLogWindow, MapMemPage,
-    MapPhySocket, MapPhyWindow, ModifyConfiguration, ModifyWindow,
-    OpenMemory, ParseTuple, ReadMemory, RegisterClient,
-    RegisterEraseQueue, RegisterMTD, RegisterTimer,
-    ReleaseConfiguration, ReleaseExclusive, ReleaseIO, ReleaseIRQ,
-    ReleaseSocketMask, ReleaseWindow, ReplaceSocketServices,
-    RequestConfiguration, RequestExclusive, RequestIO, RequestIRQ,
-    RequestSocketMask, RequestWindow, ResetCard, ReturnSSEntry,
-    SetEventMask, SetRegion, ValidateCIS, VendorSpecific,
-    WriteMemory, BindDevice, BindMTD, ReportError,
-    SuspendCard, ResumeCard, EjectCard, InsertCard, ReplaceCIS,
-    GetFirstWindow, GetNextWindow, GetMemPage
-};
-
-struct pcmcia_socket;
-
-int pcmcia_access_configuration_register(client_handle_t handle, conf_reg_t *reg);
-int pcmcia_deregister_client(client_handle_t handle);
-int pcmcia_get_configuration_info(client_handle_t handle, config_info_t *config);
-int pcmcia_get_card_services_info(servinfo_t *info);
-int pcmcia_get_first_window(window_handle_t *win, win_req_t *req);
-int pcmcia_get_next_window(window_handle_t *win, win_req_t *req);
-int pcmcia_get_status(client_handle_t handle, cs_status_t *status);
-int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
-int pcmcia_map_mem_page(window_handle_t win, memreq_t *req);
-int pcmcia_modify_configuration(client_handle_t handle, modconf_t *mod);
-int pcmcia_register_client(client_handle_t *handle, client_reg_t *req);
-int pcmcia_release_configuration(client_handle_t handle);
-int pcmcia_release_io(client_handle_t handle, io_req_t *req);
-int pcmcia_release_irq(client_handle_t handle, irq_req_t *req);
-int pcmcia_release_window(window_handle_t win);
-int pcmcia_request_configuration(client_handle_t handle, config_req_t *req);
-int pcmcia_request_io(client_handle_t handle, io_req_t *req);
-int pcmcia_request_irq(client_handle_t handle, irq_req_t *req);
-int pcmcia_request_window(client_handle_t *handle, win_req_t *req, window_handle_t *wh);
-int pcmcia_reset_card(client_handle_t handle, client_req_t *req);
-int pcmcia_suspend_card(struct pcmcia_socket *skt);
-int pcmcia_resume_card(struct pcmcia_socket *skt);
-int pcmcia_eject_card(struct pcmcia_socket *skt);
-int pcmcia_insert_card(struct pcmcia_socket *skt);
-
-struct pcmcia_socket * pcmcia_get_socket(struct pcmcia_socket *skt);
-void pcmcia_put_socket(struct pcmcia_socket *skt);
-
-#endif /* __KERNEL__ */
-
 #endif /* _LINUX_CS_H */