aboutsummaryrefslogtreecommitdiffstats
path: root/include/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'include/pcmcia')
-rw-r--r--include/pcmcia/cs.h17
-rw-r--r--include/pcmcia/ds.h21
2 files changed, 19 insertions, 19 deletions
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index 0cd8c70d8aaa..ad71bb5a8658 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -56,23 +56,6 @@ typedef struct config_req_t {
56#define INT_CARDBUS 0x04 56#define INT_CARDBUS 0x04
57#define INT_ZOOMED_VIDEO 0x08 57#define INT_ZOOMED_VIDEO 0x08
58 58
59/* For RequestIO and ReleaseIO */
60typedef struct io_req_t {
61 u_int BasePort1;
62 u_int NumPorts1;
63 u_int Attributes1;
64 u_int BasePort2;
65 u_int NumPorts2;
66 u_int Attributes2;
67 u_int IOAddrLines;
68} io_req_t;
69
70/* Attributes for RequestIO and ReleaseIO */
71#define IO_DATA_PATH_WIDTH 0x18
72#define IO_DATA_PATH_WIDTH_8 0x00
73#define IO_DATA_PATH_WIDTH_16 0x08
74#define IO_DATA_PATH_WIDTH_AUTO 0x10
75
76/* Bits in IRQInfo1 field */ 59/* Bits in IRQInfo1 field */
77#define IRQ_NMI_ID 0x01 60#define IRQ_NMI_ID 0x01
78#define IRQ_IOCK_ID 0x02 61#define IRQ_IOCK_ID 0x02
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index 3dafd7db34df..0748bec0a87a 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -80,7 +80,6 @@ struct pcmcia_device {
80 struct list_head socket_device_list; 80 struct list_head socket_device_list;
81 81
82 /* deprecated, will be cleaned up soon */ 82 /* deprecated, will be cleaned up soon */
83 io_req_t io;
84 config_req_t conf; 83 config_req_t conf;
85 window_handle_t win; 84 window_handle_t win;
86 85
@@ -88,6 +87,8 @@ struct pcmcia_device {
88 unsigned int irq; 87 unsigned int irq;
89 struct resource *resource[MAX_IO_WIN]; 88 struct resource *resource[MAX_IO_WIN];
90 89
90 unsigned int io_lines; /* number of I/O lines */
91
91 /* Is the device suspended? */ 92 /* Is the device suspended? */
92 u16 suspended:1; 93 u16 suspended:1;
93 94
@@ -179,7 +180,7 @@ int pcmcia_read_config_byte(struct pcmcia_device *p_dev, off_t where, u8 *val);
179int pcmcia_write_config_byte(struct pcmcia_device *p_dev, off_t where, u8 val); 180int pcmcia_write_config_byte(struct pcmcia_device *p_dev, off_t where, u8 val);
180 181
181/* device configuration */ 182/* device configuration */
182int pcmcia_request_io(struct pcmcia_device *p_dev, io_req_t *req); 183int pcmcia_request_io(struct pcmcia_device *p_dev);
183 184
184int __must_check 185int __must_check
185__pcmcia_request_exclusive_irq(struct pcmcia_device *p_dev, 186__pcmcia_request_exclusive_irq(struct pcmcia_device *p_dev,
@@ -206,6 +207,22 @@ int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t win,
206int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod); 207int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod);
207void pcmcia_disable_device(struct pcmcia_device *p_dev); 208void pcmcia_disable_device(struct pcmcia_device *p_dev);
208 209
210/* IO ports */
211#define IO_DATA_PATH_WIDTH 0x18
212#define IO_DATA_PATH_WIDTH_8 0x00
213#define IO_DATA_PATH_WIDTH_16 0x08
214#define IO_DATA_PATH_WIDTH_AUTO 0x10
215
216/* convert flag found in cfgtable to data path width parameter */
217static inline int pcmcia_io_cfg_data_width(unsigned int flags)
218{
219 if (!(flags & CISTPL_IO_8BIT))
220 return IO_DATA_PATH_WIDTH_16;
221 if (!(flags & CISTPL_IO_16BIT))
222 return IO_DATA_PATH_WIDTH_8;
223 return IO_DATA_PATH_WIDTH_AUTO;
224}
225
209#endif /* __KERNEL__ */ 226#endif /* __KERNEL__ */
210 227
211#endif /* _LINUX_DS_H */ 228#endif /* _LINUX_DS_H */