From 2956532625cf8414ad3efb37598ba34db08d67ec Mon Sep 17 00:00:00 2001 From: John Rigby Date: Mon, 20 Dec 2010 18:27:51 -0700 Subject: Move DECLARE_GLOBAL_DATA_PTR to file scope It can be optimised out by the compiler otherwise resulting in obscure errors like a board not booting. This has been documented in README since 2006 when these were first fixed up for GCC 4.x. Signed-off-by: John Rigby Fix some additional places. Signed-off-by: Wolfgang Denk Acked-By: Albert ARIBAUD --- board/logicpd/zoom2/zoom2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'board/logicpd/zoom2') diff --git a/board/logicpd/zoom2/zoom2.c b/board/logicpd/zoom2/zoom2.c index e9f6625ce0..76793e42e7 100644 --- a/board/logicpd/zoom2/zoom2.c +++ b/board/logicpd/zoom2/zoom2.c @@ -43,6 +43,8 @@ #include "zoom2.h" #include "zoom2_serial.h" +DECLARE_GLOBAL_DATA_PTR; + /* * This the the zoom2, board specific, gpmc configuration for the * quad uart on the debug board. The more general gpmc configurations @@ -120,7 +122,6 @@ void zoom2_identify(void) */ int board_init (void) { - DECLARE_GLOBAL_DATA_PTR; u32 *gpmc_config; gpmc_init (); /* in SRAM or SDRAM, finish GPMC */ -- cgit