Lines Matching refs:cfis

294 static int fsl_ata_exec_ata_cmd(struct fsl_sata *sata, struct sata_fis_h2d *cfis,  in fsl_ata_exec_ata_cmd()  argument
318 h2d = (sata_fis_h2d_t *)cmd_desc->cfis; in fsl_ata_exec_ata_cmd()
324 h2d->fis_type = cfis->fis_type; in fsl_ata_exec_ata_cmd()
325 h2d->pm_port_c = cfis->pm_port_c; in fsl_ata_exec_ata_cmd()
326 h2d->command = cfis->command; in fsl_ata_exec_ata_cmd()
328 h2d->features = cfis->features; in fsl_ata_exec_ata_cmd()
329 h2d->features_exp = cfis->features_exp; in fsl_ata_exec_ata_cmd()
331 h2d->lba_low = cfis->lba_low; in fsl_ata_exec_ata_cmd()
332 h2d->lba_mid = cfis->lba_mid; in fsl_ata_exec_ata_cmd()
333 h2d->lba_high = cfis->lba_high; in fsl_ata_exec_ata_cmd()
334 h2d->lba_low_exp = cfis->lba_low_exp; in fsl_ata_exec_ata_cmd()
335 h2d->lba_mid_exp = cfis->lba_mid_exp; in fsl_ata_exec_ata_cmd()
336 h2d->lba_high_exp = cfis->lba_high_exp; in fsl_ata_exec_ata_cmd()
339 h2d->sector_count = cfis->sector_count; in fsl_ata_exec_ata_cmd()
340 h2d->sector_count_exp = cfis->sector_count_exp; in fsl_ata_exec_ata_cmd()
345 h2d->device = cfis->device; in fsl_ata_exec_ata_cmd()
346 h2d->control = cfis->control; in fsl_ata_exec_ata_cmd()
445 static int fsl_ata_exec_reset_cmd(struct fsl_sata *sata, struct sata_fis_h2d *cfis, in fsl_ata_exec_reset_cmd() argument
451 static int fsl_sata_exec_cmd(struct fsl_sata *sata, struct sata_fis_h2d *cfis, in fsl_sata_exec_cmd() argument
463 rc = fsl_ata_exec_ata_cmd(sata, cfis, 0, tag, buffer, len); in fsl_sata_exec_cmd()
466 rc = fsl_ata_exec_reset_cmd(sata, cfis, tag, buffer, len); in fsl_sata_exec_cmd()
469 rc = fsl_ata_exec_ata_cmd(sata, cfis, 1, tag, buffer, len); in fsl_sata_exec_cmd()
486 struct sata_fis_h2d h2d, *cfis = &h2d; in fsl_sata_identify() local
488 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in fsl_sata_identify()
490 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in fsl_sata_identify()
491 cfis->pm_port_c = 0x80; /* is command */ in fsl_sata_identify()
492 cfis->command = ATA_CMD_ID_ATA; in fsl_sata_identify()
494 fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, (u8 *)id, ATA_ID_WORDS * 2); in fsl_sata_identify()
511 struct sata_fis_h2d h2d, *cfis = &h2d; in fsl_sata_set_features() local
514 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in fsl_sata_set_features()
516 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in fsl_sata_set_features()
517 cfis->pm_port_c = 0x80; /* is command */ in fsl_sata_set_features()
518 cfis->command = ATA_CMD_SET_FEATURES; in fsl_sata_set_features()
519 cfis->features = SETFEATURES_XFER; in fsl_sata_set_features()
526 cfis->sector_count = XFER_UDMA_6; in fsl_sata_set_features()
528 cfis->sector_count = XFER_UDMA_5; in fsl_sata_set_features()
530 cfis->sector_count = XFER_UDMA_4; in fsl_sata_set_features()
532 cfis->sector_count = XFER_UDMA_3; in fsl_sata_set_features()
534 fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, NULL, 0); in fsl_sata_set_features()
540 struct sata_fis_h2d h2d, *cfis = &h2d; in fsl_sata_rw_cmd() local
545 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in fsl_sata_rw_cmd()
547 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in fsl_sata_rw_cmd()
548 cfis->pm_port_c = 0x80; /* is command */ in fsl_sata_rw_cmd()
549 cfis->command = (is_write) ? ATA_CMD_WRITE : ATA_CMD_READ; in fsl_sata_rw_cmd()
550 cfis->device = ATA_LBA; in fsl_sata_rw_cmd()
552 cfis->device |= (block >> 24) & 0xf; in fsl_sata_rw_cmd()
553 cfis->lba_high = (block >> 16) & 0xff; in fsl_sata_rw_cmd()
554 cfis->lba_mid = (block >> 8) & 0xff; in fsl_sata_rw_cmd()
555 cfis->lba_low = block & 0xff; in fsl_sata_rw_cmd()
556 cfis->sector_count = (u8)(blkcnt & 0xff); in fsl_sata_rw_cmd()
558 fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, buffer, ATA_SECT_SIZE * blkcnt); in fsl_sata_rw_cmd()
565 struct sata_fis_h2d h2d, *cfis = &h2d; in fsl_sata_flush_cache() local
567 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in fsl_sata_flush_cache()
569 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in fsl_sata_flush_cache()
570 cfis->pm_port_c = 0x80; /* is command */ in fsl_sata_flush_cache()
571 cfis->command = ATA_CMD_FLUSH; in fsl_sata_flush_cache()
573 fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, NULL, 0); in fsl_sata_flush_cache()
579 struct sata_fis_h2d h2d, *cfis = &h2d; in fsl_sata_rw_cmd_ext() local
584 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in fsl_sata_rw_cmd_ext()
586 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in fsl_sata_rw_cmd_ext()
587 cfis->pm_port_c = 0x80; /* is command */ in fsl_sata_rw_cmd_ext()
589 cfis->command = (is_write) ? ATA_CMD_WRITE_EXT in fsl_sata_rw_cmd_ext()
592 cfis->lba_high_exp = (block >> 40) & 0xff; in fsl_sata_rw_cmd_ext()
593 cfis->lba_mid_exp = (block >> 32) & 0xff; in fsl_sata_rw_cmd_ext()
594 cfis->lba_low_exp = (block >> 24) & 0xff; in fsl_sata_rw_cmd_ext()
595 cfis->lba_high = (block >> 16) & 0xff; in fsl_sata_rw_cmd_ext()
596 cfis->lba_mid = (block >> 8) & 0xff; in fsl_sata_rw_cmd_ext()
597 cfis->lba_low = block & 0xff; in fsl_sata_rw_cmd_ext()
598 cfis->device = ATA_LBA; in fsl_sata_rw_cmd_ext()
599 cfis->sector_count_exp = (blkcnt >> 8) & 0xff; in fsl_sata_rw_cmd_ext()
600 cfis->sector_count = blkcnt & 0xff; in fsl_sata_rw_cmd_ext()
602 fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, buffer, ATA_SECT_SIZE * blkcnt); in fsl_sata_rw_cmd_ext()
610 struct sata_fis_h2d h2d, *cfis = &h2d; in fsl_sata_rw_ncq_cmd() local
621 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in fsl_sata_rw_ncq_cmd()
623 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in fsl_sata_rw_ncq_cmd()
624 cfis->pm_port_c = 0x80; /* is command */ in fsl_sata_rw_ncq_cmd()
626 cfis->command = (is_write) ? ATA_CMD_FPDMA_WRITE in fsl_sata_rw_ncq_cmd()
629 cfis->lba_high_exp = (block >> 40) & 0xff; in fsl_sata_rw_ncq_cmd()
630 cfis->lba_mid_exp = (block >> 32) & 0xff; in fsl_sata_rw_ncq_cmd()
631 cfis->lba_low_exp = (block >> 24) & 0xff; in fsl_sata_rw_ncq_cmd()
632 cfis->lba_high = (block >> 16) & 0xff; in fsl_sata_rw_ncq_cmd()
633 cfis->lba_mid = (block >> 8) & 0xff; in fsl_sata_rw_ncq_cmd()
634 cfis->lba_low = block & 0xff; in fsl_sata_rw_ncq_cmd()
636 cfis->device = ATA_LBA; in fsl_sata_rw_ncq_cmd()
637 cfis->features_exp = (blkcnt >> 8) & 0xff; in fsl_sata_rw_ncq_cmd()
638 cfis->features = blkcnt & 0xff; in fsl_sata_rw_ncq_cmd()
646 fsl_sata_exec_cmd(sata, cfis, CMD_NCQ, ncq_channel, buffer, ATA_SECT_SIZE * blkcnt); in fsl_sata_rw_ncq_cmd()
653 struct sata_fis_h2d h2d, *cfis = &h2d; in fsl_sata_flush_cache_ext() local
655 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in fsl_sata_flush_cache_ext()
657 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in fsl_sata_flush_cache_ext()
658 cfis->pm_port_c = 0x80; /* is command */ in fsl_sata_flush_cache_ext()
659 cfis->command = ATA_CMD_FLUSH_EXT; in fsl_sata_flush_cache_ext()
661 fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, NULL, 0); in fsl_sata_flush_cache_ext()