diff mbox

[U-Boot,v2] davinci: Do not duplicate setting of gd

Message ID 1421937490-13297-1-git-send-email-trini@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Jan. 22, 2015, 2:38 p.m. UTC
In f0c3a6c we stopped setting gd in board_init_f, but later had to
revert to due problems on certain platforms.  As davinci does not look
to have these problems, we can drop the setting here and rely upon
crt0.S to do it.

Cc: Peter Howard <pjh@northern-ridge.com.au>
Signed-off-by: Tom Rini <trini@ti.com>

---
Changes in v2:
- Switch to default board_init_f, move the rest of that logic to
  spl_board_init()

Pete, I set my AM18xx EVM back up and confirmed things work there but
I'd still appreciate additional testing.  Thanks!
---
 arch/arm/cpu/arm926ejs/davinci/spl.c |   17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

Comments

Tom Rini Jan. 30, 2015, 2:20 p.m. UTC | #1
On Thu, Jan 22, 2015 at 09:38:10AM -0500, Tom Rini wrote:

> In f0c3a6c we stopped setting gd in board_init_f, but later had to
> revert to due problems on certain platforms.  As davinci does not look
> to have these problems, we can drop the setting here and rely upon
> crt0.S to do it.
> 
> Cc: Peter Howard <pjh@northern-ridge.com.au>
> Signed-off-by: Tom Rini <trini@ti.com>

Applied to u-boot-ti/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
index 59b304e..49349da 100644
--- a/arch/arm/cpu/arm926ejs/davinci/spl.c
+++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
@@ -34,29 +34,14 @@  void putc(char c)
 }
 #endif /* CONFIG_SPL_LIBCOMMON_SUPPORT */
 
-void board_init_f(ulong dummy)
+void spl_board_init(void)
 {
-	/* 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);
 #endif
 #ifdef CONFIG_SOC_DA8XX
 	arch_cpu_init();
 #endif
-
-	/* Third, we clear the BSS. */
-	memset(__bss_start, 0, __bss_end - __bss_start);
-
-	/* Finally, setup gd and move to the next step. */
-	gd = &gdata;
-	board_init_r(NULL, 0);
-}
-
-void spl_board_init(void)
-{
 	preloader_console_init();
 }