Lines Matching defs:ata_c
70 satafis_rhd_construct_cmd(struct ata_command *ata_c, uint8_t *fis)
77 fis[rhd_command] = ata_c->r_command;
78 fis[rhd_features0] = (ata_c->r_features >> 0) & 0xff;
80 fis[rhd_lba0] = (ata_c->r_lba >> 0) & 0xff;
81 fis[rhd_lba1] = (ata_c->r_lba >> 8) & 0xff;
82 fis[rhd_lba2] = (ata_c->r_lba >> 16) & 0xff;
83 if ((ata_c->flags & AT_LBA48) != 0) {
84 fis[rhd_dh] = ata_c->r_device;
85 fis[rhd_lba3] = (ata_c->r_lba >> 24) & 0xff;
86 fis[rhd_lba4] = (ata_c->r_lba >> 32) & 0xff;
87 fis[rhd_lba5] = (ata_c->r_lba >> 40) & 0xff;
88 fis[rhd_features1] = (ata_c->r_features >> 8) & 0xff;
90 fis[rhd_dh] = (ata_c->r_device & 0xf0) |
91 ((ata_c->r_lba >> 24) & 0x0f);
94 fis[rhd_count0] = (ata_c->r_count >> 0) & 0xff;
95 if ((ata_c->flags & AT_LBA48) != 0) {
96 fis[rhd_count1] = (ata_c->r_count >> 8) & 0xff;
175 satafis_rdh_cmd_readreg(struct ata_command *ata_c, const uint8_t *fis)
178 ata_c->r_lba = (uint64_t)fis[rdh_lba0] << 0;
179 ata_c->r_lba |= (uint64_t)fis[rdh_lba1] << 8;
180 ata_c->r_lba |= (uint64_t)fis[rdh_lba2] << 16;
181 if ((ata_c->flags & AT_LBA48) != 0) {
182 ata_c->r_lba |= (uint64_t)fis[rdh_lba3] << 24;
183 ata_c->r_lba |= (uint64_t)fis[rdh_lba4] << 32;
184 ata_c->r_lba |= (uint64_t)fis[rdh_lba5] << 40;
185 ata_c->r_device = fis[rdh_dh];
187 ata_c->r_lba |= (uint64_t)(fis[rdh_dh] & 0x0f) << 24;
188 ata_c->r_device = fis[rdh_dh] & 0xf0;
191 ata_c->r_count = fis[rdh_count0] << 0;
192 if ((ata_c->flags & AT_LBA48) != 0) {
193 ata_c->r_count |= fis[rdh_count1] << 8;
196 ata_c->r_error = fis[rdh_error];
197 ata_c->r_status = fis[rdh_status];