iPXE
pcmcia.h
Go to the documentation of this file.
1 // pcmcia.h - Header file for PCMCIA support
2 
3 #ifndef PCMCIA_H
4 #define PCMCIA_H
5 
6 typedef unsigned char u_char;
7 typedef unsigned short u_short;
8 typedef unsigned int u_int;
9 typedef unsigned long u_long;
10 
11 typedef u_short ioaddr_t;
12 extern int sockets;
13 
14 #define MAXPCCSOCKS 8
15 #define MAXPCCCONFIGS 8
16 
20 
23  int (*f)(interface_func_t,int,int,int,int);
24  char *name;
25 };
26 struct pccsock_t {
28  int drivernum;
30  // Internal usage of the drivers:
32  int flags;
33  int ioaddr;
34  int type;
39  int rmask0;
40 };
41 
42 extern struct pccsock_t pccsock[MAXPCCSOCKS];
43 extern u_int pccsocks;
44 
45 struct pcc_config_t {
48  int iowin;
49  int iolen;
50 };
51 
52 
53 int i82365_interfacer(interface_func_t,int,int,int,void *);
54 void sleepticks(int);
55 
56 #define EINVAL 22
57 
58 
59 //*********************************************************** cc.h:
60 /* Definitions for card status flags for GetStatus */
61 #define SS_WRPROT 0x0001
62 #define SS_CARDLOCK 0x0002
63 #define SS_EJECTION 0x0004
64 #define SS_INSERTION 0x0008
65 #define SS_BATDEAD 0x0010
66 #define SS_BATWARN 0x0020
67 #define SS_READY 0x0040
68 #define SS_DETECT 0x0080
69 #define SS_POWERON 0x0100
70 #define SS_GPI 0x0200
71 #define SS_STSCHG 0x0400
72 #define SS_CARDBUS 0x0800
73 #define SS_3VCARD 0x1000
74 #define SS_XVCARD 0x2000
75 #define SS_PENDING 0x4000
76 
77 /* cc.h: for InquireSocket */
78 typedef struct socket_cap_t {
84  //struct pci_dev *cb_dev;
85  //struct bus_operations *bus;
86  void *cb_dev;
87  void *bus;
88 } socket_cap_t;
89 /* InquireSocket capabilities */
90 #define SS_CAP_PAGE_REGS 0x0001
91 #define SS_CAP_VIRTUAL_BUS 0x0002
92 #define SS_CAP_MEM_ALIGN 0x0004
93 #define SS_CAP_STATIC_MAP 0x0008
94 #define SS_CAP_PCCARD 0x4000
95 #define SS_CAP_CARDBUS 0x8000
96 
97 /* for GetSocket, SetSocket */
98 typedef struct socket_state_t {
104 
106 
107 /* Socket configuration flags */
108 #define SS_PWR_AUTO 0x0010
109 #define SS_IOCARD 0x0020
110 #define SS_RESET 0x0040
111 #define SS_DMA_MODE 0x0080
112 #define SS_SPKR_ENA 0x0100
113 #define SS_OUTPUT_ENA 0x0200
114 #define SS_DEBOUNCED 0x0400 /* Tell driver that the debounce delay has ended */
115 #define SS_ZVCARD 0x0800
116 
117 /* Flags for I/O port and memory windows */
118 #define MAP_ACTIVE 0x01
119 #define MAP_16BIT 0x02
120 #define MAP_AUTOSZ 0x04
121 #define MAP_0WS 0x08
122 #define MAP_WRPROT 0x10
123 #define MAP_ATTRIB 0x20
124 #define MAP_USE_WAIT 0x40
125 #define MAP_PREFETCH 0x80
126 
127 /* Use this just for bridge windows */
128 #define MAP_IOSPACE 0x20
129 
130 typedef struct pccard_io_map {
135 } pccard_io_map;
136 
137 
138 typedef struct pccard_mem_map {
145 
146 typedef struct cb_bridge_map {
150 } cb_bridge_map;
151 // need the global function pointer struct? *TODO*
152 //************************************* end cc.h
153 
154 
155 
156 #endif /* PCMCIA_H */
unsigned int u_int
Definition: pcmcia.h:8
int iowin
Definition: pcmcia.h:48
u_char pci_irq
Definition: pcmcia.h:83
struct socket_cap_t socket_cap_t
u_int pccsocks
Definition: pcmcia.h:18
ioaddr_t start
Definition: pcmcia.h:134
ebpstatus_t
Definition: pcmcia.h:19
void * cb_dev
Definition: pcmcia.h:86
u_int start
Definition: pcmcia.h:149
u_int features
Definition: pcmcia.h:79
u_char index
Definition: pcmcia.h:46
struct pccsock_t pccsock[MAXPCCSOCKS]
int rmask0
Definition: pcmcia.h:39
struct cb_bridge_map cb_bridge_map
struct pccard_mem_map pccard_mem_map
u_int card_start
Definition: pcmcia.h:143
int drivernum
Definition: pcmcia.h:28
u_char flags
Definition: pcmcia.h:132
int stringoffset
Definition: pcmcia.h:37
u_char map
Definition: pcmcia.h:147
Definition: pcmcia.h:17
u_int flags
Definition: pcmcia.h:99
#define MAXPCCSOCKS
Definition: pcmcia.h:14
void * bus
Definition: pcmcia.h:87
ioaddr_t stop
Definition: pcmcia.h:134
u_int map_size
Definition: pcmcia.h:81
u_char io_irq
Definition: pcmcia.h:102
u_char map
Definition: pcmcia.h:139
ebpstatus_t status
Definition: pcmcia.h:29
struct socket_state_t socket_state_t
Definition: pcmcia.h:19
int sockets
int ioaddr
Definition: pcmcia.h:33
int type
Definition: pcmcia.h:34
unsigned short u_short
Definition: pcmcia.h:7
u_int csc_mask
Definition: pcmcia.h:100
u_char flags
Definition: pcmcia.h:148
u_char map
Definition: pcmcia.h:131
ebpdriver_t
Definition: pcmcia.h:17
u_char Vpp
Definition: pcmcia.h:101
socket_state_t dead_socket
int iolen
Definition: pcmcia.h:49
unsigned char u_char
Definition: pcmcia.h:6
u_int irq_mask
Definition: pcmcia.h:80
interface_func_t
Definition: pcmcia.h:18
u_int stringlength
Definition: pcmcia.h:38
u_long sys_start
Definition: pcmcia.h:142
unsigned long u_long
Definition: pcmcia.h:9
u_char Vcc
Definition: pcmcia.h:101
int(* f)(interface_func_t, int, int, int, int)
Definition: pcmcia.h:23
u_short speed
Definition: pcmcia.h:133
u_short speed
Definition: pcmcia.h:141
void sleepticks(int)
ioaddr_t io_offset
Definition: pcmcia.h:82
int i82365_interfacer(interface_func_t, int, int, int, void *)
ebpdriver_t device
Definition: pcmcia.h:27
struct pccard_io_map pccard_io_map
u_char irq
Definition: pcmcia.h:47
int configoffset
Definition: pcmcia.h:35
u_char flags
Definition: pcmcia.h:140
ebpdriver_t id
Definition: pcmcia.h:22
u_long sys_stop
Definition: pcmcia.h:142
int internalid
Definition: pcmcia.h:31
Definition: pcmcia.h:19
int flags
Definition: pcmcia.h:32
Definition: pcmcia.h:19
u_short ioaddr_t
Definition: pcmcia.h:11
u_int stop
Definition: pcmcia.h:149
char * name
Definition: pcmcia.h:24
int possibleconfignum
Definition: pcmcia.h:36