diff options
Diffstat (limited to 'include/pcmcia')
-rw-r--r-- | include/pcmcia/ds.h | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 0577e5f10304..0b8c8d45df47 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -93,6 +93,7 @@ struct pcmcia_device { | |||
93 | /* device setup */ | 93 | /* device setup */ |
94 | unsigned int irq; | 94 | unsigned int irq; |
95 | struct resource *resource[PCMCIA_NUM_RESOURCES]; | 95 | struct resource *resource[PCMCIA_NUM_RESOURCES]; |
96 | resource_size_t card_addr; /* for the 1st IOMEM resource */ | ||
96 | unsigned int vpp; | 97 | unsigned int vpp; |
97 | 98 | ||
98 | unsigned int config_flags; /* CONF_ENABLE_ flags below */ | 99 | unsigned int config_flags; /* CONF_ENABLE_ flags below */ |
@@ -175,8 +176,6 @@ int pcmcia_parse_tuple(tuple_t *tuple, cisparse_t *parse); | |||
175 | /* loop CIS entries for valid configuration */ | 176 | /* loop CIS entries for valid configuration */ |
176 | int pcmcia_loop_config(struct pcmcia_device *p_dev, | 177 | int pcmcia_loop_config(struct pcmcia_device *p_dev, |
177 | int (*conf_check) (struct pcmcia_device *p_dev, | 178 | int (*conf_check) (struct pcmcia_device *p_dev, |
178 | cistpl_cftable_entry_t *cf, | ||
179 | cistpl_cftable_entry_t *dflt, | ||
180 | void *priv_data), | 179 | void *priv_data), |
181 | void *priv_data); | 180 | void *priv_data); |
182 | 181 | ||
@@ -225,16 +224,6 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev); | |||
225 | #define IO_DATA_PATH_WIDTH_16 0x08 | 224 | #define IO_DATA_PATH_WIDTH_16 0x08 |
226 | #define IO_DATA_PATH_WIDTH_AUTO 0x10 | 225 | #define IO_DATA_PATH_WIDTH_AUTO 0x10 |
227 | 226 | ||
228 | /* convert flag found in cfgtable to data path width parameter */ | ||
229 | static inline int pcmcia_io_cfg_data_width(unsigned int flags) | ||
230 | { | ||
231 | if (!(flags & CISTPL_IO_8BIT)) | ||
232 | return IO_DATA_PATH_WIDTH_16; | ||
233 | if (!(flags & CISTPL_IO_16BIT)) | ||
234 | return IO_DATA_PATH_WIDTH_8; | ||
235 | return IO_DATA_PATH_WIDTH_AUTO; | ||
236 | } | ||
237 | |||
238 | /* IO memory */ | 227 | /* IO memory */ |
239 | #define WIN_MEMORY_TYPE_CM 0x00 /* default */ | 228 | #define WIN_MEMORY_TYPE_CM 0x00 /* default */ |
240 | #define WIN_MEMORY_TYPE_AM 0x20 /* MAP_ATTRIB */ | 229 | #define WIN_MEMORY_TYPE_AM 0x20 /* MAP_ATTRIB */ |
@@ -264,16 +253,17 @@ static inline int pcmcia_io_cfg_data_width(unsigned int flags) | |||
264 | #define PRESENT_IOSIZE 0x200 | 253 | #define PRESENT_IOSIZE 0x200 |
265 | 254 | ||
266 | /* flags to be passed to pcmcia_enable_device() */ | 255 | /* flags to be passed to pcmcia_enable_device() */ |
267 | #define CONF_ENABLE_IRQ 0x01 | 256 | #define CONF_ENABLE_IRQ 0x0001 |
268 | #define CONF_ENABLE_SPKR 0x02 | 257 | #define CONF_ENABLE_SPKR 0x0002 |
269 | #define CONF_ENABLE_PULSE_IRQ 0x04 | 258 | #define CONF_ENABLE_PULSE_IRQ 0x0004 |
270 | #define CONF_ENABLE_ESR 0x08 | 259 | #define CONF_ENABLE_ESR 0x0008 |
271 | 260 | ||
272 | /* flags used by pcmcia_loop_config() autoconfiguration */ | 261 | /* flags used by pcmcia_loop_config() autoconfiguration */ |
273 | #define CONF_AUTO_CHECK_VCC 0x10 /* check for matching Vcc? */ | 262 | #define CONF_AUTO_CHECK_VCC 0x0100 /* check for matching Vcc? */ |
274 | #define CONF_AUTO_SET_VPP 0x20 /* set Vpp? */ | 263 | #define CONF_AUTO_SET_VPP 0x0200 /* set Vpp? */ |
275 | #define CONF_AUTO_AUDIO 0x40 /* enable audio line? */ | 264 | #define CONF_AUTO_AUDIO 0x0400 /* enable audio line? */ |
276 | 265 | #define CONF_AUTO_SET_IO 0x0800 /* set ->resource[0,1] */ | |
266 | #define CONF_AUTO_SET_IOMEM 0x1000 /* set ->resource[2] */ | ||
277 | 267 | ||
278 | #endif /* __KERNEL__ */ | 268 | #endif /* __KERNEL__ */ |
279 | 269 | ||