ide: move ide_config_drive_speed() calls to upper layers (take 2)
[deliverable/linux.git] / drivers / ide / mips / au1xxx-ide.c
index c319f61631276c289549a9fbb38014e521010772..aebde49365d16a68b28fdce811a95052c3262e1b 100644 (file)
@@ -101,14 +101,7 @@ void auide_outsw(unsigned long port, void *addr, u32 count)
 
 static void au1xxx_set_pio_mode(ide_drive_t *drive, const u8 pio)
 {
-       int mem_sttime;
-       int mem_stcfg;
-
-       if (ide_config_drive_speed(drive, pio + XFER_PIO_0))
-               return;
-
-       mem_sttime = 0;
-       mem_stcfg  = au_readl(MEM_STCFG2);
+       int mem_sttime = 0, mem_stcfg = au_readl(MEM_STCFG2);
 
        /* set pio mode! */
        switch(pio) {
@@ -168,13 +161,9 @@ static void au1xxx_set_pio_mode(ide_drive_t *drive, const u8 pio)
        au_writel(mem_stcfg,MEM_STCFG2);
 }
 
-static int auide_tune_chipset(ide_drive_t *drive, const u8 speed)
+static void auide_set_dma_mode(ide_drive_t *drive, const u8 speed)
 {
-       int mem_sttime;
-       int mem_stcfg;
-
-       mem_sttime = 0;
-       mem_stcfg  = au_readl(MEM_STCFG2);
+       int mem_sttime = 0, mem_stcfg = au_readl(MEM_STCFG2);
 
        switch(speed) {
 #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
@@ -210,16 +199,11 @@ static int auide_tune_chipset(ide_drive_t *drive, const u8 speed)
                break;
 #endif
        default:
-               return 1;
+               return;
        }
 
-       if (ide_config_drive_speed(drive, speed))
-               return 1;
-
        au_writel(mem_sttime,MEM_STTIME2);
        au_writel(mem_stcfg,MEM_STCFG2);
-
-       return 0;
 }
 
 /*
@@ -681,6 +665,7 @@ static int au_ide_probe(struct device *dev)
 #endif
 
        hwif->pio_mask = ATA_PIO4;
+       hwif->host_flags = IDE_HFLAG_POST_SET_MODE;
 
        hwif->noprobe = 0;
        hwif->drives[0].unmask          = 1;
@@ -701,7 +686,7 @@ static int au_ide_probe(struct device *dev)
 #endif
 
        hwif->set_pio_mode              = &au1xxx_set_pio_mode;
-       hwif->speedproc                 = &auide_tune_chipset;
+       hwif->set_dma_mode              = &auide_set_dma_mode;
 
 #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
        hwif->dma_off_quietly           = &auide_dma_off_quietly;
This page took 0.030864 seconds and 5 git commands to generate.