Lines Matching refs:hwif
24 static void pdc202xx_set_mode(ide_hwif_t *hwif, ide_drive_t *drive) in pdc202xx_set_mode() argument
26 struct pci_dev *dev = to_pci_dev(hwif->dev); in pdc202xx_set_mode()
79 static void pdc202xx_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) in pdc202xx_set_pio_mode() argument
82 pdc202xx_set_mode(hwif, drive); in pdc202xx_set_pio_mode()
85 static int pdc202xx_test_irq(ide_hwif_t *hwif) in pdc202xx_test_irq() argument
87 struct pci_dev *dev = to_pci_dev(hwif->dev); in pdc202xx_test_irq()
91 if (hwif->channel) { in pdc202xx_test_irq()
106 static u8 pdc2026x_cable_detect(ide_hwif_t *hwif) in pdc2026x_cable_detect() argument
108 struct pci_dev *dev = to_pci_dev(hwif->dev); in pdc2026x_cable_detect()
109 u16 CIS, mask = hwif->channel ? (1 << 11) : (1 << 10); in pdc2026x_cable_detect()
125 static void pdc_old_enable_66MHz_clock(ide_hwif_t *hwif) in pdc_old_enable_66MHz_clock() argument
127 unsigned long clock_reg = hwif->extra_base + 0x01; in pdc_old_enable_66MHz_clock()
130 outb(clock | (hwif->channel ? 0x08 : 0x02), clock_reg); in pdc_old_enable_66MHz_clock()
133 static void pdc_old_disable_66MHz_clock(ide_hwif_t *hwif) in pdc_old_disable_66MHz_clock() argument
135 unsigned long clock_reg = hwif->extra_base + 0x01; in pdc_old_disable_66MHz_clock()
138 outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg); in pdc_old_disable_66MHz_clock()
141 static void pdc2026x_init_hwif(ide_hwif_t *hwif) in pdc2026x_init_hwif() argument
143 pdc_old_disable_66MHz_clock(hwif); in pdc2026x_init_hwif()
149 pdc_old_enable_66MHz_clock(drive->hwif); in pdc202xx_dma_start()
151 ide_hwif_t *hwif = drive->hwif; in pdc202xx_dma_start() local
152 struct request *rq = hwif->rq; in pdc202xx_dma_start()
153 unsigned long high_16 = hwif->extra_base - 16; in pdc202xx_dma_start()
154 unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); in pdc202xx_dma_start()
158 outb(clock | (hwif->channel ? 0x08 : 0x02), high_16 + 0x11); in pdc202xx_dma_start()
171 ide_hwif_t *hwif = drive->hwif; in pdc202xx_dma_end() local
172 unsigned long high_16 = hwif->extra_base - 16; in pdc202xx_dma_end()
173 unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); in pdc202xx_dma_end()
178 outb(clock & ~(hwif->channel ? 0x08:0x02), high_16 + 0x11); in pdc202xx_dma_end()
181 pdc_old_disable_66MHz_clock(drive->hwif); in pdc202xx_dma_end()