From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Sat, 24 Jan 2015 21:32:24 +1100 Subject: [U-Boot] [v2 PATCH 3/3] arm: mxs: Add 'Wait for JTAG user' if booted in JTAG mode In-Reply-To: <1422070339-14282-4-git-send-email-gruss@tss-engineering.com> References: <1422070339-14282-1-git-send-email-gruss@tss-engineering.com> <1422070339-14282-4-git-send-email-gruss@tss-engineering.com> Message-ID: <54C374B8.4070008@tss-engineering.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 24/01/15 14:32, Graeme Russ wrote: > 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 > --- > > Changes in v2 > - Added and used boot mode #defines > > --- > arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 6 ++++++ > arch/arm/include/asm/arch-mxs/sys_proto.h | 17 +++++++++++++++++ > 2 files changed, 23 insertions(+) > > diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c > index 2a5f817..d1457e0 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(); > + > + My bad - I missed this. I'll post a v3 > + if (mxs_boot_modes[data->boot_mode_idx].boot_pads == MXS_BM_JTAG) { > + debug("SPL: Waiting for JTAG user\n"); > + asm volatile ("x: b x"); > + } > } Regards, Graeme