diff mbox

[U-Boot,RFC,3/5] common/env: Point default envirenoment for GD

Message ID 1379347529-21105-1-git-send-email-prabhakar@freescale.com
State RFC
Delegated to: York Sun
Headers show

Commit Message

Prabhakar Kushwaha Sept. 16, 2013, 4:05 p.m. UTC
GD(Global Data) structure has pointer to envirenoment variable array.
but, it is not being assigned for SPL framwork.

So update GD pointer with env variable array.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 common/env_common.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/common/env_common.c b/common/env_common.c
index 1ac3377..84843e1 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -162,6 +162,9 @@  int env_import(const char *buf, int check)
 	if (himport_r(&env_htab, (char *)ep->data, ENV_SIZE, '\0', 0,
 			0, NULL)) {
 		gd->flags |= GD_FLG_ENV_READY;
+#ifdef CONFIG_SPL_BUILD
+		gd->env_addr = ep->data;
+#endif
 		return 1;
 	}