diff mbox

[U-Boot,RFT,2/2] davinci: Do not duplicate setting of gd

Message ID 1419026005-5549-2-git-send-email-trini@ti.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Dec. 19, 2014, 9:53 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>

---
Peter, I don't have my davinci board hooked up but since you were doing
some changes recently is there a chance you can test this easily?
Thanks!
---
 arch/arm/cpu/arm926ejs/davinci/spl.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Peter Howard Dec. 19, 2014, 11:54 p.m. UTC | #1
On Fri, 2014-12-19 at 16:53 -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>
> 
> ---
> Peter, I don't have my davinci board hooked up but since you were doing
> some changes recently is there a chance you can test this easily?

I can test on Monday - I only have access to my LCDK on the weekend, and
I have to get round to try the convoluted setup process for flashing
u-boot on it :-)

> Thanks!
> ---
>  arch/arm/cpu/arm926ejs/davinci/spl.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
> index 59b304e..7b14420 100644
> --- a/arch/arm/cpu/arm926ejs/davinci/spl.c
> +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
> @@ -51,7 +51,6 @@ void board_init_f(ulong dummy)
>  	memset(__bss_start, 0, __bss_end - __bss_start);
>  
>  	/* Finally, setup gd and move to the next step. */
> -	gd = &gdata;
>  	board_init_r(NULL, 0);
>  }
>
Peter Howard Dec. 21, 2014, 9:34 p.m. UTC | #2
On Fri, 2014-12-19 at 16:53 -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>
> 
> ---
> Peter, I don't have my davinci board hooked up but since you were doing
> some changes recently is there a chance you can test this easily?
> Thanks!

Applied this patch (with and without 1/1 as well - given part 1 is ARMv7
it shouldn't have any bearing on davinci but wanted to be sure).

U-boot doesn't boot on the da850evm with this change.  I tried both with
my changes to the generic board, and on a fresh clone of u-boot.git. And
on u-boot-ti.git.  I haven't looked further, but I'm guessing there is
early access to gd of the sort you patched out for v7.

> ---
>  arch/arm/cpu/arm926ejs/davinci/spl.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
> index 59b304e..7b14420 100644
> --- a/arch/arm/cpu/arm926ejs/davinci/spl.c
> +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
> @@ -51,7 +51,6 @@ void board_init_f(ulong dummy)
>  	memset(__bss_start, 0, __bss_end - __bss_start);
>  
>  	/* Finally, setup gd and move to the next step. */
> -	gd = &gdata;
>  	board_init_r(NULL, 0);
>  }
>
Tom Rini Dec. 21, 2014, 10:01 p.m. UTC | #3
On Mon, Dec 22, 2014 at 08:34:11AM +1100, Peter Howard wrote:
> On Fri, 2014-12-19 at 16:53 -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>
> > 
> > ---
> > Peter, I don't have my davinci board hooked up but since you were doing
> > some changes recently is there a chance you can test this easily?
> > Thanks!
> 
> Applied this patch (with and without 1/1 as well - given part 1 is ARMv7
> it shouldn't have any bearing on davinci but wanted to be sure).
> 
> U-boot doesn't boot on the da850evm with this change.  I tried both with
> my changes to the generic board, and on a fresh clone of u-boot.git. And
> on u-boot-ti.git.  I haven't looked further, but I'm guessing there is
> early access to gd of the sort you patched out for v7.

Thanks for testing, I feared it wasn't quite as easy as it looked, I'll
have a think about it and see if I can recall what else might be
tickling gd that early over there.
diff mbox

Patch

diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
index 59b304e..7b14420 100644
--- a/arch/arm/cpu/arm926ejs/davinci/spl.c
+++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
@@ -51,7 +51,6 @@  void board_init_f(ulong dummy)
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
 	/* Finally, setup gd and move to the next step. */
-	gd = &gdata;
 	board_init_r(NULL, 0);
 }