Lines Matching refs:drive
64 static void superio_tf_read(ide_drive_t *drive, struct ide_taskfile *tf, in superio_tf_read() argument
67 struct ide_io_ports *io_ports = &drive->hwif->io_ports; in superio_tf_read()
83 static void ns87415_dev_select(ide_drive_t *drive);
122 static void ns87415_prepare_drive (ide_drive_t *drive, unsigned int use_dma) in ns87415_prepare_drive() argument
124 ide_hwif_t *hwif = drive->hwif; in ns87415_prepare_drive()
135 if (drive->dev_flags & IDE_DFLAG_PRESENT) 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()
170 static void ns87415_dev_select(ide_drive_t *drive) in ns87415_dev_select() argument
172 ns87415_prepare_drive(drive, in ns87415_dev_select()
173 !!(drive->dev_flags & IDE_DFLAG_USING_DMA)); in ns87415_dev_select()
175 outb(drive->select | ATA_DEVICE_OBS, drive->hwif->io_ports.device_addr); in ns87415_dev_select()
178 static void ns87415_dma_start(ide_drive_t *drive) in ns87415_dma_start() argument
180 ns87415_prepare_drive(drive, 1); in ns87415_dma_start()
181 ide_dma_start(drive); in ns87415_dma_start()
184 static int ns87415_dma_end(ide_drive_t *drive) in ns87415_dma_end() argument
186 ide_hwif_t *hwif = drive->hwif; in ns87415_dma_end()
198 ns87415_prepare_drive(drive, 0); in ns87415_dma_end()