13 #include <linux/types.h>
14 #include <linux/module.h>
15 #include <linux/kernel.h>
16 #include <linux/pci.h>
21 #define DRV_NAME "opti621"
42 outb(3, reg_base + 2);
43 outb(value, reg_base + reg);
44 outb(0x83, reg_base + 2);
58 outb(3, reg_base + 2);
59 ret =
inb(reg_base + reg);
60 outb(0x83, reg_base + 2);
74 static const u8 addr_timings[2][5] = {
75 { 0x20, 0x10, 0x00, 0x00, 0x00 },
76 { 0x10, 0x10, 0x00, 0x00, 0x00 },
78 static const u8 data_rec_timings[2][5] = {
79 { 0x5b, 0x45, 0x32, 0x21, 0x20 },
80 { 0x48, 0x34, 0x21, 0x10, 0x10 }
83 ide_set_drivedata(drive, (
void *)mode);
86 pair_mode = (
unsigned long)ide_get_drivedata(pair);
87 if (pair_mode && pair_mode < mode)
98 outb(0xff, reg_base + 5);
109 tim = data_rec_timings[clk][
pio];
110 misc = addr_timings[clk][addr_pio];
127 spin_unlock_irqrestore(&opti621_lock, flags);
131 .set_pio_mode = opti621_set_pio_mode,
136 .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} },
137 .port_ops = &opti621_port_ops,
154 static struct pci_driver opti621_pci_driver = {
155 .name =
"Opti621_IDE",
156 .id_table = opti621_pci_tbl,
157 .probe = opti621_init_one,
163 static int __init opti621_ide_init(
void)
168 static void __exit opti621_ide_exit(
void)