Lines Matching refs:hwif

386 	ide_hwif_t *hwif	= HWIF(drive);  in cmd64x_tune_chipset()  local
387 struct pci_dev *dev = hwif->pci_dev; in cmd64x_tune_chipset()
390 u8 regU = 0, pciU = (hwif->channel) ? UDIDETCR1 : UDIDETCR0; in cmd64x_tune_chipset()
391 u8 regD = 0, pciD = (hwif->channel) ? BMIDESR1 : BMIDESR0; in cmd64x_tune_chipset()
458 ide_hwif_t *hwif = HWIF(drive); in cmd64x_config_drive_for_dma() local
463 if (hwif->ide_dma_bad_drive(drive)) in cmd64x_config_drive_for_dma()
466 if (id->dma_ultra & hwif->ultra_mask) { in cmd64x_config_drive_for_dma()
474 if ((id->dma_mword & hwif->mwdma_mask) || in cmd64x_config_drive_for_dma()
475 (id->dma_1word & hwif->swdma_mask)) { in cmd64x_config_drive_for_dma()
480 } else if (hwif->ide_dma_good_drive(drive) && in cmd64x_config_drive_for_dma()
488 return hwif->ide_dma_on(drive); in cmd64x_config_drive_for_dma()
493 return hwif->ide_dma_off_quietly(drive); in cmd64x_config_drive_for_dma()
514 ide_hwif_t *hwif = HWIF(drive); in cmd64x_ide_dma_end() local
515 struct pci_dev *dev = hwif->pci_dev; in cmd64x_ide_dma_end()
519 dma_cmd = hwif->INB(hwif->dma_command); in cmd64x_ide_dma_end()
521 hwif->OUTB((dma_cmd & ~1), hwif->dma_command); in cmd64x_ide_dma_end()
523 dma_stat = hwif->INB(hwif->dma_status); in cmd64x_ide_dma_end()
525 hwif->OUTB(dma_stat|6, hwif->dma_status); in cmd64x_ide_dma_end()
528 u8 dma_mask = (hwif->channel) ? ARTTIM23_INTR_CH1 : in cmd64x_ide_dma_end()
530 u8 dma_reg = (hwif->channel) ? ARTTIM2 : CFR; in cmd64x_ide_dma_end()
543 ide_hwif_t *hwif = HWIF(drive); in cmd64x_ide_dma_test_irq() local
544 struct pci_dev *dev = hwif->pci_dev; in cmd64x_ide_dma_test_irq()
545 u8 dma_alt_stat = 0, mask = (hwif->channel) ? MRDMODE_INTR_CH1 : in cmd64x_ide_dma_test_irq()
547 u8 dma_stat = hwif->INB(hwif->dma_status); in cmd64x_ide_dma_test_irq()
572 ide_hwif_t *hwif = HWIF(drive); in cmd646_1_ide_dma_end() local
577 dma_stat = hwif->INB(hwif->dma_status); in cmd646_1_ide_dma_end()
579 dma_cmd = hwif->INB(hwif->dma_command); in cmd646_1_ide_dma_end()
581 hwif->OUTB((dma_cmd & ~1), hwif->dma_command); in cmd646_1_ide_dma_end()
583 hwif->OUTB(dma_stat|6, hwif->dma_status); in cmd646_1_ide_dma_end()
681 static unsigned int __init ata66_cmd64x (ide_hwif_t *hwif) in ata66_cmd64x() argument
683 u8 ata66 = 0, mask = (hwif->channel) ? 0x02 : 0x01; in ata66_cmd64x()
685 switch(hwif->pci_dev->device) { in ata66_cmd64x()
692 pci_read_config_byte(hwif->pci_dev, BMIDECSR, &ata66); in ata66_cmd64x()
696 static void __init init_hwif_cmd64x (ide_hwif_t *hwif) in init_hwif_cmd64x() argument
698 struct pci_dev *dev = hwif->pci_dev; in init_hwif_cmd64x()
701 hwif->autodma = 0; in init_hwif_cmd64x()
705 hwif->tuneproc = &cmd64x_tuneproc; in init_hwif_cmd64x()
706 hwif->speedproc = &cmd64x_tune_chipset; in init_hwif_cmd64x()
708 if (!hwif->dma_base) { in init_hwif_cmd64x()
709 hwif->drives[0].autotune = 1; in init_hwif_cmd64x()
710 hwif->drives[1].autotune = 1; in init_hwif_cmd64x()
714 hwif->atapi_dma = 1; in init_hwif_cmd64x()
716 hwif->ultra_mask = 0x3f; in init_hwif_cmd64x()
717 hwif->mwdma_mask = 0x07; in init_hwif_cmd64x()
718 hwif->swdma_mask = 0x07; in init_hwif_cmd64x()
721 hwif->ultra_mask = 0x80; in init_hwif_cmd64x()
723 hwif->ultra_mask = (class_rev > 0x04) ? 0x07 : 0x80; in init_hwif_cmd64x()
725 hwif->ultra_mask = 0x1f; in init_hwif_cmd64x()
727 hwif->ide_dma_check = &cmd64x_config_drive_for_dma; in init_hwif_cmd64x()
728 if (!(hwif->udma_four)) in init_hwif_cmd64x()
729 hwif->udma_four = ata66_cmd64x(hwif); in init_hwif_cmd64x()
732 hwif->chipset = ide_cmd646; in init_hwif_cmd64x()
734 hwif->ide_dma_end = &cmd646_1_ide_dma_end; in init_hwif_cmd64x()
736 hwif->ide_dma_end = &cmd64x_ide_dma_end; in init_hwif_cmd64x()
737 hwif->ide_dma_test_irq = &cmd64x_ide_dma_test_irq; in init_hwif_cmd64x()
740 hwif->ide_dma_end = &cmd64x_ide_dma_end; in init_hwif_cmd64x()
741 hwif->ide_dma_test_irq = &cmd64x_ide_dma_test_irq; in init_hwif_cmd64x()
746 hwif->autodma = 1; in init_hwif_cmd64x()
747 hwif->drives[0].autodma = hwif->autodma; in init_hwif_cmd64x()
748 hwif->drives[1].autodma = hwif->autodma; in init_hwif_cmd64x()
751 static void __init init_dma_cmd64x (ide_hwif_t *hwif, unsigned long dmabase) in init_dma_cmd64x() argument
753 ide_setup_dma(hwif, dmabase, 8); in init_dma_cmd64x()