33 #define TRM290_NO_DMA_WRITES
131 #include <linux/types.h>
132 #include <linux/module.h>
133 #include <linux/kernel.h>
138 #include <linux/pci.h>
143 #define DRV_NAME "trm290"
152 reg = use_dma ? (0x21 | 0x82) : (0x21 & ~0x82);
184 #ifdef TRM290_NO_DMA_WRITES
211 trm290_prepare_drive(drive, 1);
218 trm290_prepare_drive(drive, 0);
220 return status != 0x00ff;
227 return status == 0x00ff;
230 static void trm290_dma_host_set(
ide_drive_t *drive,
int on)
241 if ((dev->
class & 5) && cfg_base)
266 reg = (reg & 0x10) | 0x03;
281 u16 new, old, compat = hwif->
channel ? 0x374 : 0x3f4;
282 static u16 next_offset = 0;
288 old_mask =
inb(old + 2);
289 if (old != compat && old_mask == 0xff) {
291 compat += (next_offset += 0x400);
292 hwif->
io_ports.ctl_addr = compat + 2;
296 "old=0x%04x, new=0x%04x\n",
297 hwif->
name, old,
new & ~1);
303 static const struct ide_tp_ops trm290_tp_ops = {
309 .dev_select = trm290_dev_select,
318 .dma_host_set = trm290_dma_host_set,
319 .dma_setup = trm290_dma_setup,
320 .dma_start = trm290_dma_start,
321 .dma_end = trm290_dma_end,
322 .dma_test_irq = trm290_dma_test_irq,
324 .dma_check = trm290_dma_check,
329 .init_hwif = init_hwif_trm290,
330 .tp_ops = &trm290_tp_ops,
331 .dma_ops = &trm290_dma_ops,
352 static struct pci_driver trm290_pci_driver = {
353 .name =
"TRM290_IDE",
354 .id_table = trm290_pci_tbl,
355 .probe = trm290_init_one,
359 static int __init trm290_ide_init(
void)
364 static void __exit trm290_ide_exit(
void)