Basically port a fix that was already done for the cortex_a target.
Change-Id: I4cf4519159bda03ed611bc0b2e340a5dad2d85fe
Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
}
/* registers are now invalid */
- register_cache_invalidate(armv8->arm.core_cache);
+ if (target_was_examined(target))
+ register_cache_invalidate(armv8->arm.core_cache);
target->state = TARGET_RESET;
/* be certain SRST is off */
jtag_add_reset(0, 0);
+ if (!target_was_examined(target))
+ return ERROR_OK;
+
retval = aarch64_poll(target);
if (retval != ERROR_OK)
return retval;