]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/ide/legacy/ali14xx.c
ide: add PIO masks
[karo-tx-linux.git] / drivers / ide / legacy / ali14xx.c
index 91961aa030474fa02057f8ed2e8dd270b69f87d3..9b9c4761cb7df42e542a9bcffc6b358dc7c21f53 100644 (file)
@@ -115,13 +115,12 @@ static void ali14xx_tune_drive (ide_drive_t *drive, u8 pio)
        int time1, time2;
        u8 param1, param2, param3, param4;
        unsigned long flags;
-       ide_pio_data_t d;
        int bus_speed = system_bus_clock();
 
-       pio = ide_get_best_pio_mode(drive, pio, ALI_MAX_PIO, &d);
+       pio = ide_get_best_pio_mode(drive, pio, ALI_MAX_PIO);
 
        /* calculate timing, according to PIO mode */
-       time1 = d.cycle_time;
+       time1 = ide_pio_cycle_time(drive, pio);
        time2 = ide_pio_timings[pio].active_time;
        param3 = param1 = (time2 * bus_speed + 999) / 1000;
        param4 = param2 = (time1 * bus_speed + 999) / 1000 - param1;
@@ -212,10 +211,12 @@ static int __init ali14xx_probe(void)
        mate = &ide_hwifs[1];
 
        hwif->chipset = ide_ali14xx;
+       hwif->pio_mask = ATA_PIO4;
        hwif->tuneproc = &ali14xx_tune_drive;
        hwif->mate = mate;
 
        mate->chipset = ide_ali14xx;
+       mate->pio_mask = ATA_PIO4;
        mate->tuneproc = &ali14xx_tune_drive;
        mate->mate = hwif;
        mate->channel = 1;
@@ -223,7 +224,8 @@ static int __init ali14xx_probe(void)
        probe_hwif_init(hwif);
        probe_hwif_init(mate);
 
-       create_proc_ide_interfaces();
+       ide_proc_register_port(hwif);
+       ide_proc_register_port(mate);
 
        return 0;
 }