From: Allen Martin <amartin@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tegra20: add back USE_PRIVATE_LIBGCC
Date: Tue, 7 Aug 2012 15:28:41 -0700 [thread overview]
Message-ID: <20120807222841.GK7791@nvidia.com> (raw)
In-Reply-To: <1344361980.1477.18.camel@tellur>
On Tue, Aug 07, 2012 at 10:53:00AM -0700, Lucas Stach wrote:
> Hi Allen,
>
> And to answer Tom's question: the failure was that the real U-Boot would
> not come up after the SPL. All I could see was the one line printed by
> the SPL and nothing more.
I think I found the problem. It's the following code from start.S:
ENTRY(cpu_init_crit)
/*
* Jump to board specific initialization...
* The Mask ROM will have already initialized
* basic memory. Go here to bump up clock rate and handle
* wake up conditions.
*/
mov ip, lr @ persevere link reg across
call
bl lowlevel_init @ go setup pll,mux,memory
mov lr, ip @ restore link
mov pc, lr @ back to my caller
ENDPROC(cpu_init_crit)
The "ip" register is not preserved across function calls, and the
CodeSourcery compiler is using it in lowlevel_init or one of the
functions it calls. This code was there before the SPL changes, but
wasn't being called because CONFIG_SKIP_LOWLEVEL_INIT was set, but now
it isn't.
Lucas, can you try the following change? I tested it on seaboard with
CodeSourcery arm-2011.09-70-arm-none-linux-gnueabi and I'm able to
boot a kernel.
Tom if this works we probably want to get it into your pull request to
Albert. CodeSourcery toolchain is probably used by a lot of people.
-Allen
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 2506f27..02e47fa 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -152,7 +152,7 @@ reset:
/* the mask ROM code should have PLL and others stable */
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
bl cpu_init_cp15
- bl cpu_init_crit
+ bl lowlevel_init @ go setup pll,mux,memory
#endif
/* Set stackpointer in internal RAM to call board_init_f */
@@ -339,29 +339,6 @@ ENTRY(cpu_init_cp15)
mov pc, lr @ back to my caller
ENDPROC(cpu_init_cp15)
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
-/*************************************************************************
- *
- * CPU_init_critical registers
- *
- * setup important registers
- * setup memory timing
- *
- *************************************************************************/
-ENTRY(cpu_init_crit)
- /*
- * Jump to board specific initialization...
- * The Mask ROM will have already initialized
- * basic memory. Go here to bump up clock rate and handle
- * wake up conditions.
- */
- mov ip, lr @ persevere link reg across
-call
- bl lowlevel_init @ go setup pll,mux,memory
- mov lr, ip @ restore link
- mov pc, lr @ back to my caller
-ENDPROC(cpu_init_crit)
-#endif
-
#ifndef CONFIG_SPL_BUILD
/*
*************************************************************************
--
nvpublic
next prev parent reply other threads:[~2012-08-07 22:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 0:19 [U-Boot] [PATCH] tegra20: add back USE_PRIVATE_LIBGCC Lucas Stach
2012-08-07 17:00 ` Stephen Warren
2012-08-07 17:09 ` Lucas Stach
2012-08-07 17:43 ` Allen Martin
2012-08-07 17:53 ` Lucas Stach
2012-08-07 20:11 ` Allen Martin
2012-08-07 22:28 ` Allen Martin [this message]
2012-08-07 22:42 ` Lucas Stach
2012-08-07 23:34 ` Allen Martin
2012-08-07 18:36 ` Wolfgang Denk
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=20120807222841.GK7791@nvidia.com \
--to=amartin@nvidia.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