diff options
45 files changed, 107 insertions, 112 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index 4cb2dfebde80..08f4818ad9f7 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
| @@ -885,7 +885,7 @@ static int bluecard_config(struct pcmcia_device *link) | |||
| 885 | bluecard_info_t *info = link->priv; | 885 | bluecard_info_t *info = link->priv; |
| 886 | int i, n; | 886 | int i, n; |
| 887 | 887 | ||
| 888 | link->conf.ConfigIndex = 0x20; | 888 | link->config_index = 0x20; |
| 889 | 889 | ||
| 890 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; | 890 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; |
| 891 | link->resource[0]->end = 64; | 891 | link->resource[0]->end = 64; |
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index 0f0be4df7b7c..05c4e6834a6b 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c | |||
| @@ -92,7 +92,7 @@ static int ipwireless_probe(struct pcmcia_device *p_dev, | |||
| 92 | 92 | ||
| 93 | /* 0x40 causes it to generate level mode interrupts. */ | 93 | /* 0x40 causes it to generate level mode interrupts. */ |
| 94 | /* 0x04 enables IREQ pin. */ | 94 | /* 0x04 enables IREQ pin. */ |
| 95 | p_dev->conf.ConfigIndex = cfg->index | 0x44; | 95 | p_dev->config_index = cfg->index | 0x44; |
| 96 | p_dev->io_lines = 16; | 96 | p_dev->io_lines = 16; |
| 97 | ret = pcmcia_request_io(p_dev); | 97 | ret = pcmcia_request_io(p_dev); |
| 98 | if (ret) | 98 | if (ret) |
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index ba7ccf5701ed..535aa0899e9f 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
| @@ -594,8 +594,8 @@ static int mgslpc_config(struct pcmcia_device *link) | |||
| 594 | goto failed; | 594 | goto failed; |
| 595 | 595 | ||
| 596 | link->conf.Attributes = CONF_ENABLE_IRQ; | 596 | link->conf.Attributes = CONF_ENABLE_IRQ; |
| 597 | link->conf.ConfigIndex = 8; | 597 | link->config_index = 8; |
| 598 | link->conf.Present = PRESENT_OPTION; | 598 | link->config_regs = PRESENT_OPTION; |
| 599 | 599 | ||
| 600 | ret = pcmcia_request_irq(link, mgslpc_isr); | 600 | ret = pcmcia_request_irq(link, mgslpc_isr); |
| 601 | if (ret) | 601 | if (ret) |
| @@ -608,7 +608,7 @@ static int mgslpc_config(struct pcmcia_device *link) | |||
| 608 | info->irq_level = link->irq; | 608 | info->irq_level = link->irq; |
| 609 | 609 | ||
| 610 | dev_info(&link->dev, "index 0x%02x:", | 610 | dev_info(&link->dev, "index 0x%02x:", |
| 611 | link->conf.ConfigIndex); | 611 | link->config_index); |
| 612 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 612 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 613 | printk(", irq %d", link->irq); | 613 | printk(", irq %d", link->irq); |
| 614 | if (link->resource[0]) | 614 | if (link->resource[0]) |
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index cf7cb4953aa5..07e37876559c 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
| @@ -227,8 +227,7 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev, | |||
| 227 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { | 227 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { |
| 228 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; | 228 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; |
| 229 | pdev->io_lines = io->flags & CISTPL_IO_LINES_MASK; | 229 | pdev->io_lines = io->flags & CISTPL_IO_LINES_MASK; |
| 230 | 230 | pdev->config_index = cfg->index; | |
| 231 | pdev->conf.ConfigIndex = cfg->index; | ||
| 232 | pdev->resource[0]->start = io->win[0].base; | 231 | pdev->resource[0]->start = io->win[0].base; |
| 233 | if (!(io->flags & CISTPL_IO_16BIT)) { | 232 | if (!(io->flags & CISTPL_IO_16BIT)) { |
| 234 | pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; | 233 | pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; |
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c index 938ca4155c3b..2d8bbbf286aa 100644 --- a/drivers/isdn/hardware/avm/avm_cs.c +++ b/drivers/isdn/hardware/avm/avm_cs.c | |||
| @@ -80,8 +80,8 @@ static int avmcs_probe(struct pcmcia_device *p_dev) | |||
| 80 | 80 | ||
| 81 | /* General socket configuration */ | 81 | /* General socket configuration */ |
| 82 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 82 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
| 83 | p_dev->conf.ConfigIndex = 1; | 83 | p_dev->config_index = 1; |
| 84 | p_dev->conf.Present = PRESENT_OPTION; | 84 | p_dev->config_regs = PRESENT_OPTION; |
| 85 | 85 | ||
| 86 | return avmcs_config(p_dev); | 86 | return avmcs_config(p_dev); |
| 87 | } /* avmcs_attach */ | 87 | } /* avmcs_attach */ |
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c index 7d5ff20b5d5b..e25f6c7376ed 100644 --- a/drivers/isdn/hisax/avma1_cs.c +++ b/drivers/isdn/hisax/avma1_cs.c | |||
| @@ -85,8 +85,8 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) | |||
| 85 | 85 | ||
| 86 | /* General socket configuration */ | 86 | /* General socket configuration */ |
| 87 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 87 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
| 88 | p_dev->conf.ConfigIndex = 1; | 88 | p_dev->config_index = 1; |
| 89 | p_dev->conf.Present = PRESENT_OPTION; | 89 | p_dev->config_regs = PRESENT_OPTION; |
| 90 | 90 | ||
| 91 | return avma1cs_config(p_dev); | 91 | return avma1cs_config(p_dev); |
| 92 | } /* avma1cs_attach */ | 92 | } /* avma1cs_attach */ |
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c index df360c8b31cb..f276e8428960 100644 --- a/drivers/isdn/hisax/elsa_cs.c +++ b/drivers/isdn/hisax/elsa_cs.c | |||
| @@ -211,7 +211,7 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link) | |||
| 211 | 211 | ||
| 212 | /* Finally, report what we've done */ | 212 | /* Finally, report what we've done */ |
| 213 | dev_info(&link->dev, "index 0x%02x: ", | 213 | dev_info(&link->dev, "index 0x%02x: ", |
| 214 | link->conf.ConfigIndex); | 214 | link->config_index); |
| 215 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 215 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 216 | printk(", irq %d", link->irq); | 216 | printk(", irq %d", link->irq); |
| 217 | if (link->resource[0]) | 217 | if (link->resource[0]) |
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c index 169061fbca98..43d0a4e97ead 100644 --- a/drivers/isdn/hisax/sedlbauer_cs.c +++ b/drivers/isdn/hisax/sedlbauer_cs.c | |||
| @@ -253,7 +253,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) | |||
| 253 | 253 | ||
| 254 | /* Finally, report what we've done */ | 254 | /* Finally, report what we've done */ |
| 255 | dev_info(&link->dev, "index 0x%02x:", | 255 | dev_info(&link->dev, "index 0x%02x:", |
| 256 | link->conf.ConfigIndex); | 256 | link->config_index); |
| 257 | if (link->vpp) | 257 | if (link->vpp) |
| 258 | printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); | 258 | printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); |
| 259 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 259 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index 46e72a1eed2d..614afc64b5b1 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
| @@ -191,7 +191,7 @@ static int __devinit teles_cs_config(struct pcmcia_device *link) | |||
| 191 | 191 | ||
| 192 | /* Finally, report what we've done */ | 192 | /* Finally, report what we've done */ |
| 193 | dev_info(&link->dev, "index 0x%02x:", | 193 | dev_info(&link->dev, "index 0x%02x:", |
| 194 | link->conf.ConfigIndex); | 194 | link->config_index); |
| 195 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 195 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 196 | printk(", irq %d", link->irq); | 196 | printk(", irq %d", link->irq); |
| 197 | if (link->resource[0]) | 197 | if (link->resource[0]) |
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 663b48bc657c..99c7257363d6 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
| @@ -575,7 +575,7 @@ static int pcmciamtd_config(struct pcmcia_device *link) | |||
| 575 | link->vpp = 0; | 575 | link->vpp = 0; |
| 576 | } | 576 | } |
| 577 | 577 | ||
| 578 | link->conf.ConfigIndex = 0; | 578 | link->config_index = 0; |
| 579 | DEBUG(2, "Setting Configuration"); | 579 | DEBUG(2, "Setting Configuration"); |
| 580 | ret = pcmcia_request_configuration(link, &link->conf); | 580 | ret = pcmcia_request_configuration(link, &link->conf); |
| 581 | if (ret != 0) { | 581 | if (ret != 0) { |
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; |
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index ccb2fdde002c..40f9ed760bb3 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
| @@ -240,7 +240,7 @@ static int airo_config(struct pcmcia_device *link) | |||
| 240 | 240 | ||
| 241 | /* Finally, report what we've done */ | 241 | /* Finally, report what we've done */ |
| 242 | dev_info(&link->dev, "index 0x%02x: ", | 242 | dev_info(&link->dev, "index 0x%02x: ", |
| 243 | link->conf.ConfigIndex); | 243 | link->config_index); |
| 244 | if (link->vpp) | 244 | if (link->vpp) |
| 245 | printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); | 245 | printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); |
| 246 | printk(", irq %d", link->irq); | 246 | printk(", irq %d", link->irq); |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 0fe6f82cda58..5704d3f9e1b7 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
| @@ -601,7 +601,7 @@ static int prism2_config(struct pcmcia_device *link) | |||
| 601 | 601 | ||
| 602 | /* Finally, report what we've done */ | 602 | /* Finally, report what we've done */ |
| 603 | printk(KERN_INFO "%s: index 0x%02x: ", | 603 | printk(KERN_INFO "%s: index 0x%02x: ", |
| 604 | dev_info, link->conf.ConfigIndex); | 604 | dev_info, link->config_index); |
| 605 | if (link->vpp) | 605 | if (link->vpp) |
| 606 | printk(", Vpp %d.%d", link->vpp / 10, | 606 | printk(", Vpp %d.%d", link->vpp / 10, |
| 607 | link->vpp % 10); | 607 | link->vpp % 10); |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 30cfd8890e34..7fb66cc1e9fd 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
| @@ -319,7 +319,7 @@ static int ray_probe(struct pcmcia_device *p_dev) | |||
| 319 | 319 | ||
| 320 | /* General socket configuration */ | 320 | /* General socket configuration */ |
| 321 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 321 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
| 322 | p_dev->conf.ConfigIndex = 1; | 322 | p_dev->config_index = 1; |
| 323 | 323 | ||
| 324 | p_dev->priv = dev; | 324 | p_dev->priv = dev; |
| 325 | 325 | ||
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 92a9ad575cc7..3947cf8e63c5 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
| @@ -1889,7 +1889,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev) | |||
| 1889 | 1889 | ||
| 1890 | /* General socket configuration */ | 1890 | /* General socket configuration */ |
| 1891 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; | 1891 | p_dev->conf.Attributes = CONF_ENABLE_IRQ; |
| 1892 | p_dev->conf.ConfigIndex = 1; | 1892 | p_dev->config_index = 1; |
| 1893 | 1893 | ||
| 1894 | dev = alloc_etherdev(sizeof(struct wl3501_card)); | 1894 | dev = alloc_etherdev(sizeof(struct wl3501_card)); |
| 1895 | if (!dev) | 1895 | if (!dev) |
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c index afd946e15ee7..8faf634987e3 100644 --- a/drivers/parport/parport_cs.c +++ b/drivers/parport/parport_cs.c | |||
| @@ -144,7 +144,7 @@ static int parport_config_check(struct pcmcia_device *p_dev, | |||
| 144 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; | 144 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; |
| 145 | p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; | 145 | p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; |
| 146 | if (epp_mode) | 146 | if (epp_mode) |
| 147 | p_dev->conf.ConfigIndex |= FORCE_EPP_MODE; | 147 | p_dev->config_index |= FORCE_EPP_MODE; |
| 148 | p_dev->resource[0]->start = io->win[0].base; | 148 | p_dev->resource[0]->start = io->win[0].base; |
| 149 | p_dev->resource[0]->end = io->win[0].len; | 149 | p_dev->resource[0]->end = io->win[0].len; |
| 150 | if (io->nwin == 2) { | 150 | if (io->nwin == 2) { |
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h index a0c5adb37b5f..42eef437afd4 100644 --- a/drivers/pcmcia/cs_internal.h +++ b/drivers/pcmcia/cs_internal.h | |||
| @@ -34,9 +34,6 @@ typedef struct config_t { | |||
| 34 | struct kref ref; | 34 | struct kref ref; |
| 35 | unsigned int state; | 35 | unsigned int state; |
| 36 | unsigned int Attributes; | 36 | unsigned int Attributes; |
| 37 | unsigned int ConfigBase; | ||
| 38 | unsigned char Option; | ||
| 39 | unsigned int CardValues; | ||
| 40 | 37 | ||
| 41 | struct resource io[MAX_IO_WIN]; /* io ports */ | 38 | struct resource io[MAX_IO_WIN]; /* io ports */ |
| 42 | struct resource mem[MAX_WIN]; /* mem areas */ | 39 | struct resource mem[MAX_WIN]; /* mem areas */ |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 55570d9e1e4c..00db60053f93 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
| @@ -276,13 +276,13 @@ static int pcmcia_device_probe(struct device *dev) | |||
| 276 | ret = pccard_read_tuple(p_dev->socket, p_dev->func, CISTPL_CONFIG, | 276 | ret = pccard_read_tuple(p_dev->socket, p_dev->func, CISTPL_CONFIG, |
| 277 | &cis_config); | 277 | &cis_config); |
| 278 | if (!ret) { | 278 | if (!ret) { |
| 279 | p_dev->conf.ConfigBase = cis_config.base; | 279 | p_dev->config_base = cis_config.base; |
| 280 | p_dev->conf.Present = cis_config.rmask[0]; | 280 | p_dev->config_regs = cis_config.rmask[0]; |
| 281 | } else { | 281 | } else { |
| 282 | dev_printk(KERN_INFO, dev, | 282 | dev_printk(KERN_INFO, dev, |
| 283 | "pcmcia: could not parse base and rmask0 of CIS\n"); | 283 | "pcmcia: could not parse base and rmask0 of CIS\n"); |
| 284 | p_dev->conf.ConfigBase = 0; | 284 | p_dev->config_base = 0; |
| 285 | p_dev->conf.Present = 0; | 285 | p_dev->config_regs = 0; |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | ret = p_drv->probe(p_dev); | 288 | ret = p_drv->probe(p_dev); |
diff --git a/drivers/pcmcia/pcmcia_cis.c b/drivers/pcmcia/pcmcia_cis.c index 0ac54da15885..ac47cc4e20e8 100644 --- a/drivers/pcmcia/pcmcia_cis.c +++ b/drivers/pcmcia/pcmcia_cis.c | |||
| @@ -151,7 +151,7 @@ static int pcmcia_do_loop_config(tuple_t *tuple, cisparse_t *parse, void *priv) | |||
| 151 | struct pcmcia_cfg_mem *cfg_mem = priv; | 151 | struct pcmcia_cfg_mem *cfg_mem = priv; |
| 152 | 152 | ||
| 153 | /* default values */ | 153 | /* default values */ |
| 154 | cfg_mem->p_dev->conf.ConfigIndex = cfg->index; | 154 | cfg_mem->p_dev->config_index = cfg->index; |
| 155 | if (cfg->flags & CISTPL_CFTABLE_DEFAULT) | 155 | if (cfg->flags & CISTPL_CFTABLE_DEFAULT) |
| 156 | cfg_mem->dflt = *cfg; | 156 | cfg_mem->dflt = *cfg; |
| 157 | 157 | ||
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 6210e1c2b432..a1fb0dc1a71f 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
| @@ -168,7 +168,7 @@ static int pcmcia_access_config(struct pcmcia_device *p_dev, | |||
| 168 | return -EACCES; | 168 | return -EACCES; |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | addr = (c->ConfigBase + where) >> 1; | 171 | addr = (p_dev->config_base + where) >> 1; |
| 172 | 172 | ||
| 173 | ret = accessf(s, 1, addr, 1, val); | 173 | ret = accessf(s, 1, addr, 1, val); |
| 174 | 174 | ||
| @@ -443,6 +443,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, | |||
| 443 | pccard_io_map iomap; | 443 | pccard_io_map iomap; |
| 444 | unsigned char status = 0; | 444 | unsigned char status = 0; |
| 445 | unsigned char ext_status = 0; | 445 | unsigned char ext_status = 0; |
| 446 | unsigned char option = 0; | ||
| 446 | 447 | ||
| 447 | if (!(s->state & SOCKET_PRESENT)) | 448 | if (!(s->state & SOCKET_PRESENT)) |
| 448 | return -ENODEV; | 449 | return -ENODEV; |
| @@ -473,7 +474,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, | |||
| 473 | if (req->Attributes & CONF_ENABLE_SPKR) { | 474 | if (req->Attributes & CONF_ENABLE_SPKR) { |
| 474 | s->socket.flags |= SS_SPKR_ENA; | 475 | s->socket.flags |= SS_SPKR_ENA; |
| 475 | status = CCSR_AUDIO_ENA; | 476 | status = CCSR_AUDIO_ENA; |
| 476 | if (!(req->Present & PRESENT_STATUS)) | 477 | if (!(p_dev->config_regs & PRESENT_STATUS)) |
| 477 | dev_warn(&p_dev->dev, "speaker requested, but " | 478 | dev_warn(&p_dev->dev, "speaker requested, but " |
| 478 | "PRESENT_STATUS not set!\n"); | 479 | "PRESENT_STATUS not set!\n"); |
| 479 | } | 480 | } |
| @@ -482,54 +483,53 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, | |||
| 482 | else | 483 | else |
| 483 | s->socket.io_irq = 0; | 484 | s->socket.io_irq = 0; |
| 484 | if (req->Attributes & CONF_ENABLE_ESR) { | 485 | if (req->Attributes & CONF_ENABLE_ESR) { |
| 485 | req->Present |= PRESENT_EXT_STATUS; | 486 | p_dev->config_regs |= PRESENT_EXT_STATUS; |
| 486 | ext_status = ESR_REQ_ATTN_ENA; | 487 | ext_status = ESR_REQ_ATTN_ENA; |
| 487 | } | 488 | } |
| 488 | s->ops->set_socket(s, &s->socket); | 489 | s->ops->set_socket(s, &s->socket); |
| 489 | s->lock_count++; | 490 | s->lock_count++; |
| 490 | 491 | ||
| 491 | /* Set up CIS configuration registers */ | 492 | /* Set up CIS configuration registers */ |
| 492 | base = c->ConfigBase = req->ConfigBase; | 493 | base = p_dev->config_base; |
| 493 | c->CardValues = req->Present; | 494 | if (p_dev->config_regs & PRESENT_COPY) { |
| 494 | if (req->Present & PRESENT_COPY) { | ||
| 495 | u16 tmp = 0; | 495 | u16 tmp = 0; |
| 496 | dev_dbg(&p_dev->dev, "clearing CISREG_SCR\n"); | 496 | dev_dbg(&p_dev->dev, "clearing CISREG_SCR\n"); |
| 497 | pcmcia_write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &tmp); | 497 | pcmcia_write_cis_mem(s, 1, (base + CISREG_SCR)>>1, 1, &tmp); |
| 498 | } | 498 | } |
| 499 | if (req->Present & PRESENT_PIN_REPLACE) { | 499 | if (p_dev->config_regs & PRESENT_PIN_REPLACE) { |
| 500 | u16 tmp = 0; | 500 | u16 tmp = 0; |
| 501 | dev_dbg(&p_dev->dev, "clearing CISREG_PRR\n"); | 501 | dev_dbg(&p_dev->dev, "clearing CISREG_PRR\n"); |
| 502 | pcmcia_write_cis_mem(s, 1, (base + CISREG_PRR)>>1, 1, &tmp); | 502 | pcmcia_write_cis_mem(s, 1, (base + CISREG_PRR)>>1, 1, &tmp); |
| 503 | } | 503 | } |
| 504 | if (req->Present & PRESENT_OPTION) { | 504 | if (p_dev->config_regs & PRESENT_OPTION) { |
| 505 | if (s->functions == 1) { | 505 | if (s->functions == 1) { |
| 506 | c->Option = req->ConfigIndex & COR_CONFIG_MASK; | 506 | option = p_dev->config_index & COR_CONFIG_MASK; |
| 507 | } else { | 507 | } else { |
| 508 | c->Option = req->ConfigIndex & COR_MFC_CONFIG_MASK; | 508 | option = p_dev->config_index & COR_MFC_CONFIG_MASK; |
| 509 | c->Option |= COR_FUNC_ENA|COR_IREQ_ENA; | 509 | option |= COR_FUNC_ENA|COR_IREQ_ENA; |
| 510 | if (req->Present & PRESENT_IOBASE_0) | 510 | if (p_dev->config_regs & PRESENT_IOBASE_0) |
| 511 | c->Option |= COR_ADDR_DECODE; | 511 | option |= COR_ADDR_DECODE; |
| 512 | } | 512 | } |
| 513 | if ((req->Attributes & CONF_ENABLE_IRQ) && | 513 | if ((req->Attributes & CONF_ENABLE_IRQ) && |
| 514 | !(req->Attributes & CONF_ENABLE_PULSE_IRQ)) | 514 | !(req->Attributes & CONF_ENABLE_PULSE_IRQ)) |
| 515 | c->Option |= COR_LEVEL_REQ; | 515 | option |= COR_LEVEL_REQ; |
| 516 | pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &c->Option); | 516 | pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &option); |
| 517 | mdelay(40); | 517 | mdelay(40); |
| 518 | } | 518 | } |
| 519 | if (req->Present & PRESENT_STATUS) | 519 | if (p_dev->config_regs & PRESENT_STATUS) |
| 520 | pcmcia_write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &status); | 520 | pcmcia_write_cis_mem(s, 1, (base + CISREG_CCSR)>>1, 1, &status); |
| 521 | 521 | ||
| 522 | if (req->Present & PRESENT_EXT_STATUS) | 522 | if (p_dev->config_regs & PRESENT_EXT_STATUS) |
| 523 | pcmcia_write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1, | 523 | pcmcia_write_cis_mem(s, 1, (base + CISREG_ESR)>>1, 1, |
| 524 | &ext_status); | 524 | &ext_status); |
| 525 | 525 | ||
| 526 | if (req->Present & PRESENT_IOBASE_0) { | 526 | if (p_dev->config_regs & PRESENT_IOBASE_0) { |
| 527 | u8 b = c->io[0].start & 0xff; | 527 | u8 b = c->io[0].start & 0xff; |
| 528 | pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_0)>>1, 1, &b); | 528 | pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_0)>>1, 1, &b); |
| 529 | b = (c->io[0].start >> 8) & 0xff; | 529 | b = (c->io[0].start >> 8) & 0xff; |
| 530 | pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_1)>>1, 1, &b); | 530 | pcmcia_write_cis_mem(s, 1, (base + CISREG_IOBASE_1)>>1, 1, &b); |
| 531 | } | 531 | } |
| 532 | if (req->Present & PRESENT_IOSIZE) { | 532 | if (p_dev->config_regs & PRESENT_IOSIZE) { |
| 533 | u8 b = resource_size(&c->io[0]) + resource_size(&c->io[1]) - 1; | 533 | u8 b = resource_size(&c->io[0]) + resource_size(&c->io[1]) - 1; |
| 534 | pcmcia_write_cis_mem(s, 1, (base + CISREG_IOSIZE)>>1, 1, &b); | 534 | pcmcia_write_cis_mem(s, 1, (base + CISREG_IOSIZE)>>1, 1, &b); |
| 535 | } | 535 | } |
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index 3c0046e89f37..c3682492af16 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c | |||
| @@ -103,7 +103,7 @@ static int aha152x_probe(struct pcmcia_device *link) | |||
| 103 | link->resource[0]->end = 0x20; | 103 | link->resource[0]->end = 0x20; |
| 104 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; | 104 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
| 105 | link->conf.Attributes = CONF_ENABLE_IRQ; | 105 | link->conf.Attributes = CONF_ENABLE_IRQ; |
| 106 | link->conf.Present = PRESENT_OPTION; | 106 | link->config_regs = PRESENT_OPTION; |
| 107 | 107 | ||
| 108 | return aha152x_config_cs(link); | 108 | return aha152x_config_cs(link); |
| 109 | } /* aha152x_attach */ | 109 | } /* aha152x_attach */ |
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c index 8ff760380d88..bb909e1b7c68 100644 --- a/drivers/scsi/pcmcia/fdomain_stub.c +++ b/drivers/scsi/pcmcia/fdomain_stub.c | |||
| @@ -86,7 +86,7 @@ static int fdomain_probe(struct pcmcia_device *link) | |||
| 86 | link->resource[0]->end = 0x10; | 86 | link->resource[0]->end = 0x10; |
| 87 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; | 87 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
| 88 | link->conf.Attributes = CONF_ENABLE_IRQ; | 88 | link->conf.Attributes = CONF_ENABLE_IRQ; |
| 89 | link->conf.Present = PRESENT_OPTION; | 89 | link->config_regs = PRESENT_OPTION; |
| 90 | 90 | ||
| 91 | return fdomain_config(link); | 91 | return fdomain_config(link); |
| 92 | } /* fdomain_attach */ | 92 | } /* fdomain_attach */ |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index c0cf2dfd6fbc..a5648e9c4f6e 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
| @@ -1745,7 +1745,7 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
| 1745 | 1745 | ||
| 1746 | /* Finally, report what we've done */ | 1746 | /* Finally, report what we've done */ |
| 1747 | printk(KERN_INFO "nsp_cs: index 0x%02x: ", | 1747 | printk(KERN_INFO "nsp_cs: index 0x%02x: ", |
| 1748 | link->conf.ConfigIndex); | 1748 | link->config_index); |
| 1749 | if (link->vpp) { | 1749 | if (link->vpp) { |
| 1750 | printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); | 1750 | printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); |
| 1751 | } | 1751 | } |
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index 77f46a279d6b..5e2cbe091408 100644 --- a/drivers/scsi/pcmcia/qlogic_stub.c +++ b/drivers/scsi/pcmcia/qlogic_stub.c | |||
| @@ -159,7 +159,7 @@ static int qlogic_probe(struct pcmcia_device *link) | |||
| 159 | link->resource[0]->end = 16; | 159 | link->resource[0]->end = 16; |
| 160 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; | 160 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
| 161 | link->conf.Attributes = CONF_ENABLE_IRQ; | 161 | link->conf.Attributes = CONF_ENABLE_IRQ; |
| 162 | link->conf.Present = PRESENT_OPTION; | 162 | link->config_regs = PRESENT_OPTION; |
| 163 | 163 | ||
| 164 | return qlogic_config(link); | 164 | return qlogic_config(link); |
| 165 | } /* qlogic_attach */ | 165 | } /* qlogic_attach */ |
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 38baede2a770..ee19f2d25c20 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
| @@ -495,7 +495,7 @@ static int simple_config(struct pcmcia_device *link) | |||
| 495 | 495 | ||
| 496 | found_port: | 496 | found_port: |
| 497 | if (info->multi && (info->manfid == MANFID_3COM)) | 497 | if (info->multi && (info->manfid == MANFID_3COM)) |
| 498 | link->conf.ConfigIndex &= ~(0x08); | 498 | link->config_index &= ~(0x08); |
| 499 | 499 | ||
| 500 | /* | 500 | /* |
| 501 | * Apply any configuration quirks. | 501 | * Apply any configuration quirks. |
| @@ -591,8 +591,8 @@ static int multi_config(struct pcmcia_device *link) | |||
| 591 | info->prodid == PRODID_POSSIO_GCC)) { | 591 | info->prodid == PRODID_POSSIO_GCC)) { |
| 592 | int err; | 592 | int err; |
| 593 | 593 | ||
| 594 | if (link->conf.ConfigIndex == 1 || | 594 | if (link->config_index == 1 || |
| 595 | link->conf.ConfigIndex == 3) { | 595 | link->config_index == 3) { |
| 596 | err = setup_serial(link, info, base2, | 596 | err = setup_serial(link, info, base2, |
| 597 | link->irq); | 597 | link->irq); |
| 598 | base2 = link->resource[0]->start;; | 598 | base2 = link->resource[0]->start;; |
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index 11271b61f653..034cbfcba196 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c | |||
| @@ -772,7 +772,7 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link) | |||
| 772 | goto failed; | 772 | goto failed; |
| 773 | 773 | ||
| 774 | /* Finally, report what we've done */ | 774 | /* Finally, report what we've done */ |
| 775 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 775 | dev_info(&link->dev, "index 0x%02x", link->config_index); |
| 776 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 776 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 777 | printk(", irq %u", link->irq); | 777 | printk(", irq %u", link->irq); |
| 778 | if (link->resource[0]) | 778 | if (link->resource[0]) |
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index 319aad48ec2e..e37ea79e6aea 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c | |||
| @@ -268,7 +268,7 @@ static void das08_pcmcia_config(struct pcmcia_device *link) | |||
| 268 | goto failed; | 268 | goto failed; |
| 269 | 269 | ||
| 270 | /* Finally, report what we've done */ | 270 | /* Finally, report what we've done */ |
| 271 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 271 | dev_info(&link->dev, "index 0x%02x", link->config_index); |
| 272 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 272 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 273 | printk(", irq %u", link->irq); | 273 | printk(", irq %u", link->irq); |
| 274 | if (link->resource[0]) | 274 | if (link->resource[0]) |
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index d269bbdf5cfb..8107e4009248 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c | |||
| @@ -607,7 +607,7 @@ static void dio700_config(struct pcmcia_device *link) | |||
| 607 | goto failed; | 607 | goto failed; |
| 608 | 608 | ||
| 609 | /* Finally, report what we've done */ | 609 | /* Finally, report what we've done */ |
| 610 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 610 | dev_info(&link->dev, "index 0x%02x", link->config_index); |
| 611 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 611 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 612 | printk(", irq %d", link->irq); | 612 | printk(", irq %d", link->irq); |
| 613 | if (link->resource[0]) | 613 | if (link->resource[0]) |
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index fcaa82967b92..4f9daa3558aa 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c | |||
| @@ -358,7 +358,7 @@ static void dio24_config(struct pcmcia_device *link) | |||
| 358 | goto failed; | 358 | goto failed; |
| 359 | 359 | ||
| 360 | /* Finally, report what we've done */ | 360 | /* Finally, report what we've done */ |
| 361 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 361 | dev_info(&link->dev, "index 0x%02x", link->config_index); |
| 362 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 362 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 363 | printk(", irq %d", link->irq); | 363 | printk(", irq %d", link->irq); |
| 364 | if (link->resource[0]) | 364 | if (link->resource[0]) |
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index a936c11e7dc9..2e27a3048cb8 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c | |||
| @@ -336,7 +336,7 @@ static void labpc_config(struct pcmcia_device *link) | |||
| 336 | goto failed; | 336 | goto failed; |
| 337 | 337 | ||
| 338 | /* Finally, report what we've done */ | 338 | /* Finally, report what we've done */ |
| 339 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 339 | dev_info(&link->dev, "index 0x%02x", link->config_index); |
| 340 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 340 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 341 | printk(", irq %d", link->irq); | 341 | printk(", irq %d", link->irq); |
| 342 | if (link->resource[0]) | 342 | if (link->resource[0]) |
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index cd818fbd9185..a2a32de044c8 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c | |||
| @@ -1137,7 +1137,7 @@ static void daqp_cs_config(struct pcmcia_device *link) | |||
| 1137 | goto failed; | 1137 | goto failed; |
| 1138 | 1138 | ||
| 1139 | /* Finally, report what we've done */ | 1139 | /* Finally, report what we've done */ |
| 1140 | dev_info(&link->dev, "index 0x%02x", link->conf.ConfigIndex); | 1140 | dev_info(&link->dev, "index 0x%02x", link->config_index); |
| 1141 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 1141 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
| 1142 | printk(", irq %u", link->irq); | 1142 | printk(", irq %u", link->irq); |
| 1143 | if (link->resource[0]) | 1143 | if (link->resource[0]) |
diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c index b2efff692ad5..778800f1e464 100644 --- a/drivers/staging/wlags49_h2/wl_cs.c +++ b/drivers/staging/wlags49_h2/wl_cs.c | |||
| @@ -148,8 +148,8 @@ static int wl_adapter_attach(struct pcmcia_device *link) | |||
| 148 | link->resource[0]->end = HCF_NUM_IO_PORTS; | 148 | link->resource[0]->end = HCF_NUM_IO_PORTS; |
| 149 | link->resource[0]->flags= IO_DATA_PATH_WIDTH_16; | 149 | link->resource[0]->flags= IO_DATA_PATH_WIDTH_16; |
| 150 | link->conf.Attributes = CONF_ENABLE_IRQ; | 150 | link->conf.Attributes = CONF_ENABLE_IRQ; |
| 151 | link->conf.ConfigIndex = 5; | 151 | link->config_index = 5; |
| 152 | link->conf.Present = PRESENT_OPTION; | 152 | link->config_regs = PRESENT_OPTION; |
| 153 | 153 | ||
| 154 | link->priv = dev; | 154 | link->priv = dev; |
| 155 | lp = wl_priv(dev); | 155 | lp = wl_priv(dev); |
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index 78bad5188144..590405361bed 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
| @@ -200,7 +200,7 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
| 200 | goto failed; | 200 | goto failed; |
| 201 | 201 | ||
| 202 | dev_info(&link->dev, "index 0x%02x: ", | 202 | dev_info(&link->dev, "index 0x%02x: ", |
| 203 | link->conf.ConfigIndex); | 203 | link->config_index); |
| 204 | if (link->vpp) | 204 | if (link->vpp) |
| 205 | printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); | 205 | printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); |
| 206 | printk(", irq %d", link->irq); | 206 | printk(", irq %d", link->irq); |
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h index 674edbc9ebef..47b6092c4ed6 100644 --- a/include/pcmcia/cs.h +++ b/include/pcmcia/cs.h | |||
| @@ -22,9 +22,6 @@ | |||
| 22 | /* For RequestConfiguration */ | 22 | /* For RequestConfiguration */ |
| 23 | typedef struct config_req_t { | 23 | typedef struct config_req_t { |
| 24 | u_int Attributes; | 24 | u_int Attributes; |
| 25 | u_int ConfigBase; | ||
| 26 | u_char ConfigIndex; | ||
| 27 | u_int Present; | ||
| 28 | } config_req_t; | 25 | } config_req_t; |
| 29 | 26 | ||
| 30 | /* Attributes for RequestConfiguration */ | 27 | /* Attributes for RequestConfiguration */ |
| @@ -35,16 +32,4 @@ typedef struct config_req_t { | |||
| 35 | #define CONF_ENABLE_ESR 0x10 | 32 | #define CONF_ENABLE_ESR 0x10 |
| 36 | #define CONF_VALID_CLIENT 0x100 | 33 | #define CONF_VALID_CLIENT 0x100 |
| 37 | 34 | ||
| 38 | /* Configuration registers present */ | ||
| 39 | #define PRESENT_OPTION 0x001 | ||
| 40 | #define PRESENT_STATUS 0x002 | ||
| 41 | #define PRESENT_PIN_REPLACE 0x004 | ||
| 42 | #define PRESENT_COPY 0x008 | ||
| 43 | #define PRESENT_EXT_STATUS 0x010 | ||
| 44 | #define PRESENT_IOBASE_0 0x020 | ||
| 45 | #define PRESENT_IOBASE_1 0x040 | ||
| 46 | #define PRESENT_IOBASE_2 0x080 | ||
| 47 | #define PRESENT_IOBASE_3 0x100 | ||
| 48 | #define PRESENT_IOSIZE 0x200 | ||
| 49 | |||
| 50 | #endif /* _LINUX_CS_H */ | 35 | #endif /* _LINUX_CS_H */ |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 6137fbc34abd..bc28f96d0b5a 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
| @@ -97,6 +97,9 @@ struct pcmcia_device { | |||
| 97 | unsigned int vpp; | 97 | unsigned int vpp; |
| 98 | 98 | ||
| 99 | unsigned int io_lines; /* number of I/O lines */ | 99 | unsigned int io_lines; /* number of I/O lines */ |
| 100 | unsigned int config_base; | ||
| 101 | unsigned int config_index; | ||
| 102 | unsigned int config_regs; /* PRESENT_ flags below */ | ||
| 100 | 103 | ||
| 101 | /* Is the device suspended? */ | 104 | /* Is the device suspended? */ |
| 102 | u16 suspended:1; | 105 | u16 suspended:1; |
| @@ -250,6 +253,17 @@ static inline int pcmcia_io_cfg_data_width(unsigned int flags) | |||
| 250 | 0x0c -> 2 | 253 | 0x0c -> 2 |
| 251 | 0x10 -> 3 */ | 254 | 0x10 -> 3 */ |
| 252 | 255 | ||
| 256 | /* config_reg{ister}s present for this PCMCIA device */ | ||
| 257 | #define PRESENT_OPTION 0x001 | ||
| 258 | #define PRESENT_STATUS 0x002 | ||
| 259 | #define PRESENT_PIN_REPLACE 0x004 | ||
| 260 | #define PRESENT_COPY 0x008 | ||
| 261 | #define PRESENT_EXT_STATUS 0x010 | ||
| 262 | #define PRESENT_IOBASE_0 0x020 | ||
| 263 | #define PRESENT_IOBASE_1 0x040 | ||
| 264 | #define PRESENT_IOBASE_2 0x080 | ||
| 265 | #define PRESENT_IOBASE_3 0x100 | ||
| 266 | #define PRESENT_IOSIZE 0x200 | ||
| 253 | 267 | ||
| 254 | #endif /* __KERNEL__ */ | 268 | #endif /* __KERNEL__ */ |
| 255 | 269 | ||
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index 2e1282de77d4..4df07fce637f 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
| @@ -143,8 +143,8 @@ static int snd_pdacf_probe(struct pcmcia_device *link) | |||
| 143 | link->resource[0]->end = 16; | 143 | link->resource[0]->end = 16; |
| 144 | 144 | ||
| 145 | link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; | 145 | link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; |
| 146 | link->conf.ConfigIndex = 1; | 146 | link->config_index = 1; |
| 147 | link->conf.Present = PRESENT_OPTION; | 147 | link->config_regs = PRESENT_OPTION; |
| 148 | 148 | ||
| 149 | return pdacf_config(link); | 149 | return pdacf_config(link); |
| 150 | } | 150 | } |
| @@ -216,7 +216,7 @@ static int pdacf_config(struct pcmcia_device *link) | |||
| 216 | int ret; | 216 | int ret; |
| 217 | 217 | ||
| 218 | snd_printdd(KERN_DEBUG "pdacf_config called\n"); | 218 | snd_printdd(KERN_DEBUG "pdacf_config called\n"); |
| 219 | link->conf.ConfigIndex = 0x5; | 219 | link->config_index = 0x5; |
| 220 | 220 | ||
| 221 | ret = pcmcia_request_io(link); | 221 | ret = pcmcia_request_io(link); |
| 222 | if (ret) | 222 | if (ret) |
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index a48b3ee71377..16186adc1bdc 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c | |||
| @@ -163,8 +163,8 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl, | |||
| 163 | link->resource[0]->end = 16; | 163 | link->resource[0]->end = 16; |
| 164 | 164 | ||
| 165 | link->conf.Attributes = CONF_ENABLE_IRQ; | 165 | link->conf.Attributes = CONF_ENABLE_IRQ; |
| 166 | link->conf.ConfigIndex = 1; | 166 | link->config_index = 1; |
| 167 | link->conf.Present = PRESENT_OPTION; | 167 | link->config_regs = PRESENT_OPTION; |
| 168 | 168 | ||
| 169 | *chip_ret = vxp; | 169 | *chip_ret = vxp; |
| 170 | return 0; | 170 | return 0; |
