2 * linux/drivers/block/qd6580.c Version 0.02 Feb 09, 1996
4 * Copyright (C) 1996 Linus Torvalds & author (see below)
8 * QDI QD6580 EIDE controller fast support by Colten Edwards.
9 * No net access, but (maybe) can be reached at pje120@cs.usask.ca
12 #undef REALLY_SLOW_IO /* most systems can safely undef this */
14 #include <linux/types.h>
15 #include <linux/kernel.h>
16 #include <linux/delay.h>
17 #include <linux/timer.h>
19 #include <linux/ioport.h>
20 #include <linux/blkdev.h>
21 #include <linux/hdreg.h>
22 #include <linux/ide.h>
26 #include "ide_modes.h"
29 * Register 0xb3 looks like:
30 * 0x4f is fast mode3 ?
31 * 0x3f is medium mode2 ?
32 * 0x2f is slower mode1 ?
33 * 0x1f is slower yet mode0 ?
36 * Don't know whether this sets BOTH drives, or just the first drive.
37 * Don't know if there is a separate setting for the second drive.
39 * Feel free to patch this if you have one of these beasts
40 * and can work out the answers!
42 * I/O ports are 0xb0 0xb2 and 0xb3
44 * More research on qd6580 being done by willmore@cig.mot.com (David)
45 * -- this is apparently a *dual* IDE interface
48 static void tune_qd6580 (ide_drive_t
*drive
, byte pio
)
52 pio
= ide_get_best_pio_mode(drive
, pio
, 3, NULL
);
54 save_flags(flags
); /* all CPUs */
58 outb_p(((pio
+1)<<4)|0x0f,0xb3);
60 restore_flags(flags
); /* all CPUs */
63 void init_qd6580 (void)
65 ide_hwifs
[0].chipset
= ide_qd6580
;
66 ide_hwifs
[1].chipset
= ide_qd6580
;
67 ide_hwifs
[0].tuneproc
= &tune_qd6580
;
68 ide_hwifs
[0].mate
= &ide_hwifs
[1];
69 ide_hwifs
[1].mate
= &ide_hwifs
[0];
70 ide_hwifs
[1].channel
= 1;