public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Graeme Russ <gruss@tss-engineering.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/5] Add 'Wait for JTAG user' if booted in JTAG mode
Date: Wed, 21 Jan 2015 22:55:16 +1100	[thread overview]
Message-ID: <1421841318-3014-4-git-send-email-gruss@tss-engineering.com> (raw)
In-Reply-To: <1421841318-3014-1-git-send-email-gruss@tss-engineering.com>

When booting in JTAG mode, there is no way to use soft break-points, and
no way of knowing when SPL has finished executing (so the user can issue
a 'halt' command to load u-boot.bin for example)

Add a debug output and simple loop to stop execution at the completion of
the SPL initialisation as a pseudo break-point when booting in JTAG mode

Signed-off-by: Graeme Russ <gruss@tss-engineering.com>
---

 arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 2a5f817..7bfc623 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -157,6 +157,12 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
 	data->boot_mode_idx = bootmode;
 
 	mxs_power_wait_pswitch();
+
+
+	if (mxs_boot_modes[data->boot_mode_idx].boot_pads == 0x06) {
+		debug("SPL: Waiting for JTAG user\n");
+		asm volatile ("x: b x");
+	}
 }
 
 /* Support aparatus */
-- 
1.9.3

  parent reply	other threads:[~2015-01-21 11:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 11:55 [U-Boot] [PATCH 0/5] Add support for G2C1 mx28 board (which has no battery) Graeme Russ
2015-01-21 11:55 ` [U-Boot] [PATCH 1/5] Add debug output to mx29 SPL source files Graeme Russ
2015-01-21 20:49   ` Fabio Estevam
2015-01-21 23:24   ` Marek Vasut
2015-01-22  4:24     ` Graeme Russ
2015-01-21 11:55 ` [U-Boot] [PATCH 2/5] Enable booting of mx28 without battery Graeme Russ
2015-01-21 12:03   ` Graeme Russ
2015-01-21 21:08     ` Fabio Estevam
2015-01-21 23:27   ` Marek Vasut
2015-01-23  0:58     ` Graeme Russ
2015-01-22 12:42   ` Fabio Estevam
2015-01-22 13:51     ` Marek Vasut
2015-01-23  2:58     ` Graeme Russ
2015-01-23  3:01       ` Fabio Estevam
2015-01-23  3:27         ` Graeme Russ
2015-01-23  3:49           ` Fabio Estevam
2015-01-23  4:14             ` Graeme Russ
     [not found]               ` <DB3PR05MB252F1D6A1521E87599A5991CB360@DB3PR05MB252.eurprd05.prod.outlook.com>
2015-01-23  8:11                 ` Graeme Russ
2015-01-23 13:01                   ` Stefano Babic
2015-01-21 11:55 ` Graeme Russ [this message]
2015-01-21 15:35   ` [U-Boot] [PATCH 3/5] Add 'Wait for JTAG user' if booted in JTAG mode Stefan Roese
2015-01-21 11:55 ` [U-Boot] [PATCH 4/5] Move PLL power-up from power init to memory init Graeme Russ
2015-01-21 23:33   ` Marek Vasut
2015-01-21 11:55 ` [U-Boot] [PATCH 5/5] Add support for ReachTech G2C1 board Graeme Russ
2015-01-21 20:53   ` Fabio Estevam
2015-01-21 23:03     ` Marek Vasut
2015-01-22  4:21       ` Graeme Russ
2015-01-21 23:36   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421841318-3014-4-git-send-email-gruss@tss-engineering.com \
    --to=gruss@tss-engineering.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox