Lines Matching refs:drive

107 static void tx4939ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)  in tx4939ide_set_pio_mode()  argument
109 int is_slave = drive->dn; in tx4939ide_set_pio_mode()
111 const u8 pio = drive->pio_mode - XFER_PIO_0; in tx4939ide_set_pio_mode()
115 pair = ide_get_pair_dev(drive); in tx4939ide_set_pio_mode()
128 static void tx4939ide_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) in tx4939ide_set_dma_mode() argument
131 const u8 mode = drive->dma_mode; in tx4939ide_set_dma_mode()
138 if (drive->dn) { in tx4939ide_set_dma_mode()
174 static void tx4939ide_clear_irq(ide_drive_t *drive) in tx4939ide_clear_irq() argument
184 if (drive->waiting_for_dma) in tx4939ide_clear_irq()
186 hwif = drive->hwif; in tx4939ide_clear_irq()
201 static void tx4939ide_dma_host_set(ide_drive_t *drive, int on) in tx4939ide_dma_host_set() argument
203 ide_hwif_t *hwif = drive->hwif; in tx4939ide_dma_host_set()
204 u8 unit = drive->dn; in tx4939ide_dma_host_set()
235 static int tx4939ide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd) in tx4939ide_build_dmatable() argument
237 ide_hwif_t *hwif = drive->hwif; in tx4939ide_build_dmatable()
279 printk(KERN_ERR "%s: %s\n", drive->name, in tx4939ide_build_dmatable()
288 static int tx4939ide_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) in tx4939ide_dma_setup() argument
290 ide_hwif_t *hwif = drive->hwif; in tx4939ide_dma_setup()
295 if (tx4939ide_build_dmatable(drive, cmd) == 0) in tx4939ide_dma_setup()
307 tx4939ide_writew(SECTOR_SIZE / 2, base, drive->dn ? in tx4939ide_dma_setup()
315 static int tx4939ide_dma_end(ide_drive_t *drive) in tx4939ide_dma_end() argument
317 ide_hwif_t *hwif = drive->hwif; in tx4939ide_dma_end()
343 static int tx4939ide_dma_test_irq(ide_drive_t *drive) in tx4939ide_dma_test_irq() argument
345 ide_hwif_t *hwif = drive->hwif; in tx4939ide_dma_test_irq()
422 static void tx4939ide_tf_load_fixup(ide_drive_t *drive) in tx4939ide_tf_load_fixup() argument
424 ide_hwif_t *hwif = drive->hwif; in tx4939ide_tf_load_fixup()
426 u16 sysctl = hwif->select_data >> (drive->dn ? 16 : 0); in tx4939ide_tf_load_fixup()
437 static void tx4939ide_tf_load(ide_drive_t *drive, struct ide_taskfile *tf, in tx4939ide_tf_load() argument
440 ide_tf_load(drive, tf, valid); in tx4939ide_tf_load()
443 tx4939ide_tf_load_fixup(drive); in tx4939ide_tf_load()
449 static void tx4939ide_input_data_swap(ide_drive_t *drive, struct ide_cmd *cmd, in tx4939ide_input_data_swap() argument
452 unsigned long port = drive->hwif->io_ports.data_addr; in tx4939ide_input_data_swap()
461 static void tx4939ide_output_data_swap(ide_drive_t *drive, struct ide_cmd *cmd, in tx4939ide_output_data_swap() argument
464 unsigned long port = drive->hwif->io_ports.data_addr; in tx4939ide_output_data_swap()