]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/legacy/ht6560b.c
triflex: always tune PIO
[linux-2.6-omap-h63xx.git] / drivers / ide / legacy / ht6560b.c
index bfaa2025173b30f9a97b1f2b5d985dcfe1d674b3..2e5a9cc5c0f7ab1a48a2b26bef35ca12922f4837 100644 (file)
@@ -199,7 +199,7 @@ static int __init try_to_init_ht6560b(void)
        return 1;
 }
 
-static u8 ht_pio2timings(ide_drive_t *drive, u8 pio)
+static u8 ht_pio2timings(ide_drive_t *drive, const u8 pio)
 {
        int active_time, recovery_time;
        int active_cycles, recovery_cycles;
@@ -208,7 +208,6 @@ static u8 ht_pio2timings(ide_drive_t *drive, u8 pio)
         if (pio) {
                unsigned int cycle_time;
 
-               pio = ide_get_best_pio_mode(drive, pio, 5);
                cycle_time = ide_pio_cycle_time(drive, pio);
 
                /*
@@ -277,7 +276,7 @@ static void ht_set_prefetch(ide_drive_t *drive, u8 state)
 #endif
 }
 
-static void tune_ht6560b (ide_drive_t *drive, u8 pio)
+static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio)
 {
        unsigned long flags;
        u8 timing;
@@ -333,15 +332,17 @@ int __init ht6560b_init(void)
 
        hwif->chipset = ide_ht6560b;
        hwif->selectproc = &ht6560b_selectproc;
+       hwif->host_flags = IDE_HFLAG_ABUSE_PREFETCH;
        hwif->pio_mask = ATA_PIO5;
-       hwif->tuneproc = &tune_ht6560b;
+       hwif->set_pio_mode = &ht6560b_set_pio_mode;
        hwif->serialized = 1;   /* is this needed? */
        hwif->mate = mate;
 
        mate->chipset = ide_ht6560b;
        mate->selectproc = &ht6560b_selectproc;
+       mate->host_flags = IDE_HFLAG_ABUSE_PREFETCH;
        mate->pio_mask = ATA_PIO5;
-       mate->tuneproc = &tune_ht6560b;
+       mate->set_pio_mode = &ht6560b_set_pio_mode;
        mate->serialized = 1;   /* is this needed? */
        mate->mate = hwif;
        mate->channel = 1;