aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/ht6560b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/legacy/ht6560b.c')
-rw-r--r--drivers/ide/legacy/ht6560b.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index bfaa2025173b..2e5a9cc5c0f7 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -199,7 +199,7 @@ static int __init try_to_init_ht6560b(void)
199 return 1; 199 return 1;
200} 200}
201 201
202static u8 ht_pio2timings(ide_drive_t *drive, u8 pio) 202static u8 ht_pio2timings(ide_drive_t *drive, const u8 pio)
203{ 203{
204 int active_time, recovery_time; 204 int active_time, recovery_time;
205 int active_cycles, recovery_cycles; 205 int active_cycles, recovery_cycles;
@@ -208,7 +208,6 @@ static u8 ht_pio2timings(ide_drive_t *drive, u8 pio)
208 if (pio) { 208 if (pio) {
209 unsigned int cycle_time; 209 unsigned int cycle_time;
210 210
211 pio = ide_get_best_pio_mode(drive, pio, 5);
212 cycle_time = ide_pio_cycle_time(drive, pio); 211 cycle_time = ide_pio_cycle_time(drive, pio);
213 212
214 /* 213 /*
@@ -277,7 +276,7 @@ static void ht_set_prefetch(ide_drive_t *drive, u8 state)
277#endif 276#endif
278} 277}
279 278
280static void tune_ht6560b (ide_drive_t *drive, u8 pio) 279static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio)
281{ 280{
282 unsigned long flags; 281 unsigned long flags;
283 u8 timing; 282 u8 timing;
@@ -333,15 +332,17 @@ int __init ht6560b_init(void)
333 332
334 hwif->chipset = ide_ht6560b; 333 hwif->chipset = ide_ht6560b;
335 hwif->selectproc = &ht6560b_selectproc; 334 hwif->selectproc = &ht6560b_selectproc;
335 hwif->host_flags = IDE_HFLAG_ABUSE_PREFETCH;
336 hwif->pio_mask = ATA_PIO5; 336 hwif->pio_mask = ATA_PIO5;
337 hwif->tuneproc = &tune_ht6560b; 337 hwif->set_pio_mode = &ht6560b_set_pio_mode;
338 hwif->serialized = 1; /* is this needed? */ 338 hwif->serialized = 1; /* is this needed? */
339 hwif->mate = mate; 339 hwif->mate = mate;
340 340
341 mate->chipset = ide_ht6560b; 341 mate->chipset = ide_ht6560b;
342 mate->selectproc = &ht6560b_selectproc; 342 mate->selectproc = &ht6560b_selectproc;
343 mate->host_flags = IDE_HFLAG_ABUSE_PREFETCH;
343 mate->pio_mask = ATA_PIO5; 344 mate->pio_mask = ATA_PIO5;
344 mate->tuneproc = &tune_ht6560b; 345 mate->set_pio_mode = &ht6560b_set_pio_mode;
345 mate->serialized = 1; /* is this needed? */ 346 mate->serialized = 1; /* is this needed? */
346 mate->mate = hwif; 347 mate->mate = hwif;
347 mate->channel = 1; 348 mate->channel = 1;