Lines Matching refs:hwif
152 ide_hwif_t *hwif = HWIF(drive); in compute_pios() local
156 drive = &hwif->drives[d]; in compute_pios()
182 static void write_reg(ide_hwif_t *hwif, u8 value, int reg) in write_reg() argument
189 hwif->INW(reg_base+1); in write_reg()
190 hwif->INW(reg_base+1); in write_reg()
191 hwif->OUTB(3, reg_base+2); in write_reg()
192 hwif->OUTB(value, reg_base+reg); in write_reg()
193 hwif->OUTB(0x83, reg_base+2); in write_reg()
196 static u8 read_reg(ide_hwif_t *hwif, int reg) in read_reg() argument
205 hwif->INW(reg_base+1); in read_reg()
206 hwif->INW(reg_base+1); in read_reg()
207 hwif->OUTB(3, reg_base+2); in read_reg()
208 ret = hwif->INB(reg_base+reg); in read_reg()
209 hwif->OUTB(0x83, reg_base+2); in read_reg()
257 ide_hwif_t *hwif = HWIF(drive); in opti621_tune_drive() local
261 pio1 = hwif->drives[0].drive_data; in opti621_tune_drive()
262 pio2 = hwif->drives[1].drive_data; in opti621_tune_drive()
279 hwif->name, ax, first.data_time, in opti621_tune_drive()
283 hwif->name, ax, second.data_time, in opti621_tune_drive()
289 reg_base = hwif->io_ports[IDE_DATA_OFFSET]; in opti621_tune_drive()
292 hwif->OUTB(0xc0, reg_base+CNTRL_REG); in opti621_tune_drive()
294 hwif->OUTB(0xff, reg_base+5); in opti621_tune_drive()
296 (void) hwif->INB(reg_base+CNTRL_REG); in opti621_tune_drive()
298 read_reg(hwif, CNTRL_REG); in opti621_tune_drive()
300 read_reg(hwif, STRAP_REG); in opti621_tune_drive()
304 write_reg(hwif, 0, MISC_REG); in opti621_tune_drive()
306 write_reg(hwif, cycle1, READ_REG); in opti621_tune_drive()
308 write_reg(hwif, cycle1, WRITE_REG); in opti621_tune_drive()
312 write_reg(hwif, 1, MISC_REG); in opti621_tune_drive()
314 write_reg(hwif, cycle2, READ_REG); in opti621_tune_drive()
316 write_reg(hwif, cycle2, WRITE_REG); in opti621_tune_drive()
320 write_reg(hwif, 0x85, CNTRL_REG); in opti621_tune_drive()
324 write_reg(hwif, misc, MISC_REG); in opti621_tune_drive()
332 static void __init init_hwif_opti621 (ide_hwif_t *hwif) in init_hwif_opti621() argument
334 hwif->autodma = 0; in init_hwif_opti621()
335 hwif->drives[0].drive_data = PIO_DONT_KNOW; in init_hwif_opti621()
336 hwif->drives[1].drive_data = PIO_DONT_KNOW; in init_hwif_opti621()
337 hwif->tuneproc = &opti621_tune_drive; in init_hwif_opti621()
339 if (!(hwif->dma_base)) in init_hwif_opti621()
342 hwif->atapi_dma = 1; in init_hwif_opti621()
343 hwif->mwdma_mask = 0x07; in init_hwif_opti621()
344 hwif->swdma_mask = 0x07; in init_hwif_opti621()
347 hwif->autodma = 1; in init_hwif_opti621()
348 hwif->drives[0].autodma = hwif->autodma; in init_hwif_opti621()
349 hwif->drives[1].autodma = hwif->autodma; in init_hwif_opti621()
352 static void __init init_dma_opti621 (ide_hwif_t *hwif, unsigned long dmabase) in init_dma_opti621() argument
354 ide_setup_dma(hwif, dmabase, 8); in init_dma_opti621()