|
@@ -418,37 +418,6 @@ static void pmac_ide_kauai_selectproc(ide_drive_t *drive);
|
|
|
|
|
|
#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
|
|
|
|
|
|
-/*
|
|
|
- * N.B. this can't be an initfunc, because the media-bay task can
|
|
|
- * call ide_[un]register at any time.
|
|
|
- */
|
|
|
-void
|
|
|
-pmac_ide_init_hwif_ports(hw_regs_t *hw,
|
|
|
- unsigned long data_port, unsigned long ctrl_port,
|
|
|
- int *irq)
|
|
|
-{
|
|
|
- int i, ix;
|
|
|
-
|
|
|
- if (data_port == 0)
|
|
|
- return;
|
|
|
-
|
|
|
- for (ix = 0; ix < MAX_HWIFS; ++ix)
|
|
|
- if (data_port == pmac_ide[ix].regbase)
|
|
|
- break;
|
|
|
-
|
|
|
- if (ix >= MAX_HWIFS)
|
|
|
- return; /* not an IDE PMAC interface */
|
|
|
-
|
|
|
- for (i = 0; i < 8; ++i)
|
|
|
- hw->io_ports[i] = data_port + i * 0x10;
|
|
|
- hw->io_ports[8] = data_port + 0x160;
|
|
|
-
|
|
|
- if (irq != NULL)
|
|
|
- *irq = pmac_ide[ix].irq;
|
|
|
-
|
|
|
- hw->dev = &pmac_ide[ix].mdev->ofdev.dev;
|
|
|
-}
|
|
|
-
|
|
|
#define PMAC_IDE_REG(x) \
|
|
|
((void __iomem *)((drive)->hwif->io_ports[IDE_DATA_OFFSET] + (x)))
|
|
|
|
|
@@ -886,12 +855,6 @@ sanitize_timings(pmac_ide_hwif_t *pmif)
|
|
|
pmif->timings[2] = pmif->timings[3] = value2;
|
|
|
}
|
|
|
|
|
|
-unsigned long
|
|
|
-pmac_ide_get_base(int index)
|
|
|
-{
|
|
|
- return pmac_ide[index].regbase;
|
|
|
-}
|
|
|
-
|
|
|
/* Suspend call back, should be called after the child devices
|
|
|
* have actually been suspended
|
|
|
*/
|
|
@@ -1108,6 +1071,15 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void __devinit pmac_ide_init_ports(hw_regs_t *hw, unsigned long base)
|
|
|
+{
|
|
|
+ int i;
|
|
|
+
|
|
|
+ for (i = 0; i < 8; ++i)
|
|
|
+ hw->io_ports[i] = base + i * 0x10;
|
|
|
+ hw->io_ports[8] = base + 0x160;
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* Attach to a macio probed interface
|
|
|
*/
|
|
@@ -1181,7 +1153,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
|
|
|
dev_set_drvdata(&mdev->ofdev.dev, hwif);
|
|
|
|
|
|
memset(&hw, 0, sizeof(hw));
|
|
|
- pmac_ide_init_hwif_ports(&hw, pmif->regbase, 0, NULL);
|
|
|
+ pmac_ide_init_ports(&hw, pmif->regbase);
|
|
|
hw.irq = irq;
|
|
|
hw.dev = &mdev->ofdev.dev;
|
|
|
|
|
@@ -1295,7 +1267,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
|
pci_set_drvdata(pdev, hwif);
|
|
|
|
|
|
memset(&hw, 0, sizeof(hw));
|
|
|
- pmac_ide_init_hwif_ports(&hw, pmif->regbase, 0, NULL);
|
|
|
+ pmac_ide_init_ports(&hw, pmif->regbase);
|
|
|
hw.irq = pdev->irq;
|
|
|
hw.dev = &pdev->dev;
|
|
|
|