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.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 313194a0f36e..7d8873839e21 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -611,9 +611,6 @@ pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
611 drive->name, pio, *timings); 611 drive->name, pio, *timings);
612#endif 612#endif
613 613
614 if (ide_config_drive_speed(drive, XFER_PIO_0 + pio))
615 return;
616
617 *timings = t; 614 *timings = t;
618 pmac_ide_do_update_timings(drive); 615 pmac_ide_do_update_timings(drive);
619} 616}
@@ -822,11 +819,7 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
822} 819}
823#endif /* #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC */ 820#endif /* #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC */
824 821
825/* 822static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed)
826 * Speedproc. This function is called by the core to set any of the standard
827 * DMA timing (MDMA or UDMA) to both the drive and the controller.
828 */
829static int pmac_ide_tune_chipset(ide_drive_t *drive, const u8 speed)
830{ 823{
831 int unit = (drive->select.b.unit & 0x01); 824 int unit = (drive->select.b.unit & 0x01);
832 int ret = 0; 825 int ret = 0;
@@ -867,25 +860,19 @@ static int pmac_ide_tune_chipset(ide_drive_t *drive, const u8 speed)
867 case XFER_SW_DMA_2: 860 case XFER_SW_DMA_2:
868 case XFER_SW_DMA_1: 861 case XFER_SW_DMA_1:
869 case XFER_SW_DMA_0: 862 case XFER_SW_DMA_0:
870 return 1; 863 return;
871#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ 864#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
872 default: 865 default:
873 ret = 1; 866 ret = 1;
874 } 867 }
875 if (ret) 868 if (ret)
876 return ret; 869 return;
877
878 ret = ide_config_drive_speed(drive, speed);
879 if (ret)
880 return ret;
881 870
882 /* Apply timings to controller */ 871 /* Apply timings to controller */
883 *timings = tl[0]; 872 *timings = tl[0];
884 *timings2 = tl[1]; 873 *timings2 = tl[1];
885 874
886 pmac_ide_do_update_timings(drive); 875 pmac_ide_do_update_timings(drive);
887
888 return 0;
889} 876}
890 877
891/* 878/*
@@ -1147,7 +1134,8 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1147 hwif->drives[1].unmask = 1; 1134 hwif->drives[1].unmask = 1;
1148 hwif->drives[0].autotune = IDE_TUNE_AUTO; 1135 hwif->drives[0].autotune = IDE_TUNE_AUTO;
1149 hwif->drives[1].autotune = IDE_TUNE_AUTO; 1136 hwif->drives[1].autotune = IDE_TUNE_AUTO;
1150 hwif->host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA; 1137 hwif->host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA |
1138 IDE_HFLAG_POST_SET_MODE;
1151 hwif->pio_mask = ATA_PIO4; 1139 hwif->pio_mask = ATA_PIO4;
1152 hwif->set_pio_mode = pmac_ide_set_pio_mode; 1140 hwif->set_pio_mode = pmac_ide_set_pio_mode;
1153 if (pmif->kind == controller_un_ata6 1141 if (pmif->kind == controller_un_ata6
@@ -1156,7 +1144,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1156 hwif->selectproc = pmac_ide_kauai_selectproc; 1144 hwif->selectproc = pmac_ide_kauai_selectproc;
1157 else 1145 else
1158 hwif->selectproc = pmac_ide_selectproc; 1146 hwif->selectproc = pmac_ide_selectproc;
1159 hwif->speedproc = pmac_ide_tune_chipset; 1147 hwif->set_dma_mode = pmac_ide_set_dma_mode;
1160 1148
1161 printk(KERN_INFO "ide%d: Found Apple %s controller, bus ID %d%s, irq %d\n", 1149 printk(KERN_INFO "ide%d: Found Apple %s controller, bus ID %d%s, irq %d\n",
1162 hwif->index, model_name[pmif->kind], pmif->aapl_bus_id, 1150 hwif->index, model_name[pmif->kind], pmif->aapl_bus_id,