diff options
Diffstat (limited to 'drivers/ide/ppc')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 2de22b6fe3bd..5b083700d882 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -433,7 +433,7 @@ pmac_ide_selectproc(ide_drive_t *drive) | |||
433 | if (pmif == NULL) | 433 | if (pmif == NULL) |
434 | return; | 434 | return; |
435 | 435 | ||
436 | if (drive->select.b.unit & 0x01) | 436 | if (drive->dn & 1) |
437 | writel(pmif->timings[1], PMAC_IDE_REG(IDE_TIMING_CONFIG)); | 437 | writel(pmif->timings[1], PMAC_IDE_REG(IDE_TIMING_CONFIG)); |
438 | else | 438 | else |
439 | writel(pmif->timings[0], PMAC_IDE_REG(IDE_TIMING_CONFIG)); | 439 | writel(pmif->timings[0], PMAC_IDE_REG(IDE_TIMING_CONFIG)); |
@@ -455,7 +455,7 @@ pmac_ide_kauai_selectproc(ide_drive_t *drive) | |||
455 | if (pmif == NULL) | 455 | if (pmif == NULL) |
456 | return; | 456 | return; |
457 | 457 | ||
458 | if (drive->select.b.unit & 0x01) { | 458 | if (drive->dn & 1) { |
459 | writel(pmif->timings[1], PMAC_IDE_REG(IDE_KAUAI_PIO_CONFIG)); | 459 | writel(pmif->timings[1], PMAC_IDE_REG(IDE_KAUAI_PIO_CONFIG)); |
460 | writel(pmif->timings[3], PMAC_IDE_REG(IDE_KAUAI_ULTRA_CONFIG)); | 460 | writel(pmif->timings[3], PMAC_IDE_REG(IDE_KAUAI_ULTRA_CONFIG)); |
461 | } else { | 461 | } else { |
@@ -528,7 +528,7 @@ pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
528 | return; | 528 | return; |
529 | 529 | ||
530 | /* which drive is it ? */ | 530 | /* which drive is it ? */ |
531 | timings = &pmif->timings[drive->select.b.unit & 0x01]; | 531 | timings = &pmif->timings[drive->dn & 1]; |
532 | t = *timings; | 532 | t = *timings; |
533 | 533 | ||
534 | cycle_time = ide_pio_cycle_time(drive, pio); | 534 | cycle_time = ide_pio_cycle_time(drive, pio); |
@@ -805,9 +805,9 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
805 | ide_hwif_t *hwif = drive->hwif; | 805 | ide_hwif_t *hwif = drive->hwif; |
806 | pmac_ide_hwif_t *pmif = | 806 | pmac_ide_hwif_t *pmif = |
807 | (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); | 807 | (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); |
808 | int unit = (drive->select.b.unit & 0x01); | ||
809 | int ret = 0; | 808 | int ret = 0; |
810 | u32 *timings, *timings2, tl[2]; | 809 | u32 *timings, *timings2, tl[2]; |
810 | u8 unit = drive->dn & 1; | ||
811 | 811 | ||
812 | timings = &pmif->timings[unit]; | 812 | timings = &pmif->timings[unit]; |
813 | timings2 = &pmif->timings[unit+2]; | 813 | timings2 = &pmif->timings[unit+2]; |
@@ -1558,8 +1558,7 @@ pmac_ide_dma_setup(ide_drive_t *drive) | |||
1558 | pmac_ide_hwif_t *pmif = | 1558 | pmac_ide_hwif_t *pmif = |
1559 | (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); | 1559 | (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent); |
1560 | struct request *rq = HWGROUP(drive)->rq; | 1560 | struct request *rq = HWGROUP(drive)->rq; |
1561 | u8 unit = (drive->select.b.unit & 0x01); | 1561 | u8 unit = drive->dn & 1, ata4; |
1562 | u8 ata4; | ||
1563 | 1562 | ||
1564 | if (pmif == NULL) | 1563 | if (pmif == NULL) |
1565 | return 1; | 1564 | return 1; |