aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pmac.c')
-rw-r--r--drivers/ide/pmac.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index 7a4e788cab2f..850ee452e9bb 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -496,12 +496,11 @@ static void pmac_write_devctl(ide_hwif_t *hwif, u8 ctl)
496/* 496/*
497 * Old tuning functions (called on hdparm -p), sets up drive PIO timings 497 * Old tuning functions (called on hdparm -p), sets up drive PIO timings
498 */ 498 */
499static void 499static void pmac_ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
500pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
501{ 500{
502 ide_hwif_t *hwif = drive->hwif;
503 pmac_ide_hwif_t *pmif = 501 pmac_ide_hwif_t *pmif =
504 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); 502 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent);
503 const u8 pio = drive->pio_mode - XFER_PIO_0;
505 struct ide_timing *tim = ide_timing_find_mode(XFER_PIO_0 + pio); 504 struct ide_timing *tim = ide_timing_find_mode(XFER_PIO_0 + pio);
506 u32 *timings, t; 505 u32 *timings, t;
507 unsigned accessTicks, recTicks; 506 unsigned accessTicks, recTicks;
@@ -778,14 +777,14 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
778#endif 777#endif
779} 778}
780 779
781static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) 780static void pmac_ide_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
782{ 781{
783 ide_hwif_t *hwif = drive->hwif;
784 pmac_ide_hwif_t *pmif = 782 pmac_ide_hwif_t *pmif =
785 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); 783 (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent);
786 int ret = 0; 784 int ret = 0;
787 u32 *timings, *timings2, tl[2]; 785 u32 *timings, *timings2, tl[2];
788 u8 unit = drive->dn & 1; 786 u8 unit = drive->dn & 1;
787 const u8 speed = drive->dma_mode;
789 788
790 timings = &pmif->timings[unit]; 789 timings = &pmif->timings[unit];
791 timings2 = &pmif->timings[unit+2]; 790 timings2 = &pmif->timings[unit+2];
@@ -1651,8 +1650,8 @@ pmac_ide_dma_test_irq (ide_drive_t *drive)
1651 if ((status & FLUSH) == 0) 1650 if ((status & FLUSH) == 0)
1652 break; 1651 break;
1653 if (++timeout > 100) { 1652 if (++timeout > 100) {
1654 printk(KERN_WARNING "ide%d, ide_dma_test_irq \ 1653 printk(KERN_WARNING "ide%d, ide_dma_test_irq timeout flushing channel\n",
1655 timeout flushing channel\n", hwif->index); 1654 hwif->index);
1656 break; 1655 break;
1657 } 1656 }
1658 } 1657 }