Handle unavailability when deasserting reset
This commit is contained in:
parent
84ed43ec3a
commit
55ae2534b3
|
@ -2979,7 +2979,9 @@ static int deassert_reset(struct target *target)
|
|||
|
||||
info->dmi_busy_delay = orig_dmi_busy_delay;
|
||||
|
||||
if (target->reset_halt) {
|
||||
if (get_field(dmstatus, DM_DMSTATUS_ALLUNAVAIL)) {
|
||||
target->state = TARGET_UNAVAILABLE;
|
||||
} else if (target->reset_halt) {
|
||||
target->state = TARGET_HALTED;
|
||||
target->debug_reason = DBG_REASON_DBGRQ;
|
||||
} else {
|
||||
|
|
|
@ -129,10 +129,12 @@ proc ocd_process_reset_inner { MODE } {
|
|||
} else {
|
||||
$t invoke-event examine-end
|
||||
}
|
||||
}
|
||||
|
||||
# no need to wait for a target that is unavailable anyway
|
||||
if { [$t curstate] == "unavailable" } {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
# Wait up to 1 second for target to halt. Why 1sec? Cause
|
||||
# the JTAG tap reset signal might be hooked to a slow
|
||||
|
@ -149,7 +151,7 @@ proc ocd_process_reset_inner { MODE } {
|
|||
continue
|
||||
}
|
||||
if { $s != "halted" } {
|
||||
return -code error [format "TARGET: %s - Not halted - Maybe unavailable %s" $t $s]
|
||||
return -code error [format "TARGET: %s - Not halted (%s)" $t $s]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue