Just read abstractcs once when executing a command
DebugBreakpoint went from 3.41s to 3.05s! Change-Id: Icfc4ad5fb663b3607bf2027fda744b43be662fc5
This commit is contained in:
parent
11445b298a
commit
5c0a9a9ee4
|
@ -670,17 +670,12 @@ static int execute_abstract_command(struct target *target, uint32_t command)
|
|||
LOG_DEBUG("command=0x%x", command);
|
||||
dmi_write(target, DMI_COMMAND, command);
|
||||
|
||||
{
|
||||
uint32_t abstractcs = 0;
|
||||
wait_for_idle(target, &abstractcs);
|
||||
}
|
||||
uint32_t abstractcs = 0;
|
||||
wait_for_idle(target, &abstractcs);
|
||||
|
||||
uint32_t cs;
|
||||
if (dmi_read(target, &cs, DMI_ABSTRACTCS) != ERROR_OK)
|
||||
return ERROR_FAIL;
|
||||
info->cmderr = get_field(cs, DMI_ABSTRACTCS_CMDERR);
|
||||
info->cmderr = get_field(abstractcs, DMI_ABSTRACTCS_CMDERR);
|
||||
if (info->cmderr != 0) {
|
||||
LOG_DEBUG("command 0x%x failed; abstractcs=0x%x", command, cs);
|
||||
LOG_DEBUG("command 0x%x failed; abstractcs=0x%x", command, abstractcs);
|
||||
/* Clear the error. */
|
||||
dmi_write(target, DMI_ABSTRACTCS, set_field(0, DMI_ABSTRACTCS_CMDERR,
|
||||
info->cmderr));
|
||||
|
|
Loading…
Reference in New Issue