diff mbox

[U-Boot,RFC,2/3] spl: reorder the assignment of board info to global data

Message ID 20161128093445.15300-3-lokeshvutla@ti.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Lokesh Vutla Nov. 28, 2016, 9:34 a.m. UTC
Move the assignment of board info to global data a bit early which is safe,
so that ram details can be used to enable caches.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 common/spl/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Nov. 28, 2016, 4:57 p.m. UTC | #1
On Mon, Nov 28, 2016 at 03:04:44PM +0530, Lokesh Vutla wrote:

> Move the assignment of board info to global data a bit early which is safe,
> so that ram details can be used to enable caches.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass Nov. 30, 2016, 12:34 a.m. UTC | #2
On 28 November 2016 at 02:34, Lokesh Vutla <lokeshvutla@ti.com> wrote:
> Move the assignment of board info to global data a bit early which is safe,
> so that ram details can be used to enable caches.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  common/spl/spl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/common/spl/spl.c b/common/spl/spl.c
index bdb165a..990b700 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -394,6 +394,7 @@  void board_init_r(gd_t *dummy1, ulong dummy2)
 	int i;
 
 	debug(">>spl:board_init_r()\n");
+	gd->bd = &bdata;
 
 #if defined(CONFIG_SYS_SPL_MALLOC_START)
 	mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
@@ -461,7 +462,6 @@  void board_init_r(gd_t *dummy1, ulong dummy2)
  */
 void preloader_console_init(void)
 {
-	gd->bd = &bdata;
 	gd->baudrate = CONFIG_BAUDRATE;
 
 	serial_init();		/* serial communications setup */