tcl/target/gd32vf103: simplify passing of reset halt option
The pluggable reset events are invoked only in the context of proc ocd_process_reset_inner, so we can use $halt variable directly and avoid proc init_reset redefinition. Change-Id: Ie74c340c51cb2c55d8ffc9f74bb1a1a8e3461515 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/9315 Tested-by: jenkins Reviewed-by: Tom Hebb <tommyhebb@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
21e345a2f7
commit
41d5fcc0b1
@@ -96,7 +96,7 @@ $_TARGETNAME configure -event reset-assert {
|
||||
# Since haltreq is write-only and there's no way to leave it unchanged,
|
||||
# we'd have to figure out its proper value anyway.
|
||||
set val $dmcontrol_dmactive
|
||||
if {$_RESETMODE ne "run"} {
|
||||
if {$halt} {
|
||||
set val [expr {$val | $dmcontrol_haltreq}]
|
||||
}
|
||||
riscv dmi_write $dmcontrol $val
|
||||
@@ -131,14 +131,3 @@ $_TARGETNAME configure -event reset-deassert-post {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Capture the mode of a given reset so that we can use it later in the
|
||||
# reset-assert handler.
|
||||
proc init_reset { mode } {
|
||||
global _RESETMODE
|
||||
set _RESETMODE $mode
|
||||
|
||||
if {[using_jtag]} {
|
||||
jtag arp_init-reset
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user