Lines Matching refs:tf
391 static void octeon_cf_tf_read16(struct ata_port *ap, struct ata_taskfile *tf) in octeon_cf_tf_read16() argument
398 tf->feature = blob >> 8; in octeon_cf_tf_read16()
401 tf->nsect = blob & 0xff; in octeon_cf_tf_read16()
402 tf->lbal = blob >> 8; in octeon_cf_tf_read16()
405 tf->lbam = blob & 0xff; in octeon_cf_tf_read16()
406 tf->lbah = blob >> 8; in octeon_cf_tf_read16()
409 tf->device = blob & 0xff; in octeon_cf_tf_read16()
410 tf->command = blob >> 8; in octeon_cf_tf_read16()
412 if (tf->flags & ATA_TFLAG_LBA48) { in octeon_cf_tf_read16()
414 iowrite8(tf->ctl | ATA_HOB, ap->ioaddr.ctl_addr); in octeon_cf_tf_read16()
417 tf->hob_feature = blob >> 8; in octeon_cf_tf_read16()
420 tf->hob_nsect = blob & 0xff; in octeon_cf_tf_read16()
421 tf->hob_lbal = blob >> 8; in octeon_cf_tf_read16()
424 tf->hob_lbam = blob & 0xff; in octeon_cf_tf_read16()
425 tf->hob_lbah = blob >> 8; in octeon_cf_tf_read16()
427 iowrite8(tf->ctl, ap->ioaddr.ctl_addr); in octeon_cf_tf_read16()
428 ap->last_ctl = tf->ctl; in octeon_cf_tf_read16()
476 const struct ata_taskfile *tf) in octeon_cf_tf_load16() argument
478 unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR; in octeon_cf_tf_load16()
482 if (tf->ctl != ap->last_ctl) { in octeon_cf_tf_load16()
483 iowrite8(tf->ctl, ap->ioaddr.ctl_addr); in octeon_cf_tf_load16()
484 ap->last_ctl = tf->ctl; in octeon_cf_tf_load16()
487 if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) { in octeon_cf_tf_load16()
488 __raw_writew(tf->hob_feature << 8, base + 0xc); in octeon_cf_tf_load16()
489 __raw_writew(tf->hob_nsect | tf->hob_lbal << 8, base + 2); in octeon_cf_tf_load16()
490 __raw_writew(tf->hob_lbam | tf->hob_lbah << 8, base + 4); in octeon_cf_tf_load16()
492 tf->hob_feature, in octeon_cf_tf_load16()
493 tf->hob_nsect, in octeon_cf_tf_load16()
494 tf->hob_lbal, in octeon_cf_tf_load16()
495 tf->hob_lbam, in octeon_cf_tf_load16()
496 tf->hob_lbah); in octeon_cf_tf_load16()
499 __raw_writew(tf->feature << 8, base + 0xc); in octeon_cf_tf_load16()
500 __raw_writew(tf->nsect | tf->lbal << 8, base + 2); in octeon_cf_tf_load16()
501 __raw_writew(tf->lbam | tf->lbah << 8, base + 4); in octeon_cf_tf_load16()
503 tf->feature, in octeon_cf_tf_load16()
504 tf->nsect, in octeon_cf_tf_load16()
505 tf->lbal, in octeon_cf_tf_load16()
506 tf->lbam, in octeon_cf_tf_load16()
507 tf->lbah); in octeon_cf_tf_load16()
524 const struct ata_taskfile *tf) in octeon_cf_exec_command16() argument
530 if (tf->flags & ATA_TFLAG_DEVICE) { in octeon_cf_exec_command16()
531 VPRINTK("device 0x%X\n", tf->device); in octeon_cf_exec_command16()
532 blob = tf->device; in octeon_cf_exec_command16()
537 DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command); in octeon_cf_exec_command16()
538 blob |= (tf->command << 8); in octeon_cf_exec_command16()
559 ap->ops->sff_exec_command(ap, &qc->tf); in octeon_cf_dma_setup()
597 mio_boot_dma_cfg.s.rw = ((qc->tf.flags & ATA_TFLAG_WRITE) != 0); in octeon_cf_dma_start()
640 ap->print_id, qc->tf.protocol, ap->hsm_task_state); in octeon_cf_dma_finished()
670 if (unlikely(qc->err_mask) && (qc->tf.protocol == ATA_PROT_DMA)) in octeon_cf_dma_finished()
706 if (!qc || (qc->tf.flags & ATA_TFLAG_POLLING)) in octeon_cf_interrupt()
779 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) in octeon_cf_delayed_finish()
808 switch (qc->tf.protocol) { in octeon_cf_qc_issue()
810 WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING); in octeon_cf_qc_issue()
812 ap->ops->sff_tf_load(ap, &qc->tf); /* load tf registers */ in octeon_cf_qc_issue()