aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ppc')
-rw-r--r--drivers/ide/ppc/pmac.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index beafdf3c1124..4da251882cc1 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -6,6 +6,7 @@
6 * for doing DMA. 6 * for doing DMA.
7 * 7 *
8 * Copyright (C) 1998-2003 Paul Mackerras & Ben. Herrenschmidt 8 * Copyright (C) 1998-2003 Paul Mackerras & Ben. Herrenschmidt
9 * Copyright (C) 2007 Bartlomiej Zolnierkiewicz
9 * 10 *
10 * This program is free software; you can redistribute it and/or 11 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License 12 * modify it under the terms of the GNU General Public License
@@ -311,7 +312,8 @@ static struct kauai_timing kauai_pio_timings[] =
311 { 240 , 0x0800038b }, 312 { 240 , 0x0800038b },
312 { 239 , 0x0800030c }, 313 { 239 , 0x0800030c },
313 { 180 , 0x05000249 }, 314 { 180 , 0x05000249 },
314 { 120 , 0x04000148 } 315 { 120 , 0x04000148 },
316 { 0 , 0 },
315}; 317};
316 318
317static struct kauai_timing kauai_mdma_timings[] = 319static struct kauai_timing kauai_mdma_timings[] =
@@ -351,7 +353,8 @@ static struct kauai_timing shasta_pio_timings[] =
351 { 240 , 0x040003cd }, 353 { 240 , 0x040003cd },
352 { 239 , 0x040003cd }, 354 { 239 , 0x040003cd },
353 { 180 , 0x0400028b }, 355 { 180 , 0x0400028b },
354 { 120 , 0x0400010a } 356 { 120 , 0x0400010a },
357 { 0 , 0 },
355}; 358};
356 359
357static struct kauai_timing shasta_mdma_timings[] = 360static struct kauai_timing shasta_mdma_timings[] =
@@ -695,8 +698,10 @@ pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)
695 drive->name, pio, *timings); 698 drive->name, pio, *timings);
696#endif 699#endif
697 700
698 if (drive->select.all == HWIF(drive)->INB(IDE_SELECT_REG)) 701 if (pmac_ide_do_setfeature(drive, XFER_PIO_0 + pio))
699 pmac_ide_do_update_timings(drive); 702 return;
703
704 pmac_ide_do_update_timings(drive);
700} 705}
701 706
702#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 707#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
@@ -965,7 +970,7 @@ static int pmac_ide_tune_chipset(ide_drive_t *drive, const u8 speed)
965 case XFER_PIO_1: 970 case XFER_PIO_1:
966 case XFER_PIO_0: 971 case XFER_PIO_0:
967 pmac_ide_set_pio_mode(drive, speed & 0x07); 972 pmac_ide_set_pio_mode(drive, speed & 0x07);
968 break; 973 return 0;
969 default: 974 default:
970 ret = 1; 975 ret = 1;
971 } 976 }