Skip to content

Commit

Permalink
tcl/target: Unify Renesas R-Car JTAG reset config
Browse files Browse the repository at this point in the history
Both Gen2 and Gen3 used the same init_reset{} implementation,
pull it into common file and include it from both generations.
Moreover, this behavior is SoC specific, not board specific,
so move the common init_reset into target/ directory.

Change-Id: I5489a4bff9a786da8cb7fd7a515b0c9ce9dc16e3
Signed-off-by: Marek Vasut <[email protected]>
Reviewed-on: http://openocd.zylin.com/5400
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <[email protected]>
  • Loading branch information
marex authored and olerem committed Mar 9, 2020
1 parent 82a5c55 commit b304971
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
14 changes: 0 additions & 14 deletions tcl/board/renesas_salvator-xs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,3 @@ if { ![info exists SOC] } {
set SOC H3
}
source [find target/renesas_rcar_gen3.cfg]

reset_config trst_and_srst srst_nogate

proc init_reset {mode} {
# Assert both resets: equivalent to a power-on reset
adapter assert trst assert srst

# Deassert TRST to begin TAP communication
adapter deassert trst assert srst

# TAP should now be responsive, validate the scan-chain
jtag arp_init
}

2 changes: 2 additions & 0 deletions tcl/target/renesas_rcar_gen2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,6 @@ if { [string equal $_boot_core CA15] } {
setup_ca a7 $CA7_DBGBASE $_num_ca7 0
}

source [find target/renesas_rcar_reset_common.cfg]

eval "target smp $smp_targets"
2 changes: 2 additions & 0 deletions tcl/target/renesas_rcar_gen3.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,6 @@ if { [string equal $_boot_core CA57] } {
setup_a5x a53 $CA53_DBGBASE $CA53_CTIBASE $_num_ca53 0
}

source [find target/renesas_rcar_reset_common.cfg]

eval "target smp $smp_targets"
File renamed without changes.

0 comments on commit b304971

Please sign in to comment.