Lines Matching refs:hwif

51 static void ali_fifo_control(ide_hwif_t *hwif, ide_drive_t *drive, int on)
53 struct pci_dev *pdev = to_pci_dev(hwif->dev);
54 int pio_fifo = 0x54 + hwif->channel;
64 static void ali_program_timings(ide_hwif_t *hwif, ide_drive_t *drive,
67 struct pci_dev *dev = to_pci_dev(hwif->dev);
68 int port = hwif->channel ? 0x5c : 0x58;
69 int udmat = 0x56 + hwif->channel;
96 * @hwif: port
102 static void ali_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
126 ali_fifo_control(hwif, drive, (drive->media == ide_disk) ? 0x05 : 0x00);
128 ali_program_timings(hwif, drive, &t, 0);
153 return drive->hwif->ultra_mask;
158 * @hwif: port
164 static void ali_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
167 struct pci_dev *dev = to_pci_dev(hwif->dev);
190 ali_program_timings(hwif, drive, &t, 0);
192 ali_program_timings(hwif, drive, NULL,
375 * @hwif: IDE interface
381 static u8 ali_cable_detect(ide_hwif_t *hwif)
383 struct pci_dev *dev = to_pci_dev(hwif->dev);
400 if ((tmpbyte & (1 << hwif->channel)) == 0)
411 * @hwif: interface to configure
418 static void init_hwif_ali15x3(ide_hwif_t *hwif)
435 if ((hwif->channel && ideic == 0x03) ||
436 (!hwif->channel && !ideic)) {
443 } else if (hwif->channel && !(ideic & 0x01)) {
452 hwif->irq = irq;
461 * @hwif: IDE interface
467 static int init_dma_ali15x3(ide_hwif_t *hwif, const struct ide_port_info *d)
469 struct pci_dev *dev = to_pci_dev(hwif->dev);
470 unsigned long base = ide_pci_dma_base(hwif, d);
475 hwif->dma_base = base;
477 if (ide_pci_check_simplex(hwif, d) < 0)
483 if (!hwif->channel)
487 hwif->name, base, base + 7);
489 if (ide_allocate_dma_engine(hwif))