Lines Matching refs:cfis
369 struct sata_fis_h2d *cfis, u8 *buf, u32 buf_len, in ahci_exec_ata_cmd() argument
390 memcpy((u8 *)(pp->cmd_tbl), cfis, sizeof(struct sata_fis_h2d)); in ahci_exec_ata_cmd()
421 struct sata_fis_h2d *cfis = &h2d; in ahci_set_feature() local
423 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in ahci_set_feature()
424 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in ahci_set_feature()
425 cfis->pm_port_c = 1 << 7; in ahci_set_feature()
426 cfis->command = ATA_CMD_SET_FEATURES; in ahci_set_feature()
427 cfis->features = SETFEATURES_XFER; in ahci_set_feature()
428 cfis->sector_count = ffs(uc_priv->udma_mask + 1) + 0x3e; in ahci_set_feature()
430 ahci_exec_ata_cmd(uc_priv, port, cfis, NULL, 0, READ_CMD); in ahci_set_feature()
528 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_identify() local
531 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_identify()
533 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_identify()
534 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_identify()
535 cfis->command = ATA_CMD_ID_ATA; in dwc_ahsata_identify()
537 ahci_exec_ata_cmd(uc_priv, port, cfis, (u8 *)id, ATA_ID_WORDS * 2, in dwc_ahsata_identify()
553 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_rw_cmd() local
559 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_rw_cmd()
561 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_rw_cmd()
562 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_rw_cmd()
563 cfis->command = (is_write) ? ATA_CMD_WRITE : ATA_CMD_READ; in dwc_ahsata_rw_cmd()
564 cfis->device = ATA_LBA; in dwc_ahsata_rw_cmd()
566 cfis->device |= (block >> 24) & 0xf; in dwc_ahsata_rw_cmd()
567 cfis->lba_high = (block >> 16) & 0xff; in dwc_ahsata_rw_cmd()
568 cfis->lba_mid = (block >> 8) & 0xff; in dwc_ahsata_rw_cmd()
569 cfis->lba_low = block & 0xff; in dwc_ahsata_rw_cmd()
570 cfis->sector_count = (u8)(blkcnt & 0xff); in dwc_ahsata_rw_cmd()
572 if (ahci_exec_ata_cmd(uc_priv, port, cfis, buffer, in dwc_ahsata_rw_cmd()
582 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_flush_cache() local
585 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_flush_cache()
587 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_flush_cache()
588 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_flush_cache()
589 cfis->command = ATA_CMD_FLUSH; in dwc_ahsata_flush_cache()
591 ahci_exec_ata_cmd(uc_priv, port, cfis, NULL, 0, 0); in dwc_ahsata_flush_cache()
598 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_rw_cmd_ext() local
604 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_rw_cmd_ext()
606 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_rw_cmd_ext()
607 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_rw_cmd_ext()
609 cfis->command = (is_write) ? ATA_CMD_WRITE_EXT in dwc_ahsata_rw_cmd_ext()
612 cfis->lba_high_exp = (block >> 40) & 0xff; in dwc_ahsata_rw_cmd_ext()
613 cfis->lba_mid_exp = (block >> 32) & 0xff; in dwc_ahsata_rw_cmd_ext()
614 cfis->lba_low_exp = (block >> 24) & 0xff; in dwc_ahsata_rw_cmd_ext()
615 cfis->lba_high = (block >> 16) & 0xff; in dwc_ahsata_rw_cmd_ext()
616 cfis->lba_mid = (block >> 8) & 0xff; in dwc_ahsata_rw_cmd_ext()
617 cfis->lba_low = block & 0xff; in dwc_ahsata_rw_cmd_ext()
618 cfis->device = ATA_LBA; in dwc_ahsata_rw_cmd_ext()
619 cfis->sector_count_exp = (blkcnt >> 8) & 0xff; in dwc_ahsata_rw_cmd_ext()
620 cfis->sector_count = blkcnt & 0xff; in dwc_ahsata_rw_cmd_ext()
622 if (ahci_exec_ata_cmd(uc_priv, port, cfis, buffer, in dwc_ahsata_rw_cmd_ext()
632 struct sata_fis_h2d *cfis = &h2d; in dwc_ahsata_flush_cache_ext() local
635 memset(cfis, 0, sizeof(struct sata_fis_h2d)); in dwc_ahsata_flush_cache_ext()
637 cfis->fis_type = SATA_FIS_TYPE_REGISTER_H2D; in dwc_ahsata_flush_cache_ext()
638 cfis->pm_port_c = 0x80; /* is command */ in dwc_ahsata_flush_cache_ext()
639 cfis->command = ATA_CMD_FLUSH_EXT; in dwc_ahsata_flush_cache_ext()
641 ahci_exec_ata_cmd(uc_priv, port, cfis, NULL, 0, 0); in dwc_ahsata_flush_cache_ext()