ds.h (e199e6136ce6b151e6638ae93dca60748424d900) | ds.h (cdb138080b78146d1cdadba9f5dadbeb97445b91) |
---|---|
1/* 2 * ds.h -- 16-bit PCMCIA core support 3 * 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. 7 * 8 * The initial developer of the original code is David A. Hinds --- 22 unchanged lines hidden (view full) --- 31 * PCMCIA device drivers (16-bit cards only; 32-bit cards require CardBus 32 * a.k.a. PCI drivers 33 */ 34struct pcmcia_socket; 35struct pcmcia_device; 36struct config_t; 37struct net_device; 38 | 1/* 2 * ds.h -- 16-bit PCMCIA core support 3 * 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. 7 * 8 * The initial developer of the original code is David A. Hinds --- 22 unchanged lines hidden (view full) --- 31 * PCMCIA device drivers (16-bit cards only; 32-bit cards require CardBus 32 * a.k.a. PCI drivers 33 */ 34struct pcmcia_socket; 35struct pcmcia_device; 36struct config_t; 37struct net_device; 38 |
39typedef struct resource *window_handle_t; 40 | |
41/* dynamic device IDs for PCMCIA device drivers. See 42 * Documentation/pcmcia/driver.txt for details. 43*/ 44struct pcmcia_dynids { 45 struct mutex lock; 46 struct list_head list; 47}; 48 --- 38 unchanged lines hidden (view full) --- 87 * share one hardware "function" device. */ 88 u8 func; 89 struct config_t *function_config; 90 91 struct list_head socket_device_list; 92 93 /* deprecated, will be cleaned up soon */ 94 config_req_t conf; | 39/* dynamic device IDs for PCMCIA device drivers. See 40 * Documentation/pcmcia/driver.txt for details. 41*/ 42struct pcmcia_dynids { 43 struct mutex lock; 44 struct list_head list; 45}; 46 --- 38 unchanged lines hidden (view full) --- 85 * share one hardware "function" device. */ 86 u8 func; 87 struct config_t *function_config; 88 89 struct list_head socket_device_list; 90 91 /* deprecated, will be cleaned up soon */ 92 config_req_t conf; |
95 window_handle_t win; | |
96 97 /* device setup */ 98 unsigned int irq; 99 struct resource *resource[PCMCIA_NUM_RESOURCES]; 100 101 unsigned int io_lines; /* number of I/O lines */ 102 103 /* Is the device suspended? */ --- 100 unchanged lines hidden (view full) --- 204} 205 206int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev, 207 irq_handler_t handler); 208 209int pcmcia_request_configuration(struct pcmcia_device *p_dev, 210 config_req_t *req); 211 | 93 94 /* device setup */ 95 unsigned int irq; 96 struct resource *resource[PCMCIA_NUM_RESOURCES]; 97 98 unsigned int io_lines; /* number of I/O lines */ 99 100 /* Is the device suspended? */ --- 100 unchanged lines hidden (view full) --- 201} 202 203int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev, 204 irq_handler_t handler); 205 206int pcmcia_request_configuration(struct pcmcia_device *p_dev, 207 config_req_t *req); 208 |
212int pcmcia_request_window(struct pcmcia_device *p_dev, win_req_t *req, 213 window_handle_t *wh); 214int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t win); 215int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t win, | 209int pcmcia_request_window(struct pcmcia_device *p_dev, struct resource *res, 210 unsigned int speed); 211int pcmcia_release_window(struct pcmcia_device *p_dev, struct resource *res); 212int pcmcia_map_mem_page(struct pcmcia_device *p_dev, struct resource *res, |
216 unsigned int offset); 217 218int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); 219void pcmcia_disable_device(struct pcmcia_device *p_dev); 220 221/* IO ports */ 222#define IO_DATA_PATH_WIDTH 0x18 223#define IO_DATA_PATH_WIDTH_8 0x00 --- 5 unchanged lines hidden (view full) --- 229{ 230 if (!(flags & CISTPL_IO_8BIT)) 231 return IO_DATA_PATH_WIDTH_16; 232 if (!(flags & CISTPL_IO_16BIT)) 233 return IO_DATA_PATH_WIDTH_8; 234 return IO_DATA_PATH_WIDTH_AUTO; 235} 236 | 213 unsigned int offset); 214 215int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); 216void pcmcia_disable_device(struct pcmcia_device *p_dev); 217 218/* IO ports */ 219#define IO_DATA_PATH_WIDTH 0x18 220#define IO_DATA_PATH_WIDTH_8 0x00 --- 5 unchanged lines hidden (view full) --- 226{ 227 if (!(flags & CISTPL_IO_8BIT)) 228 return IO_DATA_PATH_WIDTH_16; 229 if (!(flags & CISTPL_IO_16BIT)) 230 return IO_DATA_PATH_WIDTH_8; 231 return IO_DATA_PATH_WIDTH_AUTO; 232} 233 |
234/* IO memory */ 235#define WIN_MEMORY_TYPE_CM 0x00 /* default */ 236#define WIN_MEMORY_TYPE_AM 0x20 /* MAP_ATTRIB */ 237#define WIN_DATA_WIDTH_8 0x00 /* default */ 238#define WIN_DATA_WIDTH_16 0x02 /* MAP_16BIT */ 239#define WIN_ENABLE 0x01 /* MAP_ACTIVE */ 240#define WIN_USE_WAIT 0x40 /* MAP_USE_WAIT */ 241 242#define WIN_FLAGS_MAP 0x63 /* MAP_ATTRIB | MAP_16BIT | MAP_ACTIVE | 243 MAP_USE_WAIT */ 244#define WIN_FLAGS_REQ 0x1c /* mapping to socket->win[i]: 245 0x04 -> 0 246 0x08 -> 1 247 0x0c -> 2 248 0x10 -> 3 */ 249 250 |
|
237#endif /* __KERNEL__ */ 238 239#endif /* _LINUX_DS_H */ | 251#endif /* __KERNEL__ */ 252 253#endif /* _LINUX_DS_H */ |