aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/elsa_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hisax/elsa_cs.c')
-rw-r--r--drivers/isdn/hisax/elsa_cs.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index 218927e3a4ea..b3c08aaf41c4 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -46,7 +46,6 @@
46#include <asm/io.h> 46#include <asm/io.h>
47#include <asm/system.h> 47#include <asm/system.h>
48 48
49#include <pcmcia/cs_types.h>
50#include <pcmcia/cs.h> 49#include <pcmcia/cs.h>
51#include <pcmcia/cistpl.h> 50#include <pcmcia/cistpl.h>
52#include <pcmcia/cisreg.h> 51#include <pcmcia/cisreg.h>
@@ -127,9 +126,8 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link)
127 and attributes of IO windows) are fixed by the nature of the 126 and attributes of IO windows) are fixed by the nature of the
128 device, and can be hard-wired here. 127 device, and can be hard-wired here.
129 */ 128 */
130 link->io.NumPorts1 = 8; 129 link->resource[0]->end = 8;
131 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 130 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
132 link->io.IOAddrLines = 3;
133 131
134 link->conf.Attributes = CONF_ENABLE_IRQ; 132 link->conf.Attributes = CONF_ENABLE_IRQ;
135 link->conf.IntType = INT_MEMORY_AND_IO; 133 link->conf.IntType = INT_MEMORY_AND_IO;
@@ -174,16 +172,18 @@ static int elsa_cs_configcheck(struct pcmcia_device *p_dev,
174{ 172{
175 int j; 173 int j;
176 174
175 p_dev->io_lines = 3;
176
177 if ((cf->io.nwin > 0) && cf->io.win[0].base) { 177 if ((cf->io.nwin > 0) && cf->io.win[0].base) {
178 printk(KERN_INFO "(elsa_cs: looks like the 96 model)\n"); 178 printk(KERN_INFO "(elsa_cs: looks like the 96 model)\n");
179 p_dev->io.BasePort1 = cf->io.win[0].base; 179 p_dev->resource[0]->start = cf->io.win[0].base;
180 if (!pcmcia_request_io(p_dev, &p_dev->io)) 180 if (!pcmcia_request_io(p_dev))
181 return 0; 181 return 0;
182 } else { 182 } else {
183 printk(KERN_INFO "(elsa_cs: looks like the 97 model)\n"); 183 printk(KERN_INFO "(elsa_cs: looks like the 97 model)\n");
184 for (j = 0x2f0; j > 0x100; j -= 0x10) { 184 for (j = 0x2f0; j > 0x100; j -= 0x10) {
185 p_dev->io.BasePort1 = j; 185 p_dev->resource[0]->start = j;
186 if (!pcmcia_request_io(p_dev, &p_dev->io)) 186 if (!pcmcia_request_io(p_dev))
187 return 0; 187 return 0;
188 } 188 }
189 } 189 }
@@ -215,23 +215,21 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)
215 link->conf.ConfigIndex); 215 link->conf.ConfigIndex);
216 if (link->conf.Attributes & CONF_ENABLE_IRQ) 216 if (link->conf.Attributes & CONF_ENABLE_IRQ)
217 printk(", irq %d", link->irq); 217 printk(", irq %d", link->irq);
218 if (link->io.NumPorts1) 218 if (link->resource[0])
219 printk(", io 0x%04x-0x%04x", link->io.BasePort1, 219 printk(" & %pR", link->resource[0]);
220 link->io.BasePort1+link->io.NumPorts1-1); 220 if (link->resource[1])
221 if (link->io.NumPorts2) 221 printk(" & %pR", link->resource[1]);
222 printk(" & 0x%04x-0x%04x", link->io.BasePort2,
223 link->io.BasePort2+link->io.NumPorts2-1);
224 printk("\n"); 222 printk("\n");
225 223
226 icard.para[0] = link->irq; 224 icard.para[0] = link->irq;
227 icard.para[1] = link->io.BasePort1; 225 icard.para[1] = link->resource[0]->start;
228 icard.protocol = protocol; 226 icard.protocol = protocol;
229 icard.typ = ISDN_CTYPE_ELSA_PCMCIA; 227 icard.typ = ISDN_CTYPE_ELSA_PCMCIA;
230 228
231 i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard); 229 i = hisax_init_pcmcia(link, &(((local_info_t*)link->priv)->busy), &icard);
232 if (i < 0) { 230 if (i < 0) {
233 printk(KERN_ERR "elsa_cs: failed to initialize Elsa PCMCIA %d at i/o %#x\n", 231 printk(KERN_ERR "elsa_cs: failed to initialize Elsa "
234 i, link->io.BasePort1); 232 "PCMCIA %d with %pR\n", i, link->resource[0]);
235 elsa_cs_release(link); 233 elsa_cs_release(link);
236 } else 234 } else
237 ((local_info_t*)link->priv)->cardnr = i; 235 ((local_info_t*)link->priv)->cardnr = i;