diff options
Diffstat (limited to 'drivers/ide/legacy/ht6560b.c')
-rw-r--r-- | drivers/ide/legacy/ht6560b.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c index dd6dfb32e853..7bc8fd59ea9e 100644 --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c | |||
@@ -216,6 +216,7 @@ static u8 ht_pio2timings(ide_drive_t *drive, const u8 pio) | |||
216 | 216 | ||
217 | if (pio) { | 217 | if (pio) { |
218 | unsigned int cycle_time; | 218 | unsigned int cycle_time; |
219 | struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio); | ||
219 | 220 | ||
220 | cycle_time = ide_pio_cycle_time(drive, pio); | 221 | cycle_time = ide_pio_cycle_time(drive, pio); |
221 | 222 | ||
@@ -224,10 +225,8 @@ static u8 ht_pio2timings(ide_drive_t *drive, const u8 pio) | |||
224 | * actual cycle time for recovery and activity | 225 | * actual cycle time for recovery and activity |
225 | * according system bus speed. | 226 | * according system bus speed. |
226 | */ | 227 | */ |
227 | active_time = ide_pio_timings[pio].active_time; | 228 | active_time = t->active; |
228 | recovery_time = cycle_time | 229 | recovery_time = cycle_time - active_time - t->setup; |
229 | - active_time | ||
230 | - ide_pio_timings[pio].setup_time; | ||
231 | /* | 230 | /* |
232 | * Cycle times should be Vesa bus cycles | 231 | * Cycle times should be Vesa bus cycles |
233 | */ | 232 | */ |
@@ -311,16 +310,16 @@ static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
311 | #endif | 310 | #endif |
312 | } | 311 | } |
313 | 312 | ||
314 | static void __init ht6560b_port_init_devs(ide_hwif_t *hwif) | 313 | static void __init ht6560b_init_dev(ide_drive_t *drive) |
315 | { | 314 | { |
315 | ide_hwif_t *hwif = drive->hwif; | ||
316 | /* Setting default configurations for drives. */ | 316 | /* Setting default configurations for drives. */ |
317 | int t = (HT_CONFIG_DEFAULT << 8) | HT_TIMING_DEFAULT; | 317 | int t = (HT_CONFIG_DEFAULT << 8) | HT_TIMING_DEFAULT; |
318 | 318 | ||
319 | if (hwif->channel) | 319 | if (hwif->channel) |
320 | t |= (HT_SECONDARY_IF << 8); | 320 | t |= (HT_SECONDARY_IF << 8); |
321 | 321 | ||
322 | hwif->drives[0].drive_data = t; | 322 | drive->drive_data = t; |
323 | hwif->drives[1].drive_data = t; | ||
324 | } | 323 | } |
325 | 324 | ||
326 | static int probe_ht6560b; | 325 | static int probe_ht6560b; |
@@ -329,7 +328,7 @@ module_param_named(probe, probe_ht6560b, bool, 0); | |||
329 | MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); | 328 | MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); |
330 | 329 | ||
331 | static const struct ide_port_ops ht6560b_port_ops = { | 330 | static const struct ide_port_ops ht6560b_port_ops = { |
332 | .port_init_devs = ht6560b_port_init_devs, | 331 | .init_dev = ht6560b_init_dev, |
333 | .set_pio_mode = ht6560b_set_pio_mode, | 332 | .set_pio_mode = ht6560b_set_pio_mode, |
334 | .selectproc = ht6560b_selectproc, | 333 | .selectproc = ht6560b_selectproc, |
335 | }; | 334 | }; |