static void q40ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf, unsigned int len) { unsigned long data_addr = drive->hwif->io_ports.data_addr; if (drive->media == ide_disk && cmd && (cmd->tf_flags & IDE_TFLAG_FS)) { __ide_mm_outsw(data_addr, buf, (len + 1) / 2); return; } raw_outsw_swapw((u16 *)data_addr, buf, (len + 1) / 2); }
static void at91_ide_output_data(ide_drive_t *drive, struct request *rq, void *buf, unsigned int len) { ide_hwif_t *hwif = drive->hwif; struct ide_io_ports *io_ports = &hwif->io_ports; u8 chipselect = hwif->select_data; unsigned long mode; pdbg("cs %u buf %p len %d\n", chipselect, buf, len); enter_16bit(chipselect, mode); __ide_mm_outsw((void __iomem *) io_ports->data_addr, buf, len / 2); leave_16bit(chipselect, mode); }
/* * This is used for most PIO data transfers *to* the IDE interface */ void ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf, unsigned int len) { ide_hwif_t *hwif = drive->hwif; struct ide_io_ports *io_ports = &hwif->io_ports; unsigned long data_addr = io_ports->data_addr; unsigned int words = (len + 1) >> 1; u8 io_32bit = drive->io_32bit; u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; if (io_32bit) { unsigned long uninitialized_var(flags); if ((io_32bit & 2) && !mmio) { local_irq_save_nort(flags); ata_vlb_sync(io_ports->nsect_addr); } words >>= 1; if (mmio) __ide_mm_outsl((void __iomem *)data_addr, buf, words); else outsl(data_addr, buf, words); if ((io_32bit & 2) && !mmio) local_irq_restore_nort(flags); if (((len + 1) & 3) < 2) return; buf += len & ~3; words = 1; } if (mmio) __ide_mm_outsw((void __iomem *)data_addr, buf, words); else outsw(data_addr, buf, words); }
static void ide_mm_outsw (unsigned long port, void *addr, u32 count) { __ide_mm_outsw(port, addr, count); }