diff options
Diffstat (limited to 'drivers/scsi/pcmcia/nsp_cs.c')
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index d929891809ab..8bb598bb440d 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -1558,9 +1558,8 @@ static int nsp_cs_probe(struct pcmcia_device *link) | |||
1558 | nsp_dbg(NSP_DEBUG_INIT, "info=0x%p", info); | 1558 | nsp_dbg(NSP_DEBUG_INIT, "info=0x%p", info); |
1559 | 1559 | ||
1560 | /* The io structure describes IO port mapping */ | 1560 | /* The io structure describes IO port mapping */ |
1561 | link->io.NumPorts1 = 0x10; | 1561 | link->resource[0]->end = 0x10; |
1562 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 1562 | link->resource[0]->flags = IO_DATA_PATH_WIDTH_AUTO; |
1563 | link->io.IOAddrLines = 10; /* not used */ | ||
1564 | 1563 | ||
1565 | /* General socket configuration */ | 1564 | /* General socket configuration */ |
1566 | link->conf.Attributes = CONF_ENABLE_IRQ; | 1565 | link->conf.Attributes = CONF_ENABLE_IRQ; |
@@ -1641,24 +1640,23 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev, | |||
1641 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | 1640 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
1642 | 1641 | ||
1643 | /* IO window settings */ | 1642 | /* IO window settings */ |
1644 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 1643 | p_dev->resource[0]->end = p_dev->resource[1]->end = 0; |
1645 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { | 1644 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { |
1646 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; | 1645 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; |
1647 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 1646 | p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; |
1648 | if (!(io->flags & CISTPL_IO_8BIT)) | 1647 | p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; |
1649 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; | 1648 | p_dev->resource[0]->flags |= |
1650 | if (!(io->flags & CISTPL_IO_16BIT)) | 1649 | pcmcia_io_cfg_data_width(io->flags); |
1651 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 1650 | p_dev->resource[0]->start = io->win[0].base; |
1652 | p_dev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; | 1651 | p_dev->resource[0]->end = io->win[0].len; |
1653 | p_dev->io.BasePort1 = io->win[0].base; | ||
1654 | p_dev->io.NumPorts1 = io->win[0].len; | ||
1655 | if (io->nwin > 1) { | 1652 | if (io->nwin > 1) { |
1656 | p_dev->io.Attributes2 = p_dev->io.Attributes1; | 1653 | p_dev->resource[1]->flags = |
1657 | p_dev->io.BasePort2 = io->win[1].base; | 1654 | p_dev->resource[0]->flags; |
1658 | p_dev->io.NumPorts2 = io->win[1].len; | 1655 | p_dev->resource[1]->start = io->win[1].base; |
1656 | p_dev->resource[1]->end = io->win[1].len; | ||
1659 | } | 1657 | } |
1660 | /* This reserves IO space but doesn't actually enable it */ | 1658 | /* This reserves IO space but doesn't actually enable it */ |
1661 | if (pcmcia_request_io(p_dev, &p_dev->io) != 0) | 1659 | if (pcmcia_request_io(p_dev) != 0) |
1662 | goto next_entry; | 1660 | goto next_entry; |
1663 | } | 1661 | } |
1664 | 1662 | ||