21 #define DRIVER_NAME "spectrum_cs"
22 #define PFX DRIVER_NAME ": "
24 #include <linux/module.h>
25 #include <linux/kernel.h>
39 MODULE_DESCRIPTION(
"Driver for Symbol Spectrum24 Trilogy cards with firmware downloader");
46 static int ignore_cis_vcc;
48 MODULE_PARM_DESC(ignore_cis_vcc,
"Allow voltage mismatch between card and socket");
57 struct pcmcia_device *
p_dev;
64 static int spectrum_cs_config(
struct pcmcia_device *
link);
65 static void spectrum_cs_release(
struct pcmcia_device *
link);
70 #define HCR_MEM16 0x10
78 spectrum_reset(
struct pcmcia_device *
link,
int idle)
135 struct pcmcia_device *
link = card->
p_dev;
138 spectrum_reset(link, 0);
147 struct pcmcia_device *
link = card->
p_dev;
149 return spectrum_reset(link, idle);
157 spectrum_cs_probe(
struct pcmcia_device *
link)
163 spectrum_cs_hard_reset,
164 spectrum_cs_stop_firmware);
173 return spectrum_cs_config(link);
176 static void spectrum_cs_detach(
struct pcmcia_device *link)
182 spectrum_cs_release(link);
187 static int spectrum_cs_config_check(
struct pcmcia_device *p_dev,
190 if (p_dev->config_index == 0)
197 spectrum_cs_config(
struct pcmcia_device *link)
204 link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC |
205 CONF_AUTO_SET_IO | CONF_ENABLE_IRQ;
207 link->config_flags &= ~CONF_AUTO_CHECK_VCC;
208 ret = pcmcia_loop_config(link, spectrum_cs_config_check,
NULL);
212 "CIS configuration. Maybe you need the "
213 "ignore_cis_vcc=1 parameter.\n");
218 resource_size(link->resource[0]));
237 if (spectrum_cs_hard_reset(priv) != 0)
248 link->irq,
NULL) != 0) {
256 spectrum_cs_release(link);
261 spectrum_cs_release(
struct pcmcia_device *link)
268 priv->
hw.ops->lock_irqsave(&priv->
lock, &flags);
270 priv->
hw.ops->unlock_irqrestore(&priv->
lock, &flags);
279 spectrum_cs_suspend(
struct pcmcia_device *link)
291 spectrum_cs_resume(
struct pcmcia_device *link)
305 PCMCIA_DEVICE_MANF_CARD(0x026c, 0x0001),
306 PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0001),
307 PCMCIA_DEVICE_PROD_ID12(
"Intel",
"PRO/Wireless LAN PC Card", 0x816cc815, 0x6fbf459a),
312 static struct pcmcia_driver orinoco_driver = {
315 .probe = spectrum_cs_probe,
316 .remove = spectrum_cs_detach,
317 .suspend = spectrum_cs_suspend,
318 .resume = spectrum_cs_resume,
319 .id_table = spectrum_cs_ids,
323 init_spectrum_cs(
void)
329 exit_spectrum_cs(
void)