riscv: v13 -- dmi_write must still check for the OP result

release v20170608
Megan Wachs 2017-06-07 17:26:23 -07:00 committed by Palmer Dabbelt
parent 11008baee3
commit 459b39ec67
1 changed files with 16 additions and 20 deletions

View File

@ -198,7 +198,6 @@ static void dump_field(const struct scan_field *field)
unsigned int out_data = get_field(out, DTM_DMI_DATA);
unsigned int out_address = out >> DTM_DMI_ADDRESS_OFFSET;
if (field->in_value) {
uint64_t in = buf_get_u64(field->in_value, 0, field->num_bits);
unsigned int in_op = get_field(in, DTM_DMI_OP);
unsigned int in_data = get_field(in, DTM_DMI_DATA);
@ -210,11 +209,7 @@ static void dump_field(const struct scan_field *field)
field->num_bits,
op_string[out_op], out_data, out_address,
status_string[in_op], in_data, in_address);
} else {
log_printf_lf(LOG_LVL_DEBUG,
__FILE__, __LINE__, "scan", "%db %s %08x @%02x -> ?",
field->num_bits, op_string[out_op], out_data, out_address);
}
}
static riscv013_info_t *get_info(const struct target *target)
@ -325,9 +320,10 @@ static dmi_status_t dmi_scan(struct target *target, uint16_t *address_in,
.out_value = out,
};
if (address_in || data_in) {
// We need to always do this so that we can
// get the OP result, even if we don't care about
// the data itself.
field.in_value = in;
}
assert(info->abits != 0);