[PATCH] Move DECLARE_GLOBAL_DATA_PTR to file scope

Wolfgang Denk wd at denx.de
Tue Dec 21 08:46:24 CET 2010


Fix some additional places.

Signed-off-by: Wolfgang Denk <wd at denx.de>
---
 arch/arm/cpu/armv7/mx5/speed.c    |    2 ++
 arch/m68k/cpu/mcf52x2/cpu.c       |    3 +--
 arch/sh/lib/board.c               |    3 ---
 board/logicpd/zoom1/zoom1.c       |    1 -
 board/samsung/smdk6400/smdk6400.c |    2 --
 drivers/serial/serial_sh.c        |    1 -
 6 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx5/speed.c b/arch/arm/cpu/armv7/mx5/speed.c
index 826b3b1..2187e8e 100644
--- a/arch/arm/cpu/armv7/mx5/speed.c
+++ b/arch/arm/cpu/armv7/mx5/speed.c
@@ -28,7 +28,9 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 
+#ifdef CONFIG_FSL_ESDHC
 DECLARE_GLOBAL_DATA_PTR;
+#endif
 
 int get_clocks(void)
 {
diff --git a/arch/m68k/cpu/mcf52x2/cpu.c b/arch/m68k/cpu/mcf52x2/cpu.c
index 9fb717c..fb60462 100644
--- a/arch/m68k/cpu/mcf52x2/cpu.c
+++ b/arch/m68k/cpu/mcf52x2/cpu.c
@@ -74,8 +74,7 @@ int watchdog_disable(void)
 {
 	volatile wdog_t *wdt = (volatile wdog_t *)(MMAP_WDOG);
 
-	wdt->sr = 0x5555; /* reset watchdog counteDECLARE_GLOBAL_DATA_PTR;
-r */
+	wdt->sr = 0x5555; /* reset watchdog counter */
 	wdt->sr = 0xAAAA;
 	wdt->cr = 0;	/* disable watchdog timer */
 
diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c
index 8f50b09..3d201b2 100644
--- a/arch/sh/lib/board.c
+++ b/arch/sh/lib/board.c
@@ -99,7 +99,6 @@ static int sh_mem_env_init(void)
 #if defined(CONFIG_CMD_NET)
 static int sh_net_init(void)
 {
-	DECLARE_GLOBAL_DATA_PTR;
 	gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
 	return 0;
 }
@@ -139,8 +138,6 @@ init_fnc_t *init_sequence[] =
 
 void sh_generic_init(void)
 {
-	DECLARE_GLOBAL_DATA_PTR;
-
 	bd_t *bd;
 	init_fnc_t **init_fnc_ptr;
 
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c
index efc2e1d..7ef13cc 100644
--- a/board/logicpd/zoom1/zoom1.c
+++ b/board/logicpd/zoom1/zoom1.c
@@ -41,7 +41,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-
 /*
  * Routine: board_init
  * Description: Early hardware init.
diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c
index bc22f0f..35aa40b 100644
--- a/board/samsung/smdk6400/smdk6400.c
+++ b/board/samsung/smdk6400/smdk6400.c
@@ -80,8 +80,6 @@ int board_init(void)
 
 int dram_init(void)
 {
-	DECLARE_GLOBAL_DATA_PTR;
-
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 30dea7c..0103a29 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -23,7 +23,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-
 #if defined(CONFIG_CONS_SCIF0)
 # define SCIF_BASE	SCIF0_BASE
 #elif defined(CONFIG_CONS_SCIF1)
-- 
1.7.3.3



I will add these when applying.


More information about the U-Boot mailing list