From 8b8b66559d5fbfeb1dd408a1af17dc0be52b5a9f Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 23 May 2018 15:10:12 +0200 Subject: [PATCH] tcl/board: Factor out common R-Car Gen2 code Factor out the code shared by all R-Car Gen2 boards into a single file to get rid of the duplication. Change-Id: I70b302c2e71f4e6fdccb2817dd65a5493bb393d8 Signed-off-by: Marek Vasut Reviewed-on: http://openocd.zylin.com/4533 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- tcl/board/renesas_gen2_common.cfg | 14 ++++++++++++++ tcl/board/renesas_porter.cfg | 14 +------------- tcl/board/renesas_silk.cfg | 14 +------------- tcl/board/renesas_stout.cfg | 14 +------------- 4 files changed, 17 insertions(+), 39 deletions(-) create mode 100644 tcl/board/renesas_gen2_common.cfg diff --git a/tcl/board/renesas_gen2_common.cfg b/tcl/board/renesas_gen2_common.cfg new file mode 100644 index 0000000000..00fa777c59 --- /dev/null +++ b/tcl/board/renesas_gen2_common.cfg @@ -0,0 +1,14 @@ +# Renesas R-Car Gen2 Evaluation Board common settings + +reset_config trst_and_srst srst_nogate + +proc init_reset {mode} { + # Assert both resets: equivalent to a power-on reset + jtag_reset 1 1 + + # Deassert TRST to begin TAP communication + jtag_reset 0 1 + + # TAP should now be responsive, validate the scan-chain + jtag arp_init +} diff --git a/tcl/board/renesas_porter.cfg b/tcl/board/renesas_porter.cfg index da2bba1f45..c8032f512d 100644 --- a/tcl/board/renesas_porter.cfg +++ b/tcl/board/renesas_porter.cfg @@ -1,16 +1,4 @@ # Renesas R-Car M2 Evaluation Board source [find target/renesas_r8a7791.cfg] - -reset_config trst_and_srst srst_nogate - -proc init_reset {mode} { - # Assert both resets: equivalent to a power-on reset - jtag_reset 1 1 - - # Deassert TRST to begin TAP communication - jtag_reset 0 1 - - # TAP should now be responsive, validate the scan-chain - jtag arp_init -} +source [find board/renesas_gen2_common.cfg] diff --git a/tcl/board/renesas_silk.cfg b/tcl/board/renesas_silk.cfg index 442c2a6ab6..a026537d42 100644 --- a/tcl/board/renesas_silk.cfg +++ b/tcl/board/renesas_silk.cfg @@ -1,16 +1,4 @@ # Renesas R-Car E2 Evaluation Board source [find target/renesas_r8a7794.cfg] - -reset_config trst_and_srst srst_nogate - -proc init_reset {mode} { - # Assert both resets: equivalent to a power-on reset - jtag_reset 1 1 - - # Deassert TRST to begin TAP communication - jtag_reset 0 1 - - # TAP should now be responsive, validate the scan-chain - jtag arp_init -} +source [find board/renesas_gen2_common.cfg] diff --git a/tcl/board/renesas_stout.cfg b/tcl/board/renesas_stout.cfg index fb08924259..d35f8744fe 100644 --- a/tcl/board/renesas_stout.cfg +++ b/tcl/board/renesas_stout.cfg @@ -1,16 +1,4 @@ # Renesas R-Car H2 Evaluation Board source [find target/renesas_r8a7790.cfg] - -reset_config trst_and_srst srst_nogate - -proc init_reset {mode} { - # Assert both resets: equivalent to a power-on reset - jtag_reset 1 1 - - # Deassert TRST to begin TAP communication - jtag_reset 0 1 - - # TAP should now be responsive, validate the scan-chain - jtag arp_init -} +source [find board/renesas_gen2_common.cfg] -- 2.30.2