diff options
Diffstat (limited to 'drivers/net/wireless/atmel_cs.c')
-rw-r--r-- | drivers/net/wireless/atmel_cs.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index c2746fc7f2be..3b632161c106 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <linux/moduleparam.h> | 42 | #include <linux/moduleparam.h> |
43 | #include <linux/device.h> | 43 | #include <linux/device.h> |
44 | 44 | ||
45 | #include <pcmcia/cs_types.h> | ||
46 | #include <pcmcia/cs.h> | 45 | #include <pcmcia/cs.h> |
47 | #include <pcmcia/cistpl.h> | 46 | #include <pcmcia/cistpl.h> |
48 | #include <pcmcia/cisreg.h> | 47 | #include <pcmcia/cisreg.h> |
@@ -191,25 +190,23 @@ static int atmel_config_check(struct pcmcia_device *p_dev, | |||
191 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | 190 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
192 | 191 | ||
193 | /* IO window settings */ | 192 | /* IO window settings */ |
194 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 193 | p_dev->resource[0]->end = p_dev->resource[1]->end = 0; |
195 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { | 194 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { |
196 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; | 195 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; |
197 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 196 | p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; |
198 | if (!(io->flags & CISTPL_IO_8BIT)) | 197 | p_dev->resource[0]->flags |= |
199 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; | 198 | pcmcia_io_cfg_data_width(io->flags); |
200 | if (!(io->flags & CISTPL_IO_16BIT)) | 199 | p_dev->resource[0]->start = io->win[0].base; |
201 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 200 | p_dev->resource[0]->end = io->win[0].len; |
202 | p_dev->io.BasePort1 = io->win[0].base; | ||
203 | p_dev->io.NumPorts1 = io->win[0].len; | ||
204 | if (io->nwin > 1) { | 201 | if (io->nwin > 1) { |
205 | p_dev->io.Attributes2 = p_dev->io.Attributes1; | 202 | p_dev->resource[1]->flags = p_dev->resource[0]->flags; |
206 | p_dev->io.BasePort2 = io->win[1].base; | 203 | p_dev->resource[1]->start = io->win[1].base; |
207 | p_dev->io.NumPorts2 = io->win[1].len; | 204 | p_dev->resource[1]->end = io->win[1].len; |
208 | } | 205 | } |
209 | } | 206 | } |
210 | 207 | ||
211 | /* This reserves IO space but doesn't actually enable it */ | 208 | /* This reserves IO space but doesn't actually enable it */ |
212 | return pcmcia_request_io(p_dev, &p_dev->io); | 209 | return pcmcia_request_io(p_dev); |
213 | } | 210 | } |
214 | 211 | ||
215 | static int atmel_config(struct pcmcia_device *link) | 212 | static int atmel_config(struct pcmcia_device *link) |
@@ -254,7 +251,7 @@ static int atmel_config(struct pcmcia_device *link) | |||
254 | 251 | ||
255 | ((local_info_t*)link->priv)->eth_dev = | 252 | ((local_info_t*)link->priv)->eth_dev = |
256 | init_atmel_card(link->irq, | 253 | init_atmel_card(link->irq, |
257 | link->io.BasePort1, | 254 | link->resource[0]->start, |
258 | did ? did->driver_info : ATMEL_FW_TYPE_NONE, | 255 | did ? did->driver_info : ATMEL_FW_TYPE_NONE, |
259 | &link->dev, | 256 | &link->dev, |
260 | card_present, | 257 | card_present, |