aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/cris/ide-cris.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/cris/ide-cris.c')
-rw-r--r--drivers/ide/cris/ide-cris.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c
index 556455fbfa2b..5e8efc89255a 100644
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -730,7 +730,7 @@ static int speed_cris_ide(ide_drive_t *drive, u8 speed)
730 730
731 if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) { 731 if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) {
732 tune_cris_ide(drive, speed - XFER_PIO_0); 732 tune_cris_ide(drive, speed - XFER_PIO_0);
733 return 0; 733 return ide_config_drive_speed(drive, speed);
734 } 734 }
735 735
736 switch(speed) 736 switch(speed)
@@ -760,7 +760,8 @@ static int speed_cris_ide(ide_drive_t *drive, u8 speed)
760 hold = ATA_DMA2_HOLD; 760 hold = ATA_DMA2_HOLD;
761 break; 761 break;
762 default: 762 default:
763 return 0; 763 BUG();
764 break;
764 } 765 }
765 766
766 if (speed >= XFER_UDMA_0) 767 if (speed >= XFER_UDMA_0)
@@ -768,7 +769,7 @@ static int speed_cris_ide(ide_drive_t *drive, u8 speed)
768 else 769 else
769 cris_ide_set_speed(TYPE_DMA, 0, strobe, hold); 770 cris_ide_set_speed(TYPE_DMA, 0, strobe, hold);
770 771
771 return 0; 772 return ide_config_drive_speed(drive, speed);
772} 773}
773 774
774void __init 775void __init
@@ -821,7 +822,6 @@ init_e100_ide (void)
821 hwif->udma_four = 0; 822 hwif->udma_four = 0;
822 hwif->ultra_mask = cris_ultra_mask; 823 hwif->ultra_mask = cris_ultra_mask;
823 hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */ 824 hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */
824 hwif->swdma_mask = 0x07; /* Singleword DMA 0-2 */
825 hwif->autodma = 1; 825 hwif->autodma = 1;
826 hwif->drives[0].autodma = 1; 826 hwif->drives[0].autodma = 1;
827 hwif->drives[1].autodma = 1; 827 hwif->drives[1].autodma = 1;
@@ -1010,7 +1010,6 @@ static int cris_config_drive_for_dma (ide_drive_t *drive)
1010 return 0; 1010 return 0;
1011 1011
1012 speed_cris_ide(drive, speed); 1012 speed_cris_ide(drive, speed);
1013 ide_config_drive_speed(drive, speed);
1014 1013
1015 return ide_dma_enable(drive); 1014 return ide_dma_enable(drive);
1016} 1015}