aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/sgiioc4.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:05 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:05 -0500
commit57c802e84f9c759c3d1794a9dbe81bc10444df62 (patch)
treee8774704b3394b12efbb787022cc11b48a13dec0 /drivers/ide/pci/sgiioc4.c
parent8f8e8483f667d79739007b25f0e59a540fb9fa51 (diff)
ide: add ide_init_port_hw() helper
* Add ide_init_port_hw() helper. * rapide.c: convert rapide_locate_hwif() to rapide_setup_ports() and use ide_init_port_hw(). * ide_platform.c: convert plat_ide_locate_hwif() to plat_ide_setup_ports() and use ide_init_port_hw(). * sgiioc4.c: use ide_init_port_hw(). * pmac.c: add 'hw_regs_t *hw' argument to pmac_ide_setup_device(), setup 'hw' in pmac_ide_{macio,pci}_attach() and use ide_init_port_hw() in pmac_ide_setup_device(). This patch is a preparation for the future changes in the IDE probing code. There should be no functionality changes caused by this patch. Cc: Russell King <rmk@arm.linux.org.uk> Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Jeremy Higdon <jeremy@sgi.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/sgiioc4.c')
-rw-r--r--drivers/ide/pci/sgiioc4.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
index b188efcd3551..9e0be7d54980 100644
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -636,14 +636,13 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
636 /* Initialize the IO registers */ 636 /* Initialize the IO registers */
637 memset(&hw, 0, sizeof(hw)); 637 memset(&hw, 0, sizeof(hw));
638 sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport); 638 sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport);
639 memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); 639 hw.irq = dev->irq;
640 hwif->noprobe = 0; 640 hw.chipset = ide_pci;
641 hw.dev = &dev->dev;
642 ide_init_port_hw(hwif, &hw);
641 643
642 hwif->irq = dev->irq;
643 hwif->chipset = ide_pci;
644 hwif->pci_dev = dev; 644 hwif->pci_dev = dev;
645 hwif->channel = 0; /* Single Channel chip */ 645 hwif->channel = 0; /* Single Channel chip */
646 hwif->gendev.parent = &dev->dev;/* setup proper ancestral information */
647 646
648 /* The IOC4 uses MMIO rather than Port IO. */ 647 /* The IOC4 uses MMIO rather than Port IO. */
649 default_hwif_mmiops(hwif); 648 default_hwif_mmiops(hwif);