aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/ali14xx.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 19:31:22 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 19:31:22 -0400
commit64fb98fc40738ae1a98bcea9ca3145b89fb71524 (patch)
tree24130f9c56b04638e91969d216db199652470a17 /drivers/ide/legacy/ali14xx.c
parent5f47c7eac65a45e33d7fe390effe75ec5c74f8bf (diff)
parent89636af25d75d8672aea05d258be357d0dc4bd70 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (23 commits) ide: add support for SCSI ioctls to ide-floppy ide: remove stale changelog from setup-pci.c ide: remove stale changelog/comments/TODO from ide.c ide-cris: handle PIO auto-tuning in tune_cris_ide() ide: add PIO masks ide: remove ide_find_best_pio_mode() ide: drop "PIO data" argument from ide_get_best_pio_mode() ide: ide_find_best_pio_mode() fixes (take 2) ide: add ide_pio_cycle_time() helper (take 2) sc1200: remove stale Power Management code ide: ide_start_power_step() fix WRT disabling DMA serverworks: fix DMA serverworks: always tune PIO ide: add ide_pci_device_t.host_flags (take 2) ide: add ide_dev_has_iordy() helper (take 4) ide: make ide_get_best_pio_mode() print info if overriding PIO mode siimage: PIO mode setup fixes (take 2) atiixp: PIO mode setup fixes ide: Stop mapping ROMs IDE: Remove references to dead ETRAX-related variables. ...
Diffstat (limited to 'drivers/ide/legacy/ali14xx.c')
-rw-r--r--drivers/ide/legacy/ali14xx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index df17ed68c0bc..9b9c4761cb7d 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -115,13 +115,12 @@ static void ali14xx_tune_drive (ide_drive_t *drive, u8 pio)
115 int time1, time2; 115 int time1, time2;
116 u8 param1, param2, param3, param4; 116 u8 param1, param2, param3, param4;
117 unsigned long flags; 117 unsigned long flags;
118 ide_pio_data_t d;
119 int bus_speed = system_bus_clock(); 118 int bus_speed = system_bus_clock();
120 119
121 pio = ide_get_best_pio_mode(drive, pio, ALI_MAX_PIO, &d); 120 pio = ide_get_best_pio_mode(drive, pio, ALI_MAX_PIO);
122 121
123 /* calculate timing, according to PIO mode */ 122 /* calculate timing, according to PIO mode */
124 time1 = d.cycle_time; 123 time1 = ide_pio_cycle_time(drive, pio);
125 time2 = ide_pio_timings[pio].active_time; 124 time2 = ide_pio_timings[pio].active_time;
126 param3 = param1 = (time2 * bus_speed + 999) / 1000; 125 param3 = param1 = (time2 * bus_speed + 999) / 1000;
127 param4 = param2 = (time1 * bus_speed + 999) / 1000 - param1; 126 param4 = param2 = (time1 * bus_speed + 999) / 1000 - param1;
@@ -212,10 +211,12 @@ static int __init ali14xx_probe(void)
212 mate = &ide_hwifs[1]; 211 mate = &ide_hwifs[1];
213 212
214 hwif->chipset = ide_ali14xx; 213 hwif->chipset = ide_ali14xx;
214 hwif->pio_mask = ATA_PIO4;
215 hwif->tuneproc = &ali14xx_tune_drive; 215 hwif->tuneproc = &ali14xx_tune_drive;
216 hwif->mate = mate; 216 hwif->mate = mate;
217 217
218 mate->chipset = ide_ali14xx; 218 mate->chipset = ide_ali14xx;
219 mate->pio_mask = ATA_PIO4;
219 mate->tuneproc = &ali14xx_tune_drive; 220 mate->tuneproc = &ali14xx_tune_drive;
220 mate->mate = hwif; 221 mate->mate = hwif;
221 mate->channel = 1; 222 mate->channel = 1;