diff mbox

[U-Boot,v2,1/3] ti: davinci: Remove unnecessary stack and global_data fiddles

Message ID 1422291328-23909-2-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Jan. 26, 2015, 4:55 p.m. UTC
The stack is already set to CONFIG_SPL_STACK immediately before
board_init_f() is called, so this should not be needed.

Also global_data has already been set up so we don't want to mess with
it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 arch/arm/cpu/arm926ejs/davinci/spl.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Tom Rini Jan. 26, 2015, 5:10 p.m. UTC | #1
On Mon, Jan 26, 2015 at 09:55:26AM -0700, Simon Glass wrote:

> The stack is already set to CONFIG_SPL_STACK immediately before
> board_init_f() is called, so this should not be needed.
> 
> Also global_data has already been set up so we don't want to mess with
> it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v2: None

We should drop this one in favor of the 2 I posted that fixes some other
problems and gets the boards booting too (and as a bonus drops the
custom board_init_f() func). :)
Simon Glass Jan. 26, 2015, 6:12 p.m. UTC | #2
Hi Tom,

On 26 January 2015 at 10:10, Tom Rini <trini@ti.com> wrote:
> On Mon, Jan 26, 2015 at 09:55:26AM -0700, Simon Glass wrote:
>
>> The stack is already set to CONFIG_SPL_STACK immediately before
>> board_init_f() is called, so this should not be needed.
>>
>> Also global_data has already been set up so we don't want to mess with
>> it.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v2: None
>
> We should drop this one in favor of the 2 I posted that fixes some other
> problems and gets the boards booting too (and as a bonus drops the
> custom board_init_f() func). :)

Yes that's fine, thanks. Please go ahead. One way or another we will
get rid of gdata.

Regards,
Simon
diff mbox

Patch

diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
index 59b304e..f8caf2a 100644
--- a/arch/arm/cpu/arm926ejs/davinci/spl.c
+++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
@@ -36,9 +36,6 @@  void putc(char c)
 
 void board_init_f(ulong dummy)
 {
-	/* First, setup our stack pointer. */
-	asm volatile("mov sp, %0\n" : : "r"(CONFIG_SPL_STACK));
-
 	/* Second, perform our low-level init. */
 #ifdef CONFIG_SOC_DM365
 	dm36x_lowlevel_init(0);
@@ -50,8 +47,7 @@  void board_init_f(ulong dummy)
 	/* Third, we clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
-	/* Finally, setup gd and move to the next step. */
-	gd = &gdata;
+	/* Finally, move to the next step. */
 	board_init_r(NULL, 0);
 }