2 * linux/drivers/ide/ide_modes.h
4 * Copyright (C) 1996 Linus Torvalds, Igor Abramov, and Mark Lord
10 #include <linux/config.h>
13 * Shared data/functions for determining best PIO mode for an IDE drive.
14 * Most of this stuff originally lived in cmd640.c, and changes to the
15 * ide_pio_blacklist[] table should be made with EXTREME CAUTION to avoid
16 * breaking the fragile cmd640.c support.
20 * Standard (generic) timings for PIO modes, from ATA2 specification.
21 * These timings are for access to the IDE data port register *only*.
22 * Some drives may specify a mode, while also specifying a different
23 * value for cycle_time (from drive identification data).
25 typedef struct ide_pio_timings_s
{
26 int setup_time
; /* Address setup (ns) minimum */
27 int active_time
; /* Active pulse (ns) minimum */
28 int cycle_time
; /* Cycle time (ns) minimum = (setup + active + recovery) */
31 typedef struct ide_pio_data_s
{
36 unsigned int cycle_time
;
39 u8
ide_get_best_pio_mode (ide_drive_t
*drive
, u8 mode_wanted
, u8 max_mode
, ide_pio_data_t
*d
);
40 extern const ide_pio_timings_t ide_pio_timings
[6];
41 #endif /* _IDE_MODES_H */