Skip to contentSkip to conversation

ARM: mx6: gw_ventana: Remove superfluous memset of GD in board_init_f

PATCH New Stefan Roese 3 participants 3 messages Sep 30, 2014 – Oct 1, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mx6: gw_ventana: Remove superfluous memset of GD in board_init_f

Zeroing GD in board_init_f() is not needed any more. As its now done in crt0.S. The patch that clears the GD in crt0.S is this one:

aae2aef9 [arm: Set up global data before board_init_f()] from Simon.

Cc Tim Harvey <[email protected]>
Cc Stefano Babic <[email protected]>
---
 board/gateworks/gw_ventana/gw_ventana_spl.c | 7 -------
 1 file changed, 7 deletions(-)
board/gateworks/gw_ventana/gw_ventana_spl.c +0 -7
index 9fc253b..ca35b3c 100644
@@ -402,13 +402,6 @@ void board_init_f(ulong dummy)
 	struct ventana_board_info ventana_info;
 	int board_model;
 
-	/*
-	 * Zero out global data:
-	 *  - this shoudl be done by crt0.S
-	 *  - failure to zero it will cause i2c_setup to fail
-	 */
-	memset((void *)gd, 0, sizeof(struct global_data));
-
 	/* setup AIPS and disable watchdog */
 	arch_cpu_init();
 
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 ARM: mx6: gw_ventana: Remove superfluous memset of GD in board_init_f

Quoted 31 lines · Stefan Roese

Zeroing GD in board_init_f() is not needed any more. As its now done in crt0.S. The patch that clears the GD in crt0.S is this one:

aae2aef9 [arm: Set up global data before board_init_f()] from Simon.

Cc Tim Harvey <[email protected]>
Cc Stefano Babic <[email protected]>
---
 board/gateworks/gw_ventana/gw_ventana_spl.c | 7 -------
 1 file changed, 7 deletions(-)
board/gateworks/gw_ventana/gw_ventana_spl.c +0 -8
index 9fc253b..ca35b3c 100644
@@ -402,13 +402,6 @@ void board_init_f(ulong dummy)
        struct ventana_board_info ventana_info;
        int board_model;
 
-       /*
-        * Zero out global data:
-        *  - this shoudl be done by crt0.S
-        *  - failure to zero it will cause i2c_setup to fail
-        */
-       memset((void *)gd, 0, sizeof(struct global_data));
-
        /* setup AIPS and disable watchdog */
        arch_cpu_init();
 
--
Quoted 2 lines

2.1.0

Tim

#2 lore raw

PATCH 1/1 ARM: mx6: gw_ventana: Remove superfluous memset of GD in board_init_f

In reply to Stefan Roese
Quoted 9 lines · Stefan Roese

Zeroing GD in board_init_f() is not needed any more. As its now done in crt0.S. The patch that clears the GD in crt0.S is this one:

aae2aef9 [arm: Set up global data before board_init_f()] from Simon.

Cc Tim Harvey <[email protected]>
Cc Stefano Babic <[email protected]>

---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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: sbabic at denx.de
=====================================================================