24 #include <linux/kernel.h>
26 #include <linux/module.h>
57 {
XFER_PIO_5, 15, 65, 25, 100, 65, 25, 100, 0 },
58 {
XFER_PIO_4, 25, 70, 25, 120, 70, 25, 120, 0 },
59 {
XFER_PIO_3, 30, 80, 70, 180, 80, 70, 180, 0 },
61 {
XFER_PIO_2, 30, 290, 40, 330, 100, 90, 240, 0 },
62 {
XFER_PIO_1, 50, 290, 93, 383, 125, 100, 383, 0 },
63 {
XFER_PIO_0, 70, 290, 240, 600, 165, 150, 600, 0 },
74 for (t = ide_timing; t->
mode != speed; t++)
94 if (pio < 3 && cycle < t->cycle)
98 if (pio > 4 && ata_id_is_cfa(
id))
102 return cycle ? cycle : t->
cycle;
106 #define ENOUGH(v, unit) (((v) - 1) / (unit) + 1)
107 #define EZ(v, unit) ((v) ? ENOUGH(v, unit) : 0)
109 static void ide_timing_quantize(
struct ide_timing *
t,
struct ide_timing *
q,
123 struct ide_timing *
m,
unsigned int what)
145 struct ide_timing *
t,
int T,
int UT)
148 struct ide_timing *
s,
p;
184 ide_timing_quantize(t, t, T, UT);