Re: [U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL

2014-04-01 Thread Stefano Babic
On 19/03/2014 02:21, Marek Vasut wrote:
 Set the GD pointer in the SPL to a defined symbol so various
 functions from U-Boot can be used without adverse side effects.
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Stefano Babic sba...@denx.de
 ---


Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] arm: mxs: Properly set GD pointer in SPL

2014-03-18 Thread Marek Vasut
Set the GD pointer in the SPL to a defined symbol so various
functions from U-Boot can be used without adverse side effects.

Signed-off-by: Marek Vasut ma...@denx.de
Cc: Stefano Babic sba...@denx.de
---
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c 
b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 68c30af..87b63c1 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -13,9 +13,13 @@
 #include asm/arch/imx-regs.h
 #include asm/arch/sys_proto.h
 #include asm/gpio.h
+#include linux/compiler.h
 
 #include mxs_init.h
 
+DECLARE_GLOBAL_DATA_PTR;
+gd_t gdata __section(.data);
+
 /*
  * This delay function is intended to be used only in early stage of boot, 
where
  * clock are not set up yet. The timer used here is reset on every boot and
@@ -109,6 +113,7 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t 
*resptr,
struct mxs_spl_data *data = (struct mxs_spl_data *)
((CONFIG_SYS_TEXT_BASE - sizeof(struct mxs_spl_data))  ~0xf);
uint8_t bootmode = mxs_get_bootmode_index();
+   gd = gdata;
 
mxs_iomux_setup_multiple_pads(iomux_setup, iomux_size);
mxs_power_init();
-- 
1.8.5.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot