Lines Matching refs:hwif
152 ide_hwif_t *hwif = HWIF(drive); in sc1200_autoselect_dma_mode() local
154 ide_drive_t *mate = &hwif->drives[unit^1]; in sc1200_autoselect_dma_mode()
168 if ((mateid->capability & 1) && !hwif->ide_dma_bad_drive(mate)) { in sc1200_autoselect_dma_mode()
181 if ((id->capability & 1) && hwif->autodma && !hwif->ide_dma_bad_drive(drive)) { in sc1200_autoselect_dma_mode()
208 ide_hwif_t *hwif = HWIF(drive); in sc1200_config_dma2() local
212 unsigned int basereg = hwif->channel ? 0x50 : 0x40; in sc1200_config_dma2()
217 hwif->ide_dma_off_quietly(drive); /* turn off DMA while we fiddle */ in sc1200_config_dma2()
218 outb(inb(hwif->dma_base+2)&~(unit?0x40:0x20), hwif->dma_base+2); /* clear DMA_capable bit */ in sc1200_config_dma2()
288 pci_read_config_dword(hwif->pci_dev, basereg+4, ®); in sc1200_config_dma2()
290 pci_write_config_dword(hwif->pci_dev, basereg+4, timings); in sc1200_config_dma2()
292 pci_write_config_dword(hwif->pci_dev, basereg+12, timings); in sc1200_config_dma2()
295 outb(inb(hwif->dma_base+2)|(unit?0x40:0x20), hwif->dma_base+2); /* set DMA_capable bit */ in sc1200_config_dma2()
300 return hwif->ide_dma_on(drive); /* success */ in sc1200_config_dma2()
320 ide_hwif_t *hwif = HWIF(drive); in sc1200_ide_dma_end() local
321 unsigned long dma_base = hwif->dma_base; in sc1200_ide_dma_end()
348 ide_hwif_t *hwif = HWIF(drive); in sc1200_tuneproc() local
370 unsigned int basereg = hwif->channel ? 0x50 : 0x40; in sc1200_tuneproc()
371 pci_read_config_dword (hwif->pci_dev, basereg+4, &format); in sc1200_tuneproc()
375 …pci_write_config_dword(hwif->pci_dev, basereg + (drive->select.b.unit << 3), sc1200_pio_timings[fo… in sc1200_tuneproc()
384 ide_hwif_t *hwif = &ide_hwifs[h]; in lookup_pci_dev() local
386 if (hwif == prev) in lookup_pci_dev()
389 if (hwif && hwif->pci_dev == dev) in lookup_pci_dev()
390 return hwif; // found next match in lookup_pci_dev()
402 ide_hwif_t *hwif = NULL; in sc1200_save_state() local
410 while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { in sc1200_save_state()
416 ss = (sc1200_saved_state_t *)hwif->config_data; in sc1200_save_state()
421 hwif->config_data = (unsigned long)ss; in sc1200_save_state()
423 ss = (sc1200_saved_state_t *)hwif->config_data; in sc1200_save_state()
427 basereg = hwif->channel ? 0x50 : 0x40; in sc1200_save_state()
429 pci_read_config_dword (hwif->pci_dev, basereg + (r<<2), &ss->regs[r]); in sc1200_save_state()
448 ide_hwif_t *hwif = NULL; in sc1200_resume() local
457 while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { in sc1200_resume()
459 sc1200_saved_state_t *ss = (sc1200_saved_state_t *)hwif->config_data; in sc1200_resume()
460 printk("%s: SC1200: resume\n", hwif->name); in sc1200_resume()
465 basereg = hwif->channel ? 0x50 : 0x40; in sc1200_resume()
468 pci_write_config_dword(hwif->pci_dev, basereg + (r<<2), ss->regs[r]); in sc1200_resume()
474 pci_read_config_dword(hwif->pci_dev, basereg+4, &format); in sc1200_resume()
479 ide_drive_t *drive = &(hwif->drives[d]); in sc1200_resume()
482 pci_read_config_dword(hwif->pci_dev, basereg+(drive->select.b.unit << 3), &timings); in sc1200_resume()
496 ide_drive_t *drive = &(hwif->drives[d]); in sc1200_resume()
497 if (drive->present && !hwif->ide_dma_bad_drive(drive)) { in sc1200_resume()
499 hwif->ide_dma_off_quietly(drive); in sc1200_resume()
502 hwif->ide_dma_off_quietly(drive); in sc1200_resume()
529 static void __init init_hwif_sc1200 (ide_hwif_t *hwif) in init_hwif_sc1200() argument
531 if (hwif->mate) in init_hwif_sc1200()
532 hwif->serialized = hwif->mate->serialized = 1; in init_hwif_sc1200()
533 hwif->autodma = 0; in init_hwif_sc1200()
534 if (hwif->dma_base) { in init_hwif_sc1200()
535 hwif->ide_dma_check = &sc1200_config_dma; in init_hwif_sc1200()
536 hwif->ide_dma_end = &sc1200_ide_dma_end; in init_hwif_sc1200()
538 hwif->autodma = 1; in init_hwif_sc1200()
539 hwif->tuneproc = &sc1200_tuneproc; in init_hwif_sc1200()
541 hwif->atapi_dma = 1; in init_hwif_sc1200()
542 hwif->ultra_mask = 0x07; in init_hwif_sc1200()
543 hwif->mwdma_mask = 0x07; in init_hwif_sc1200()
545 hwif->drives[0].autodma = hwif->autodma; in init_hwif_sc1200()
546 hwif->drives[1].autodma = hwif->autodma; in init_hwif_sc1200()
549 static void __init init_dma_sc1200 (ide_hwif_t *hwif, unsigned long dmabase) in init_dma_sc1200() argument
551 ide_setup_dma(hwif, dmabase, 8); in init_dma_sc1200()