11 #include <linux/module.h>
12 #include <linux/types.h>
13 #include <linux/pci.h>
19 #define DRV_NAME "cy82c693"
30 #define BUSMASTER_TIMEOUT 0x50
36 #define CY82_IDE_CMDREG 0x04
37 #define CY82_IDE_ADDRSETUP 0x48
38 #define CY82_IDE_MASTER_IOR 0x4C
39 #define CY82_IDE_MASTER_IOW 0x4D
40 #define CY82_IDE_SLAVE_IOR 0x4E
41 #define CY82_IDE_SLAVE_IOW 0x4F
42 #define CY82_IDE_MASTER_8BIT 0x50
43 #define CY82_IDE_SLAVE_8BIT 0x51
45 #define CY82_INDEX_PORT 0x22
46 #define CY82_DATA_PORT 0x23
48 #define CY82_INDEX_CHANNEL0 0x30
49 #define CY82_INDEX_CHANNEL1 0x31
50 #define CY82_INDEX_TIMEOUT 0x32
59 u8 single = (mode & 0x10) >> 4,
index = 0,
data = 0;
63 data = (mode & 3) | (single << 2);
87 const unsigned long T = 1000000 / bus_speed;
88 unsigned int addrCtrl;
97 "Cannot find secondary interface!\n",
111 if ((drive->
dn & 1) == 0) {
136 addrCtrl |= (
clamp_val(
t.setup - 1, 0, 15) << 4);
162 .set_pio_mode = cy82c693_set_pio_mode,
163 .set_dma_mode = cy82c693_set_dma_mode,
168 .init_iops = init_iops_cy82c693,
169 .port_ops = &cy82c693_port_ops,
208 static struct pci_driver cy82c693_pci_driver = {
209 .name =
"Cypress_IDE",
210 .id_table = cy82c693_pci_tbl,
211 .probe = cy82c693_init_one,
217 static int __init cy82c693_ide_init(
void)
222 static void __exit cy82c693_ide_exit(
void)
230 MODULE_AUTHOR(
"Andreas Krebs, Andre Hedrick, Bartlomiej Zolnierkiewicz");