aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ppc/pmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r--drivers/ide/ppc/pmac.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index c5547935676..816b5311dad 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1039,6 +1039,8 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1039{ 1039{
1040 struct device_node *np = pmif->node; 1040 struct device_node *np = pmif->node;
1041 const int *bidp; 1041 const int *bidp;
1042 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
1043 hw_regs_t hw;
1042 1044
1043 pmif->cable_80 = 0; 1045 pmif->cable_80 = 0;
1044 pmif->broken_dma = pmif->broken_dma_warn = 0; 1046 pmif->broken_dma = pmif->broken_dma_warn = 0;
@@ -1124,8 +1126,9 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1124 /* Tell common code _not_ to mess with resources */ 1126 /* Tell common code _not_ to mess with resources */
1125 hwif->mmio = 1; 1127 hwif->mmio = 1;
1126 hwif->hwif_data = pmif; 1128 hwif->hwif_data = pmif;
1127 pmac_ide_init_hwif_ports(&hwif->hw, pmif->regbase, 0, &hwif->irq); 1129 memset(&hw, 0, sizeof(hw));
1128 memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); 1130 pmac_ide_init_hwif_ports(&hw, pmif->regbase, 0, &hwif->irq);
1131 memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports));
1129 hwif->chipset = ide_pmac; 1132 hwif->chipset = ide_pmac;
1130 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET] || pmif->mediabay; 1133 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET] || pmif->mediabay;
1131 hwif->hold = pmif->mediabay; 1134 hwif->hold = pmif->mediabay;
@@ -1163,10 +1166,9 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1163 pmac_ide_setup_dma(pmif, hwif); 1166 pmac_ide_setup_dma(pmif, hwif);
1164#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ 1167#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
1165 1168
1166 /* We probe the hwif now */ 1169 idx[0] = hwif->index;
1167 probe_hwif_init(hwif);
1168 1170
1169 ide_proc_register_port(hwif); 1171 ide_device_add(idx);
1170 1172
1171 return 0; 1173 return 0;
1172} 1174}