Lines Matching refs:cfis
370 struct sata_fis_h2d *cfis, u8 *buf, u32 buf_len, in ahci_exec_ata_cmd() argument
391 memcpy((u8 *)(pp->cmd_tbl), cfis, sizeof(struct sata_fis_h2d)); in ahci_exec_ata_cmd()
422 struct sata_fis_h2d *cfis = &h2d; in ahci_set_feature() local
424 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in ahci_set_feature()
425 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in ahci_set_feature()
426 cfis->pm_port_c = 1 << 7; in ahci_set_feature()
427 cfis->command = ATA_CMD_SET_FEATURES; in ahci_set_feature()
428 cfis->features = SETFEATURES_XFER; in ahci_set_feature()
429 cfis->sector_count = ffs(uc_priv->udma_mask + 1) + 0x3e; in ahci_set_feature()
431 ahci_exec_ata_cmd(uc_priv, port, cfis, NULL, 0, READ_CMD); in ahci_set_feature()
529 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_identify() local
532 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_identify()
534 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_identify()
535 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_identify()
536 cfis->command = ATA_CMD_ID_ATA; in dwc_ahsata_identify()
538 ahci_exec_ata_cmd(uc_priv, port, cfis, (u8 *)id, ATA_ID_WORDS * 2, in dwc_ahsata_identify()
554 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_rw_cmd() local
560 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_rw_cmd()
562 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_rw_cmd()
563 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_rw_cmd()
564 cfis->command = (is_write) ? ATA_CMD_WRITE : ATA_CMD_READ; in dwc_ahsata_rw_cmd()
565 cfis->device = ATA_LBA; in dwc_ahsata_rw_cmd()
567 cfis->device |= (block >> 24) & 0xf; in dwc_ahsata_rw_cmd()
568 cfis->lba_high = (block >> 16) & 0xff; in dwc_ahsata_rw_cmd()
569 cfis->lba_mid = (block >> 8) & 0xff; in dwc_ahsata_rw_cmd()
570 cfis->lba_low = block & 0xff; in dwc_ahsata_rw_cmd()
571 cfis->sector_count = (u8)(blkcnt & 0xff); in dwc_ahsata_rw_cmd()
573 if (ahci_exec_ata_cmd(uc_priv, port, cfis, buffer, in dwc_ahsata_rw_cmd()
583 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_flush_cache() local
586 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_flush_cache()
588 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_flush_cache()
589 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_flush_cache()
590 cfis->command = ATA_CMD_FLUSH; in dwc_ahsata_flush_cache()
592 ahci_exec_ata_cmd(uc_priv, port, cfis, NULL, 0, 0); in dwc_ahsata_flush_cache()
599 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_rw_cmd_ext() local
605 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_rw_cmd_ext()
607 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_rw_cmd_ext()
608 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_rw_cmd_ext()
610 cfis->command = (is_write) ? ATA_CMD_WRITE_EXT in dwc_ahsata_rw_cmd_ext()
613 cfis->lba_high_exp = (block >> 40) & 0xff; in dwc_ahsata_rw_cmd_ext()
614 cfis->lba_mid_exp = (block >> 32) & 0xff; in dwc_ahsata_rw_cmd_ext()
615 cfis->lba_low_exp = (block >> 24) & 0xff; in dwc_ahsata_rw_cmd_ext()
616 cfis->lba_high = (block >> 16) & 0xff; in dwc_ahsata_rw_cmd_ext()
617 cfis->lba_mid = (block >> 8) & 0xff; in dwc_ahsata_rw_cmd_ext()
618 cfis->lba_low = block & 0xff; in dwc_ahsata_rw_cmd_ext()
619 cfis->device = ATA_LBA; in dwc_ahsata_rw_cmd_ext()
620 cfis->sector_count_exp = (blkcnt >> 8) & 0xff; in dwc_ahsata_rw_cmd_ext()
621 cfis->sector_count = blkcnt & 0xff; in dwc_ahsata_rw_cmd_ext()
623 if (ahci_exec_ata_cmd(uc_priv, port, cfis, buffer, in dwc_ahsata_rw_cmd_ext()
633 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_flush_cache_ext() local
636 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_flush_cache_ext()
638 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_flush_cache_ext()
639 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_flush_cache_ext()
640 cfis->command = ATA_CMD_FLUSH_EXT; in dwc_ahsata_flush_cache_ext()
642 ahci_exec_ata_cmd(uc_priv, port, cfis, NULL, 0, 0); in dwc_ahsata_flush_cache_ext()