From: OpenOCD-Gerrit <ope...@us...> - 2020-03-02 15:33:19
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via a01474bb4c4c43a2d10781668efa26e6774364ed (commit) via 3a8bffbef6afb4b7349d6340c9bae6789c05a3d3 (commit) via d55bcde16c54bbc76f5b670c076ce6c24a34faaa (commit) from 0b7eca17691a16e79881243d6d0f38c3eaeb360d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a01474bb4c4c43a2d10781668efa26e6774364ed Author: Marek Vasut <mar...@gm...> Date: Tue Jan 7 22:54:32 2020 +0100 tcl/target: Switch Renesas R-Car Gen2 boards to new config Switch Renesas R-Car Gen2 boards which are currently supported from the old ad-hoc SoC configuration to the new unified configuration. Change-Id: I8a67bceb3ae92d840ae4dbac20868c75e83f7d58 Signed-off-by: Marek Vasut <mar...@gm...> Reviewed-on: http://openocd.zylin.com/5398 Tested-by: jenkins Reviewed-by: Oleksij Rempel <li...@re...> diff --git a/tcl/board/renesas_porter.cfg b/tcl/board/renesas_porter.cfg index c8032f512..b5622e683 100644 --- a/tcl/board/renesas_porter.cfg +++ b/tcl/board/renesas_porter.cfg @@ -1,4 +1,5 @@ # Renesas R-Car M2 Evaluation Board -source [find target/renesas_r8a7791.cfg] +set SOC M2 +source [find target/renesas_rcar_gen2.cfg] source [find board/renesas_gen2_common.cfg] diff --git a/tcl/board/renesas_silk.cfg b/tcl/board/renesas_silk.cfg index a026537d4..36af47ff4 100644 --- a/tcl/board/renesas_silk.cfg +++ b/tcl/board/renesas_silk.cfg @@ -1,4 +1,5 @@ # Renesas R-Car E2 Evaluation Board -source [find target/renesas_r8a7794.cfg] +set SOC E2 +source [find target/renesas_rcar_gen2.cfg] source [find board/renesas_gen2_common.cfg] diff --git a/tcl/board/renesas_stout.cfg b/tcl/board/renesas_stout.cfg index d35f8744f..7a8001796 100644 --- a/tcl/board/renesas_stout.cfg +++ b/tcl/board/renesas_stout.cfg @@ -1,4 +1,5 @@ # Renesas R-Car H2 Evaluation Board -source [find target/renesas_r8a7790.cfg] +set SOC H2 +source [find target/renesas_rcar_gen2.cfg] source [find board/renesas_gen2_common.cfg] commit 3a8bffbef6afb4b7349d6340c9bae6789c05a3d3 Author: Marek Vasut <mar...@gm...> Date: Tue Jan 7 22:49:45 2020 +0100 tcl/target: Add unified config for Renesas R-Car Gen2 targets Add configuration for the Renesas R-Car Generation 2 targets. These are SoCs with Cortex A15s and A7s. All cores currently supported by OpenOCD are supported here as well as two new cores, M2N and V2H, for the sake of support completeness. Change-Id: Ib6fe70a91360b4f8bd69822ee28b6dea530cfa0a Signed-off-by: Marek Vasut <mar...@gm...> Reviewed-on: http://openocd.zylin.com/5397 Tested-by: jenkins Reviewed-by: Oleksij Rempel <li...@re...> diff --git a/tcl/target/renesas_rcar_gen2.cfg b/tcl/target/renesas_rcar_gen2.cfg new file mode 100644 index 000000000..9f7421d91 --- /dev/null +++ b/tcl/target/renesas_rcar_gen2.cfg @@ -0,0 +1,123 @@ +# Renesas R-Car Generation 2 SOCs +# - There are a combination of Cortex-A15s and Cortex-A7s for each Gen2 SOC +# - Each SOC can boot through any of the, up to 2, core types that it has +# e.g. H2 can boot through Cortex-A15 or Cortex-A7 + +# Supported Gen2 SOCs and their cores: +# H2: Cortex-A15 x 4, Cortex-A7 x 4 +# M2: Cortex-A15 x 2 +# V2H: Cortex-A15 x 2 +# M2N: Cortex-A15 x 2 +# E2: Cortex-A7 x 2 + +# Usage: +# There are 2 configuration options: +# SOC: Selects the supported SOC. (Default 'H2') +# BOOT_CORE: Selects the booting core. 'CA15', or 'CA7' +# Defaults to 'CA15' if the SOC has one, else defaults to 'CA7' + +if { [info exists SOC] } { + set _soc $SOC +} else { + set _soc H2 +} + +# Set configuration for each SOC and the default 'BOOT_CORE' +switch $_soc { + H2 { + set _CHIPNAME r8a7790 + set _num_ca15 4 + set _num_ca7 4 + set _boot_core CA15 + } + M2 { + set _CHIPNAME r8a7791 + set _num_ca15 2 + set _num_ca7 0 + set _boot_core CA15 + } + V2H { + set _CHIPNAME r8a7792 + set _num_ca15 2 + set _num_ca7 0 + set _boot_core CA15 + } + M2N { + set _CHIPNAME r8a7793 + set _num_ca15 2 + set _num_ca7 0 + set _boot_core CA15 + } + E2 { + set _CHIPNAME r8a7794 + set _num_ca15 0 + set _num_ca7 2 + set _boot_core CA7 + } + default { + error "'$_soc' is invalid!" + } +} + +# If configured, override the default 'CHIPNAME' +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} + +# If configured, override the default 'BOOT_CORE' +if { [info exists BOOT_CORE] } { + set _boot_core $BOOT_CORE +} + +if { [info exists DAP_TAPID] } { + set _DAP_TAPID $DAP_TAPID +} else { + set _DAP_TAPID 0x4ba00477 +} + +echo "\t$_soc - $_num_ca15 CA15(s), $_num_ca7 CA7(s)" +echo "\tBoot Core - $_boot_core\n" + +set _DAPNAME $_CHIPNAME.dap + +# TAP and DAP +jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f -expected-id $_DAP_TAPID +dap create $_DAPNAME -chain-position $_CHIPNAME.cpu + +set CA15_DBGBASE {0x800B0000 0x800B2000 0x800B4000 0x800B6000} +set CA7_DBGBASE {0x800F0000 0x800F2000 0x800F4000 0x800F6000} + +set smp_targets "" + +proc setup_ca {core_name dbgbase num boot} { + global _CHIPNAME + global _DAPNAME + global smp_targets + for { set _core 0 } { $_core < $num } { incr _core } { + set _TARGETNAME $_CHIPNAME.$core_name.$_core + set _CTINAME $_TARGETNAME.cti + set _command "target create $_TARGETNAME cortex_a -dap $_DAPNAME \ + -coreid $_core -dbgbase [lindex $dbgbase $_core]" + if { $_core == 0 && $boot == 1 } { + set _targets "$_TARGETNAME" + } else { + set _command "$_command -defer-examine" + } + set smp_targets "$smp_targets $_TARGETNAME" + eval $_command + } +} + +# Organize target list based on the boot core +if { [string equal $_boot_core CA15] } { + setup_ca a15 $CA15_DBGBASE $_num_ca15 1 + setup_ca a7 $CA7_DBGBASE $_num_ca7 0 +} elseif { [string equal $_boot_core CA7] } { + setup_ca a7 $CA7_DBGBASE $_num_ca7 1 + setup_ca a15 $CA15_DBGBASE $_num_ca15 0 +} else { + setup_ca a15 $CA15_DBGBASE $_num_ca15 0 + setup_ca a7 $CA7_DBGBASE $_num_ca7 0 +} + +eval "target smp $smp_targets" commit d55bcde16c54bbc76f5b670c076ce6c24a34faaa Author: Marek Vasut <mar...@gm...> Date: Thu Feb 6 12:17:13 2020 +0100 tcl/target: Abort on invalid SoC selection on R-Car Gen3 Instead of printing error message and continue, abort on invalid SoC selection right away. Change-Id: I9c7a7111b590c6c49a0826562380b881a162a8dc Signed-off-by: Marek Vasut <mar...@gm...> Reviewed-on: http://openocd.zylin.com/5439 Tested-by: jenkins Reviewed-by: Oleksij Rempel <li...@re...> diff --git a/tcl/target/renesas_rcar_gen3.cfg b/tcl/target/renesas_rcar_gen3.cfg index 2c478b268..34c191827 100644 --- a/tcl/target/renesas_rcar_gen3.cfg +++ b/tcl/target/renesas_rcar_gen3.cfg @@ -76,7 +76,7 @@ switch $_soc { set _boot_core CA53 } default { - echo "'$_soc' is invalid!" + error "'$_soc' is invalid!" } } ----------------------------------------------------------------------- Summary of changes: tcl/board/renesas_porter.cfg | 3 +- tcl/board/renesas_silk.cfg | 3 +- tcl/board/renesas_stout.cfg | 3 +- tcl/target/renesas_rcar_gen2.cfg | 123 +++++++++++++++++++++++++++++++++++++++ tcl/target/renesas_rcar_gen3.cfg | 2 +- 5 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 tcl/target/renesas_rcar_gen2.cfg hooks/post-receive -- Main OpenOCD repository |