diff options
Diffstat (limited to 'drivers/ide/pci/siimage.c')
-rw-r--r-- | drivers/ide/pci/siimage.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 1fffea3211bd..c2040a017f47 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -622,9 +622,10 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
622 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 622 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
623 | void *addr = pci_get_drvdata(dev); | 623 | void *addr = pci_get_drvdata(dev); |
624 | u8 ch = hwif->channel; | 624 | u8 ch = hwif->channel; |
625 | hw_regs_t hw; | ||
626 | unsigned long base; | 625 | unsigned long base; |
627 | 626 | ||
627 | struct ide_io_ports *io_ports = &hwif->io_ports; | ||
628 | |||
628 | /* | 629 | /* |
629 | * Fill in the basic HWIF bits | 630 | * Fill in the basic HWIF bits |
630 | */ | 631 | */ |
@@ -638,7 +639,7 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
638 | * based I/O | 639 | * based I/O |
639 | */ | 640 | */ |
640 | 641 | ||
641 | memset(&hw, 0, sizeof(hw_regs_t)); | 642 | memset(io_ports, 0, sizeof(*io_ports)); |
642 | 643 | ||
643 | base = (unsigned long)addr; | 644 | base = (unsigned long)addr; |
644 | if (ch) | 645 | if (ch) |
@@ -651,17 +652,15 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
651 | * so we can't currently use it sanely since we want to | 652 | * so we can't currently use it sanely since we want to |
652 | * use LBA48 mode. | 653 | * use LBA48 mode. |
653 | */ | 654 | */ |
654 | hw.io_ports[IDE_DATA_OFFSET] = base; | 655 | io_ports->data_addr = base; |
655 | hw.io_ports[IDE_ERROR_OFFSET] = base + 1; | 656 | io_ports->error_addr = base + 1; |
656 | hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2; | 657 | io_ports->nsect_addr = base + 2; |
657 | hw.io_ports[IDE_SECTOR_OFFSET] = base + 3; | 658 | io_ports->lbal_addr = base + 3; |
658 | hw.io_ports[IDE_LCYL_OFFSET] = base + 4; | 659 | io_ports->lbam_addr = base + 4; |
659 | hw.io_ports[IDE_HCYL_OFFSET] = base + 5; | 660 | io_ports->lbah_addr = base + 5; |
660 | hw.io_ports[IDE_SELECT_OFFSET] = base + 6; | 661 | io_ports->device_addr = base + 6; |
661 | hw.io_ports[IDE_STATUS_OFFSET] = base + 7; | 662 | io_ports->status_addr = base + 7; |
662 | hw.io_ports[IDE_CONTROL_OFFSET] = base + 10; | 663 | io_ports->ctl_addr = base + 10; |
663 | |||
664 | hw.io_ports[IDE_IRQ_OFFSET] = 0; | ||
665 | 664 | ||
666 | if (pdev_is_sata(dev)) { | 665 | if (pdev_is_sata(dev)) { |
667 | base = (unsigned long)addr; | 666 | base = (unsigned long)addr; |
@@ -672,8 +671,6 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
672 | hwif->sata_scr[SATA_CONTROL_OFFSET] = base + 0x100; | 671 | hwif->sata_scr[SATA_CONTROL_OFFSET] = base + 0x100; |
673 | } | 672 | } |
674 | 673 | ||
675 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); | ||
676 | |||
677 | hwif->irq = dev->irq; | 674 | hwif->irq = dev->irq; |
678 | 675 | ||
679 | hwif->dma_base = (unsigned long)addr + (ch ? 0x08 : 0x00); | 676 | hwif->dma_base = (unsigned long)addr + (ch ? 0x08 : 0x00); |