Lines Matching refs:hwif
147 ide_hwif_t *hwif = HWIF(drive); in trm290_prepare_drive() local
156 if (reg != hwif->select_data) { in trm290_prepare_drive()
157 hwif->select_data = reg; in trm290_prepare_drive()
159 hwif->OUTB(0x51|(hwif->channel<<3), hwif->config_data+1); in trm290_prepare_drive()
160 hwif->OUTW(reg & 0xff, hwif->config_data); in trm290_prepare_drive()
165 reg = hwif->INW(hwif->config_data + 3); in trm290_prepare_drive()
167 reg &= ~(1 << hwif->channel); in trm290_prepare_drive()
168 hwif->OUTW(reg, hwif->config_data+3); in trm290_prepare_drive()
182 ide_hwif_t *hwif = HWIF(drive); in trm290_ide_dma_write() local
202 hwif->OUTL(hwif->dmatable_dma|reading|writing, hwif->dma_command); in trm290_ide_dma_write()
205 hwif->OUTW((count * 2) - 1, hwif->dma_status); in trm290_ide_dma_write()
227 hwif->OUTB(command, IDE_COMMAND_REG); in trm290_ide_dma_write()
233 ide_hwif_t *hwif = HWIF(drive); in trm290_ide_dma_read() local
246 hwif->OUTL(hwif->dmatable_dma|reading|writing, hwif->dma_command); in trm290_ide_dma_read()
249 hwif->OUTW((count * 2) - 1, hwif->dma_status); in trm290_ide_dma_read()
271 hwif->OUTB(command, IDE_COMMAND_REG); in trm290_ide_dma_read()
282 ide_hwif_t *hwif = HWIF(drive); in trm290_ide_dma_end() local
288 status = hwif->INW(hwif->dma_status); in trm290_ide_dma_end()
294 ide_hwif_t *hwif = HWIF(drive); in trm290_ide_dma_test_irq() local
297 status = hwif->INW(hwif->dma_status); in trm290_ide_dma_test_irq()
305 void __init init_hwif_trm290 (ide_hwif_t *hwif) in init_hwif_trm290() argument
310 struct pci_dev *dev = hwif->pci_dev; in init_hwif_trm290()
312 hwif->addressing = 1; in init_hwif_trm290()
313 hwif->chipset = ide_trm290; in init_hwif_trm290()
316 hwif->config_data = cfgbase; in init_hwif_trm290()
318 hwif->config_data); in init_hwif_trm290()
320 hwif->config_data = 0x3df0; in init_hwif_trm290()
322 hwif->config_data); in init_hwif_trm290()
327 hwif->OUTB(0x51|(hwif->channel<<3), hwif->config_data+1); in init_hwif_trm290()
329 hwif->select_data = 0x21; in init_hwif_trm290()
330 hwif->OUTB(hwif->select_data, hwif->config_data); in init_hwif_trm290()
332 reg = hwif->INB(hwif->config_data+3); in init_hwif_trm290()
335 hwif->OUTB(reg, hwif->config_data+3); in init_hwif_trm290()
340 hwif->irq = hwif->channel ? 15 : 14; in init_hwif_trm290()
341 else if (!hwif->irq && hwif->mate && hwif->mate->irq) in init_hwif_trm290()
343 hwif->irq = hwif->mate->irq; in init_hwif_trm290()
345 ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3); in init_hwif_trm290()
348 hwif->ide_dma_write = &trm290_ide_dma_write; in init_hwif_trm290()
349 hwif->ide_dma_read = &trm290_ide_dma_read; in init_hwif_trm290()
350 hwif->ide_dma_begin = &trm290_ide_dma_begin; in init_hwif_trm290()
351 hwif->ide_dma_end = &trm290_ide_dma_end; in init_hwif_trm290()
352 hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq; in init_hwif_trm290()
355 hwif->selectproc = &trm290_selectproc; in init_hwif_trm290()
356 hwif->autodma = 0; /* play it safe for now */ in init_hwif_trm290()
357 hwif->drives[0].autodma = hwif->autodma; in init_hwif_trm290()
358 hwif->drives[1].autodma = hwif->autodma; in init_hwif_trm290()
366 u16 new, old, compat = hwif->channel ? 0x374 : 0x3f4; in init_hwif_trm290()
370 hwif->OUTB(0x54|(hwif->channel<<3), hwif->config_data+1); in init_hwif_trm290()
371 old = hwif->INW(hwif->config_data); in init_hwif_trm290()
373 old_mask = hwif->INB(old+2); in init_hwif_trm290()
380 hwif->name, (compat + 2)); in init_hwif_trm290()
387 hwif->io_ports[IDE_CONTROL_OFFSET] = compat + 2; in init_hwif_trm290()
388 hwif->OUTW(compat|1, hwif->config_data); in init_hwif_trm290()
389 new = hwif->INW(hwif->config_data); in init_hwif_trm290()
392 hwif->name, old, new & ~1); in init_hwif_trm290()