diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-29 12:35:47 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-09-29 11:20:22 -0400 |
commit | 7feabb6412ea23edd298c0fa90e5aa6733eb4a42 (patch) | |
tree | bfafe961aeb5449a71fbb389172b3a6c68b56e7c /drivers/net/pcmcia | |
parent | 37979e1546a790c44adbc7f27a85569944480ebc (diff) |
pcmcia: move config_{base,index,regs} to struct pcmcia_device
Several drivers prefer to explicitly set config_{base,index,regs},
formerly known as ConfigBase, ConfigIndex and Present. Instead of
passing these values inside config_req_t, store it in struct
pcmcia_device.
CC: netdev@vger.kernel.org
CC: linux-wireless@vger.kernel.org
CC: linux-ide@vger.kernel.org
CC: linux-usb@vger.kernel.org
CC: laforge@gnumonks.org
CC: linux-mtd@lists.infradead.org
CC: alsa-devel@alsa-project.org
CC: linux-serial@vger.kernel.org
CC: Jiri Kosina <jkosina@suse.cz>
CC: linux-scsi@vger.kernel.org
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth)
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/pcmcia')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/3c589_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 22 | ||||
-rw-r--r-- | drivers/net/pcmcia/ibmtr_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/pcmcia/nmclan_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 10 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 2 |
9 files changed, 29 insertions, 29 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 41ecb2728a20..4b670b3da378 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -281,7 +281,7 @@ static int tc574_probe(struct pcmcia_device *link) | |||
281 | link->resource[0]->end = 32; | 281 | link->resource[0]->end = 32; |
282 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; | 282 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; |
283 | link->conf.Attributes = CONF_ENABLE_IRQ; | 283 | link->conf.Attributes = CONF_ENABLE_IRQ; |
284 | link->conf.ConfigIndex = 1; | 284 | link->config_index = 1; |
285 | 285 | ||
286 | dev->netdev_ops = &el3_netdev_ops; | 286 | dev->netdev_ops = &el3_netdev_ops; |
287 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | 287 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 68886729375d..6549e2c496a0 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -217,7 +217,7 @@ static int tc589_probe(struct pcmcia_device *link) | |||
217 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; | 217 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; |
218 | 218 | ||
219 | link->conf.Attributes = CONF_ENABLE_IRQ; | 219 | link->conf.Attributes = CONF_ENABLE_IRQ; |
220 | link->conf.ConfigIndex = 1; | 220 | link->config_index = 1; |
221 | 221 | ||
222 | dev->netdev_ops = &el3_netdev_ops; | 222 | dev->netdev_ops = &el3_netdev_ops; |
223 | dev->watchdog_timeo = TX_TIMEOUT; | 223 | dev->watchdog_timeo = TX_TIMEOUT; |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 4d4928a22b1f..2c273ce6a5d8 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -230,7 +230,7 @@ static int get_prom(struct pcmcia_device *link) | |||
230 | }; | 230 | }; |
231 | 231 | ||
232 | /* Not much of a test, but the alternatives are messy */ | 232 | /* Not much of a test, but the alternatives are messy */ |
233 | if (link->conf.ConfigBase != 0x03c0) | 233 | if (link->config_base != 0x03c0) |
234 | return 0; | 234 | return 0; |
235 | 235 | ||
236 | axnet_reset_8390(dev); | 236 | axnet_reset_8390(dev); |
@@ -297,7 +297,7 @@ static int axnet_configcheck(struct pcmcia_device *p_dev, | |||
297 | if (cfg->index == 0 || cfg->io.nwin == 0) | 297 | if (cfg->index == 0 || cfg->io.nwin == 0) |
298 | return -ENODEV; | 298 | return -ENODEV; |
299 | 299 | ||
300 | p_dev->conf.ConfigIndex = 0x05; | 300 | p_dev->config_index = 0x05; |
301 | /* For multifunction cards, by convention, we configure the | 301 | /* For multifunction cards, by convention, we configure the |
302 | network function with window 0, and serial with window 1 */ | 302 | network function with window 0, and serial with window 1 */ |
303 | if (io->nwin > 1) { | 303 | if (io->nwin > 1) { |
@@ -325,7 +325,7 @@ static int axnet_config(struct pcmcia_device *link) | |||
325 | dev_dbg(&link->dev, "axnet_config(0x%p)\n", link); | 325 | dev_dbg(&link->dev, "axnet_config(0x%p)\n", link); |
326 | 326 | ||
327 | /* don't trust the CIS on this; Linksys got it wrong */ | 327 | /* don't trust the CIS on this; Linksys got it wrong */ |
328 | link->conf.Present = 0x63; | 328 | link->config_regs = 0x63; |
329 | ret = pcmcia_loop_config(link, axnet_configcheck, NULL); | 329 | ret = pcmcia_loop_config(link, axnet_configcheck, NULL); |
330 | if (ret != 0) | 330 | if (ret != 0) |
331 | goto failed; | 331 | goto failed; |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index caf2b2ef4e35..23f5333d8029 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -312,7 +312,7 @@ static int ungermann_try_io_port(struct pcmcia_device *link) | |||
312 | ret = pcmcia_request_io(link); | 312 | ret = pcmcia_request_io(link); |
313 | if (ret == 0) { | 313 | if (ret == 0) { |
314 | /* calculate ConfigIndex value */ | 314 | /* calculate ConfigIndex value */ |
315 | link->conf.ConfigIndex = | 315 | link->config_index = |
316 | ((link->resource[0]->start & 0x0f0) >> 3) | 0x22; | 316 | ((link->resource[0]->start & 0x0f0) >> 3) | 0x22; |
317 | return ret; | 317 | return ret; |
318 | } | 318 | } |
@@ -361,28 +361,28 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
361 | link->card_id == PRODID_TDK_NP9610 || | 361 | link->card_id == PRODID_TDK_NP9610 || |
362 | link->card_id == PRODID_TDK_MN3200) { | 362 | link->card_id == PRODID_TDK_MN3200) { |
363 | /* MultiFunction Card */ | 363 | /* MultiFunction Card */ |
364 | link->conf.ConfigBase = 0x800; | 364 | link->config_base = 0x800; |
365 | link->conf.ConfigIndex = 0x47; | 365 | link->config_index = 0x47; |
366 | link->resource[1]->end = 8; | 366 | link->resource[1]->end = 8; |
367 | } | 367 | } |
368 | break; | 368 | break; |
369 | case MANFID_NEC: | 369 | case MANFID_NEC: |
370 | cardtype = NEC; /* MultiFunction Card */ | 370 | cardtype = NEC; /* MultiFunction Card */ |
371 | link->conf.ConfigBase = 0x800; | 371 | link->config_base = 0x800; |
372 | link->conf.ConfigIndex = 0x47; | 372 | link->config_index = 0x47; |
373 | link->resource[1]->end = 8; | 373 | link->resource[1]->end = 8; |
374 | break; | 374 | break; |
375 | case MANFID_KME: | 375 | case MANFID_KME: |
376 | cardtype = KME; /* MultiFunction Card */ | 376 | cardtype = KME; /* MultiFunction Card */ |
377 | link->conf.ConfigBase = 0x800; | 377 | link->config_base = 0x800; |
378 | link->conf.ConfigIndex = 0x47; | 378 | link->config_index = 0x47; |
379 | link->resource[1]->end = 8; | 379 | link->resource[1]->end = 8; |
380 | break; | 380 | break; |
381 | case MANFID_CONTEC: | 381 | case MANFID_CONTEC: |
382 | cardtype = CONTEC; | 382 | cardtype = CONTEC; |
383 | break; | 383 | break; |
384 | case MANFID_FUJITSU: | 384 | case MANFID_FUJITSU: |
385 | if (link->conf.ConfigBase == 0x0fe0) | 385 | if (link->config_base == 0x0fe0) |
386 | cardtype = MBH10302; | 386 | cardtype = MBH10302; |
387 | else if (link->card_id == PRODID_FUJITSU_MBH10302) | 387 | else if (link->card_id == PRODID_FUJITSU_MBH10302) |
388 | /* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302), | 388 | /* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302), |
@@ -402,10 +402,10 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
402 | case MANFID_FUJITSU: | 402 | case MANFID_FUJITSU: |
403 | if (link->card_id == PRODID_FUJITSU_MBH10304) { | 403 | if (link->card_id == PRODID_FUJITSU_MBH10304) { |
404 | cardtype = XXX10304; /* MBH10304 with buggy CIS */ | 404 | cardtype = XXX10304; /* MBH10304 with buggy CIS */ |
405 | link->conf.ConfigIndex = 0x20; | 405 | link->config_index = 0x20; |
406 | } else { | 406 | } else { |
407 | cardtype = MBH10302; /* NextCom NC5310, etc. */ | 407 | cardtype = MBH10302; /* NextCom NC5310, etc. */ |
408 | link->conf.ConfigIndex = 1; | 408 | link->config_index = 1; |
409 | } | 409 | } |
410 | break; | 410 | break; |
411 | case MANFID_UNGERMANN: | 411 | case MANFID_UNGERMANN: |
@@ -413,7 +413,7 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
413 | break; | 413 | break; |
414 | default: | 414 | default: |
415 | cardtype = MBH10302; | 415 | cardtype = MBH10302; |
416 | link->conf.ConfigIndex = 1; | 416 | link->config_index = 1; |
417 | } | 417 | } |
418 | } | 418 | } |
419 | 419 | ||
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c index 1327f086d86b..feedeeb17a52 100644 --- a/drivers/net/pcmcia/ibmtr_cs.c +++ b/drivers/net/pcmcia/ibmtr_cs.c | |||
@@ -153,7 +153,7 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link) | |||
153 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; | 153 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; |
154 | link->resource[0]->end = 4; | 154 | link->resource[0]->end = 4; |
155 | link->conf.Attributes = CONF_ENABLE_IRQ; | 155 | link->conf.Attributes = CONF_ENABLE_IRQ; |
156 | link->conf.Present = PRESENT_OPTION; | 156 | link->config_regs = PRESENT_OPTION; |
157 | 157 | ||
158 | info->dev = dev; | 158 | info->dev = dev; |
159 | 159 | ||
@@ -212,8 +212,8 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) | |||
212 | 212 | ||
213 | dev_dbg(&link->dev, "ibmtr_config\n"); | 213 | dev_dbg(&link->dev, "ibmtr_config\n"); |
214 | 214 | ||
215 | link->conf.ConfigIndex = 0x61; | ||
216 | link->io_lines = 16; | 215 | link->io_lines = 16; |
216 | link->config_index = 0x61; | ||
217 | 217 | ||
218 | /* Determine if this is PRIMARY or ALTERNATE. */ | 218 | /* Determine if this is PRIMARY or ALTERNATE. */ |
219 | 219 | ||
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index 90d172804bfc..98c4a6976045 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -461,8 +461,8 @@ static int nmclan_probe(struct pcmcia_device *link) | |||
461 | link->resource[0]->end = 32; | 461 | link->resource[0]->end = 32; |
462 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; | 462 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
463 | link->conf.Attributes = CONF_ENABLE_IRQ; | 463 | link->conf.Attributes = CONF_ENABLE_IRQ; |
464 | link->conf.ConfigIndex = 1; | 464 | link->config_index = 1; |
465 | link->conf.Present = PRESENT_OPTION; | 465 | link->config_regs = PRESENT_OPTION; |
466 | 466 | ||
467 | lp->tx_free_frames=AM2150_MAX_TX_FRAMES; | 467 | lp->tx_free_frames=AM2150_MAX_TX_FRAMES; |
468 | 468 | ||
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 69135761719a..68c46751f84f 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -420,7 +420,7 @@ static hw_info_t *get_ax88190(struct pcmcia_device *link) | |||
420 | int i, j; | 420 | int i, j; |
421 | 421 | ||
422 | /* Not much of a test, but the alternatives are messy */ | 422 | /* Not much of a test, but the alternatives are messy */ |
423 | if (link->conf.ConfigBase != 0x03c0) | 423 | if (link->config_base != 0x03c0) |
424 | return NULL; | 424 | return NULL; |
425 | 425 | ||
426 | outb_p(0x01, ioaddr + EN0_DCFG); /* Set word-wide access. */ | 426 | outb_p(0x01, ioaddr + EN0_DCFG); /* Set word-wide access. */ |
@@ -564,7 +564,7 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link, | |||
564 | 564 | ||
565 | if ((link->manf_id == MANFID_IBM) && | 565 | if ((link->manf_id == MANFID_IBM) && |
566 | (link->card_id == PRODID_IBM_HOME_AND_AWAY)) | 566 | (link->card_id == PRODID_IBM_HOME_AND_AWAY)) |
567 | link->conf.ConfigIndex |= 0x10; | 567 | link->config_index |= 0x10; |
568 | 568 | ||
569 | ret = pcmcia_request_configuration(link, &link->conf); | 569 | ret = pcmcia_request_configuration(link, &link->conf); |
570 | if (ret) | 570 | if (ret) |
@@ -581,7 +581,7 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link, | |||
581 | } else | 581 | } else |
582 | dev->if_port = 0; | 582 | dev->if_port = 0; |
583 | 583 | ||
584 | if ((link->conf.ConfigBase == 0x03c0) && | 584 | if ((link->config_base == 0x03c0) && |
585 | (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) { | 585 | (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) { |
586 | dev_info(&link->dev, | 586 | dev_info(&link->dev, |
587 | "this is an AX88190 card - use axnet_cs instead.\n"); | 587 | "this is an AX88190 card - use axnet_cs instead.\n"); |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 2c2a8788c078..59f5034e8d93 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -411,9 +411,9 @@ static int mhz_3288_power(struct pcmcia_device *link) | |||
411 | mdelay(200); | 411 | mdelay(200); |
412 | 412 | ||
413 | /* Now read and write the COR... */ | 413 | /* Now read and write the COR... */ |
414 | tmp = readb(smc->base + link->conf.ConfigBase + CISREG_COR); | 414 | tmp = readb(smc->base + link->config_base + CISREG_COR); |
415 | udelay(5); | 415 | udelay(5); |
416 | writeb(tmp, smc->base + link->conf.ConfigBase + CISREG_COR); | 416 | writeb(tmp, smc->base + link->config_base + CISREG_COR); |
417 | 417 | ||
418 | return 0; | 418 | return 0; |
419 | } | 419 | } |
@@ -464,7 +464,7 @@ static int mhz_mfc_config(struct pcmcia_device *link) | |||
464 | 464 | ||
465 | smc->base = ioremap(link->resource[2]->start, | 465 | smc->base = ioremap(link->resource[2]->start, |
466 | resource_size(link->resource[2])); | 466 | resource_size(link->resource[2])); |
467 | offset = (smc->manfid == MANFID_MOTOROLA) ? link->conf.ConfigBase : 0; | 467 | offset = (smc->manfid == MANFID_MOTOROLA) ? link->config_base : 0; |
468 | i = pcmcia_map_mem_page(link, link->resource[2], offset); | 468 | i = pcmcia_map_mem_page(link, link->resource[2], offset); |
469 | if ((i == 0) && | 469 | if ((i == 0) && |
470 | (smc->manfid == MANFID_MEGAHERTZ) && | 470 | (smc->manfid == MANFID_MEGAHERTZ) && |
@@ -643,8 +643,8 @@ static int osi_config(struct pcmcia_device *link) | |||
643 | link->resource[1]->end = 8; | 643 | link->resource[1]->end = 8; |
644 | 644 | ||
645 | /* Enable Hard Decode, LAN, Modem */ | 645 | /* Enable Hard Decode, LAN, Modem */ |
646 | link->conf.ConfigIndex = 0x23; | ||
647 | link->io_lines = 16; | 646 | link->io_lines = 16; |
647 | link->config_index = 0x23; | ||
648 | 648 | ||
649 | for (i = j = 0; j < 4; j++) { | 649 | for (i = j = 0; j < 4; j++) { |
650 | link->resource[1]->start = com[j]; | 650 | link->resource[1]->start = com[j]; |
@@ -654,7 +654,7 @@ static int osi_config(struct pcmcia_device *link) | |||
654 | } | 654 | } |
655 | if (i != 0) { | 655 | if (i != 0) { |
656 | /* Fallback: turn off hard decode */ | 656 | /* Fallback: turn off hard decode */ |
657 | link->conf.ConfigIndex = 0x03; | 657 | link->config_index = 0x03; |
658 | link->resource[1]->end = 0; | 658 | link->resource[1]->end = 0; |
659 | i = pcmcia_request_io(link); | 659 | i = pcmcia_request_io(link); |
660 | } | 660 | } |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index 1776f49e0917..1c8ebf2df0c0 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -530,7 +530,7 @@ xirc2ps_probe(struct pcmcia_device *link) | |||
530 | 530 | ||
531 | /* General socket configuration */ | 531 | /* General socket configuration */ |
532 | link->conf.Attributes = CONF_ENABLE_IRQ; | 532 | link->conf.Attributes = CONF_ENABLE_IRQ; |
533 | link->conf.ConfigIndex = 1; | 533 | link->config_index = 1; |
534 | 534 | ||
535 | /* Fill in card specific entries */ | 535 | /* Fill in card specific entries */ |
536 | dev->netdev_ops = &netdev_ops; | 536 | dev->netdev_ops = &netdev_ops; |