adiv5: Release devices after scan.

Before, scanning only kept device stopped until POR or attach/detach cycle.
This commit is contained in:
Uwe Bonnes 2020-10-22 12:56:33 +02:00 committed by UweBonnes
parent 73e6b540b2
commit f76a7c4e92
1 changed files with 4 additions and 0 deletions

View File

@ -750,6 +750,10 @@ void adiv5_dp_init(ADIv5_DP_t *dp)
/* The rest should only be added after checking ROM table */
adiv5_component_probe(ap, ap->base, 0, 0);
}
/* We halted at least CortexM for Romtable scan.
* Release the devices now. Attach() will halt them again.*/
for (target *t = target_list; t; t = t->next)
target_halt_resume(t, false);
adiv5_dp_unref(dp);
}