Lines Matching refs:hwif
55 static u8 superio_read_status(ide_hwif_t *hwif) in superio_read_status() argument
57 return superio_ide_inb(hwif->io_ports.status_addr); in superio_read_status()
60 static u8 superio_dma_sff_read_status(ide_hwif_t *hwif) in superio_dma_sff_read_status() argument
62 return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS); in superio_dma_sff_read_status()
68 struct ide_io_ports *io_ports = &drive->hwif->io_ports; in superio_tf_read()
100 static void superio_init_iops(struct hwif_s *hwif) in superio_init_iops() argument
102 struct pci_dev *pdev = to_pci_dev(hwif->dev); in superio_init_iops()
104 u8 port = hwif->channel, tmp; in superio_init_iops()
125 ide_hwif_t *hwif = drive->hwif; in ns87415_prepare_drive() local
126 struct pci_dev *dev = to_pci_dev(hwif->dev); in ns87415_prepare_drive()
127 unsigned int bit, other, new, *old = (unsigned int *) hwif->select_data; in ns87415_prepare_drive()
134 bit = 1 << (8 + hwif->channel); in ns87415_prepare_drive()
142 bit = 1 << (20 + (drive->dn & 1) + (hwif->channel << 1)); in ns87415_prepare_drive()
143 other = 1 << (20 + (1 - (drive->dn & 1)) + (hwif->channel << 1)); in ns87415_prepare_drive()
176 outb(drive->select | ATA_DEVICE_OBS, drive->hwif->io_ports.device_addr); in ns87415_dev_select()
187 ide_hwif_t *hwif = drive->hwif; in ns87415_dma_end() local
190 dma_stat = hwif->dma_ops->dma_sff_read_status(hwif); in ns87415_dma_end()
192 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); in ns87415_dma_end()
194 outb(dma_cmd & ~1, hwif->dma_base + ATA_DMA_CMD); in ns87415_dma_end()
196 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); in ns87415_dma_end()
197 outb(dma_cmd | 6, hwif->dma_base + ATA_DMA_CMD); in ns87415_dma_end()
205 static void init_hwif_ns87415 (ide_hwif_t *hwif) in init_hwif_ns87415() argument
207 struct pci_dev *dev = to_pci_dev(hwif->dev); in init_hwif_ns87415()
225 using_inta = progif & (1 << (hwif->channel << 1)); in init_hwif_ns87415()
227 using_inta = ctrl & (1 << (4 + hwif->channel)); in init_hwif_ns87415()
228 if (hwif->mate) { in init_hwif_ns87415()
229 hwif->select_data = hwif->mate->select_data; in init_hwif_ns87415()
231 hwif->select_data = (unsigned long) in init_hwif_ns87415()
236 *((unsigned int *)hwif->select_data) = ctrl; in init_hwif_ns87415()
251 outb(12, hwif->io_ports.ctl_addr); in init_hwif_ns87415()
253 outb(8, hwif->io_ports.ctl_addr); in init_hwif_ns87415()
256 stat = hwif->tp_ops->read_status(hwif); in init_hwif_ns87415()
264 hwif->irq = pci_get_legacy_ide_irq(dev, hwif->channel); in init_hwif_ns87415()
266 if (!hwif->dma_base) in init_hwif_ns87415()
269 outb(0x60, hwif->dma_base + ATA_DMA_STATUS); in init_hwif_ns87415()