Lines Matching refs:hwif
68 * @hwif: for the port address
71 static u8 get_indexed_reg(ide_hwif_t *hwif, u8 index)
75 outb(index, hwif->dma_base + 1);
76 value = inb(hwif->dma_base + 3);
84 * @hwif: for the port address
87 static void set_indexed_reg(ide_hwif_t *hwif, u8 index, u8 value)
89 outb(index, hwif->dma_base + 1);
90 outb(value, hwif->dma_base + 3);
132 static void pdcnew_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
134 struct pci_dev *dev = to_pci_dev(hwif->dev);
150 set_indexed_reg(hwif, 0x10 + adj,
152 set_indexed_reg(hwif, 0x11 + adj,
154 set_indexed_reg(hwif, 0x12 + adj,
157 set_indexed_reg(hwif, 0x0e + adj,
159 set_indexed_reg(hwif, 0x0f + adj,
164 u8 tmp = get_indexed_reg(hwif, 0x10 + adj);
166 set_indexed_reg(hwif, 0x10 + adj, tmp & 0x7f);
170 static void pdcnew_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
172 struct pci_dev *dev = to_pci_dev(hwif->dev);
177 set_indexed_reg(hwif, 0x0c + adj, pio_timings[pio].reg0c);
178 set_indexed_reg(hwif, 0x0d + adj, pio_timings[pio].reg0d);
179 set_indexed_reg(hwif, 0x13 + adj, pio_timings[pio].reg13);
183 static u8 pdcnew_cable_detect(ide_hwif_t *hwif)
185 if (get_indexed_reg(hwif, 0x0b) & 0x04)
197 drive->hwif->channel ? "Secondary" : "Primary");