10 #include <linux/types.h>
11 #include <linux/pci.h>
13 #include <linux/module.h>
15 #define DRV_NAME "tc86c001"
19 unsigned long scr_port = hwif->
config_data + (drive->
dn ? 0x02 : 0x00);
37 default: mode = 0x0000;
break;
48 tc86c001_set_mode(hwif, drive);
65 static int tc86c001_timer_expiry(
ide_drive_t *drive)
74 if ((dma_stat & 5) == 1) {
76 unsigned long twcr_port = sc_base + (drive->
dn ? 0x06 : 0x04);
80 "attempting recovery...\n", drive->
name);
86 outw(0, sc_base + 0x0a);
106 return expiry(drive);
116 unsigned long twcr_port = sc_base + (drive->
dn ? 0x06 : 0x04);
117 unsigned long nsectors = blk_rq_sectors(hwif->
rq);
124 outw(nsectors, sc_base + 0x0a);
128 ide_set_hwifdata(hwif, hwif->
expiry);
129 hwif->
expiry = &tc86c001_timer_expiry;
138 u16 scr1 =
inw(sc_base + 0x00);
151 u16 scr1 =
inw(sc_base + 0x00);
154 outw(scr1 | 0x8000, sc_base + 0x00);
157 outw(scr1 | 0x4000, sc_base + 0x00);
160 outw(scr1 & ~0xc000, sc_base + 0x00);
172 outw(0x0003, sc_base + 0x0c);
179 .set_pio_mode = tc86c001_set_pio_mode,
180 .set_dma_mode = tc86c001_set_mode,
181 .cable_detect = tc86c001_cable_detect,
184 static const struct ide_dma_ops tc86c001_dma_ops = {
187 .dma_start = tc86c001_dma_start,
197 .init_hwif = init_hwif_tc86c001,
198 .port_ops = &tc86c001_port_ops,
199 .dma_ops = &tc86c001_dma_ops,
248 static struct pci_driver tc86c001_pci_driver = {
250 .id_table = tc86c001_pci_tbl,
251 .probe = tc86c001_init_one,
255 static int __init tc86c001_ide_init(
void)
260 static void __exit tc86c001_ide_exit(
void)