aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_icside.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_icside.c')
-rw-r--r--drivers/ata/pata_icside.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
index 4a69328a4c43..be30923566c5 100644
--- a/drivers/ata/pata_icside.c
+++ b/drivers/ata/pata_icside.c
@@ -70,6 +70,8 @@ struct pata_icside_info {
70 unsigned int mwdma_mask; 70 unsigned int mwdma_mask;
71 unsigned int nr_ports; 71 unsigned int nr_ports;
72 const struct portinfo *port[2]; 72 const struct portinfo *port[2];
73 unsigned long raw_base;
74 unsigned long raw_ioc_base;
73}; 75};
74 76
75#define ICS_TYPE_A3IN 0 77#define ICS_TYPE_A3IN 0
@@ -392,9 +394,10 @@ static struct ata_port_operations pata_icside_port_ops = {
392}; 394};
393 395
394static void __devinit 396static void __devinit
395pata_icside_setup_ioaddr(struct ata_ioports *ioaddr, void __iomem *base, 397pata_icside_setup_ioaddr(struct ata_port *ap, void __iomem *base,
396 const struct portinfo *info) 398 const struct portinfo *info)
397{ 399{
400 struct ata_ioports *ioaddr = &ap->ioaddr;
398 void __iomem *cmd = base + info->dataoffset; 401 void __iomem *cmd = base + info->dataoffset;
399 402
400 ioaddr->cmd_addr = cmd; 403 ioaddr->cmd_addr = cmd;
@@ -411,6 +414,13 @@ pata_icside_setup_ioaddr(struct ata_ioports *ioaddr, void __iomem *base,
411 414
412 ioaddr->ctl_addr = base + info->ctrloffset; 415 ioaddr->ctl_addr = base + info->ctrloffset;
413 ioaddr->altstatus_addr = ioaddr->ctl_addr; 416 ioaddr->altstatus_addr = ioaddr->ctl_addr;
417
418 ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx",
419 info->raw_base + info->dataoffset,
420 info->raw_base + info->ctrloffset);
421
422 if (info->raw_ioc_base)
423 ata_port_desc(ap, "iocbase 0x%lx", info->raw_ioc_base);
414} 424}
415 425
416static int __devinit pata_icside_register_v5(struct pata_icside_info *info) 426static int __devinit pata_icside_register_v5(struct pata_icside_info *info)
@@ -431,6 +441,8 @@ static int __devinit pata_icside_register_v5(struct pata_icside_info *info)
431 info->nr_ports = 1; 441 info->nr_ports = 1;
432 info->port[0] = &pata_icside_portinfo_v5; 442 info->port[0] = &pata_icside_portinfo_v5;
433 443
444 info->raw_base = ecard_resource_start(ec, ECARD_RES_MEMC);
445
434 return 0; 446 return 0;
435} 447}
436 448
@@ -471,6 +483,9 @@ static int __devinit pata_icside_register_v6(struct pata_icside_info *info)
471 info->port[0] = &pata_icside_portinfo_v6_1; 483 info->port[0] = &pata_icside_portinfo_v6_1;
472 info->port[1] = &pata_icside_portinfo_v6_2; 484 info->port[1] = &pata_icside_portinfo_v6_2;
473 485
486 info->raw_base = ecard_resource_start(ec, ECARD_RES_EASI);
487 info->raw_ioc_base = ecard_resource_start(ec, ECARD_RES_IOCFAST);
488
474 return icside_dma_init(info); 489 return icside_dma_init(info);
475} 490}
476 491
@@ -507,7 +522,7 @@ static int __devinit pata_icside_add_ports(struct pata_icside_info *info)
507 ap->flags |= ATA_FLAG_SLAVE_POSS; 522 ap->flags |= ATA_FLAG_SLAVE_POSS;
508 ap->ops = &pata_icside_port_ops; 523 ap->ops = &pata_icside_port_ops;
509 524
510 pata_icside_setup_ioaddr(&ap->ioaddr, info->base, info->port[i]); 525 pata_icside_setup_ioaddr(ap, info->base, info->port[i]);
511 } 526 }
512 527
513 return ata_host_activate(host, ec->irq, ata_interrupt, 0, 528 return ata_host_activate(host, ec->irq, ata_interrupt, 0,