aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cs.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c
index 6be0e5f108b5..2a4cb9c18f01 100644
--- a/drivers/ide/ide-cs.c
+++ b/drivers/ide/ide-cs.c
@@ -97,9 +97,8 @@ static int ide_probe(struct pcmcia_device *link)
97 info->p_dev = link; 97 info->p_dev = link;
98 link->priv = info; 98 link->priv = info;
99 99
100 link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; 100 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
101 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 101 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
102 link->io.IOAddrLines = 3;
103 link->conf.Attributes = CONF_ENABLE_IRQ; 102 link->conf.Attributes = CONF_ENABLE_IRQ;
104 link->conf.IntType = INT_MEMORY_AND_IO; 103 link->conf.IntType = INT_MEMORY_AND_IO;
105 104
@@ -228,22 +227,25 @@ static int pcmcia_check_one_config(struct pcmcia_device *pdev,
228 227
229 if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { 228 if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) {
230 cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; 229 cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
230 pdev->io_lines = io->flags & CISTPL_IO_LINES_MASK;
231
231 pdev->conf.ConfigIndex = cfg->index; 232 pdev->conf.ConfigIndex = cfg->index;
232 pdev->io.BasePort1 = io->win[0].base; 233 pdev->resource[0]->start = io->win[0].base;
233 pdev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; 234 if (!(io->flags & CISTPL_IO_16BIT)) {
234 if (!(io->flags & CISTPL_IO_16BIT)) 235 pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
235 pdev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 236 pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
237 }
236 if (io->nwin == 2) { 238 if (io->nwin == 2) {
237 pdev->io.NumPorts1 = 8; 239 pdev->resource[0]->end = 8;
238 pdev->io.BasePort2 = io->win[1].base; 240 pdev->resource[1]->start = io->win[1].base;
239 pdev->io.NumPorts2 = (stk->is_kme) ? 2 : 1; 241 pdev->resource[1]->end = (stk->is_kme) ? 2 : 1;
240 if (pcmcia_request_io(pdev, &pdev->io) != 0) 242 if (pcmcia_request_io(pdev) != 0)
241 return -ENODEV; 243 return -ENODEV;
242 stk->ctl_base = pdev->resource[1]->start; 244 stk->ctl_base = pdev->resource[1]->start;
243 } else if ((io->nwin == 1) && (io->win[0].len >= 16)) { 245 } else if ((io->nwin == 1) && (io->win[0].len >= 16)) {
244 pdev->io.NumPorts1 = io->win[0].len; 246 pdev->resource[0]->end = io->win[0].len;
245 pdev->io.NumPorts2 = 0; 247 pdev->resource[1]->end = 0;
246 if (pcmcia_request_io(pdev, &pdev->io) != 0) 248 if (pcmcia_request_io(pdev) != 0)
247 return -ENODEV; 249 return -ENODEV;
248 stk->ctl_base = pdev->resource[0]->start + 0x0e; 250 stk->ctl_base = pdev->resource[0]->start + 0x0e;
249 } else 251 } else