Skip to content
Snippets Groups Projects
Commit d8bd8209 authored by Tom Warren's avatar Tom Warren Committed by Albert ARIBAUD
Browse files

arm: Tegra2: Fix ELDK42 gcc failure with inline asm stack pointer load


The 4.2.2 gcc in the ELDK42 release doesn't like the direct SP
load using a constant in tegra2_start. Change it to use a load
thru another reg using mov sp, %0 : : "r"(CONST).

Tested on my Seaboard T20-A03, U-Boot loads and runs OK. Also
compiled all tegra2 builds with both gcc 4.2.2 and 4.4.1 OK.

Signed-off-by: default avatarTom Warren <twarren@nvidia.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
Tested-by: default avatarSimon Glass <sjg@chromium.org>
parent 5c1ad3e6
No related branches found
No related tags found
No related merge requests found
...@@ -298,11 +298,11 @@ void tegra2_start(void) ...@@ -298,11 +298,11 @@ void tegra2_start(void)
writel(0xC0, &pmt->pmt_cfg_ctl); writel(0xC0, &pmt->pmt_cfg_ctl);
/* /*
* If we are ARM7 - give it a different stack. We are about to * If we are ARM7 - give it a different stack. We are about to
* start up the A9 which will want to use this one. * start up the A9 which will want to use this one.
*/ */
asm volatile("ldr sp, =%c0\n" asm volatile("mov sp, %0\n"
: : "i"(AVP_EARLY_BOOT_STACK_LIMIT)); : : "r"(AVP_EARLY_BOOT_STACK_LIMIT));
start_cpu((u32)_start); start_cpu((u32)_start);
halt_avp(); halt_avp();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment