• Home
  • Raw
  • Download

Lines Matching refs:hwif

54 static u8 superio_read_status(ide_hwif_t *hwif)  in superio_read_status()  argument
56 return superio_ide_inb(hwif->io_ports.status_addr); in superio_read_status()
59 static u8 superio_dma_sff_read_status(ide_hwif_t *hwif) in superio_dma_sff_read_status() argument
61 return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS); in superio_dma_sff_read_status()
67 struct ide_io_ports *io_ports = &drive->hwif->io_ports; in superio_tf_read()
99 static void superio_init_iops(struct hwif_s *hwif) in superio_init_iops() argument
101 struct pci_dev *pdev = to_pci_dev(hwif->dev); in superio_init_iops()
103 u8 port = hwif->channel, tmp; in superio_init_iops()
124 ide_hwif_t *hwif = drive->hwif; in ns87415_prepare_drive() local
125 struct pci_dev *dev = to_pci_dev(hwif->dev); in ns87415_prepare_drive()
126 unsigned int bit, other, new, *old = (unsigned int *) hwif->select_data; in ns87415_prepare_drive()
133 bit = 1 << (8 + hwif->channel); in ns87415_prepare_drive()
141 bit = 1 << (20 + (drive->dn & 1) + (hwif->channel << 1)); in ns87415_prepare_drive()
142 other = 1 << (20 + (1 - (drive->dn & 1)) + (hwif->channel << 1)); in ns87415_prepare_drive()
175 outb(drive->select | ATA_DEVICE_OBS, drive->hwif->io_ports.device_addr); in ns87415_dev_select()
186 ide_hwif_t *hwif = drive->hwif; in ns87415_dma_end() local
189 dma_stat = hwif->dma_ops->dma_sff_read_status(hwif); in ns87415_dma_end()
191 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); in ns87415_dma_end()
193 outb(dma_cmd & ~1, hwif->dma_base + ATA_DMA_CMD); in ns87415_dma_end()
195 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); in ns87415_dma_end()
196 outb(dma_cmd | 6, hwif->dma_base + ATA_DMA_CMD); in ns87415_dma_end()
204 static void init_hwif_ns87415 (ide_hwif_t *hwif) in init_hwif_ns87415() argument
206 struct pci_dev *dev = to_pci_dev(hwif->dev); in init_hwif_ns87415()
224 using_inta = progif & (1 << (hwif->channel << 1)); in init_hwif_ns87415()
226 using_inta = ctrl & (1 << (4 + hwif->channel)); in init_hwif_ns87415()
227 if (hwif->mate) { in init_hwif_ns87415()
228 hwif->select_data = hwif->mate->select_data; in init_hwif_ns87415()
230 hwif->select_data = (unsigned long) in init_hwif_ns87415()
235 *((unsigned int *)hwif->select_data) = ctrl; in init_hwif_ns87415()
250 outb(12, hwif->io_ports.ctl_addr); in init_hwif_ns87415()
252 outb(8, hwif->io_ports.ctl_addr); in init_hwif_ns87415()
255 stat = hwif->tp_ops->read_status(hwif); in init_hwif_ns87415()
263 hwif->irq = pci_get_legacy_ide_irq(dev, hwif->channel); in init_hwif_ns87415()
265 if (!hwif->dma_base) in init_hwif_ns87415()
268 outb(0x60, hwif->dma_base + ATA_DMA_STATUS); in init_hwif_ns87415()