Skip to contentSkip to conversation

Move DECLARE_GLOBAL_DATA_PTR to file scope

PATCH New Wolfgang Denk 1 participant 1 message Dec 21, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move DECLARE_GLOBAL_DATA_PTR to file scope

Fix some additional places.

---
 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(-)
arch/arm/cpu/armv7/mx5/speed.c +2 -0
index 826b3b1..2187e8e 100644
@@ -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)
 {
arch/m68k/cpu/mcf52x2/cpu.c +1 -2
index 9fb717c..fb60462 100644
@@ -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 */
 
arch/sh/lib/board.c +0 -3
index 8f50b09..3d201b2 100644
@@ -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;
 
board/logicpd/zoom1/zoom1.c +0 -1
index efc2e1d..7ef13cc 100644
@@ -41,7 +41,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-
 /*
  * Routine: board_init
  * Description: Early hardware init.
board/samsung/smdk6400/smdk6400.c +0 -2
index bc22f0f..35aa40b 100644
@@ -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;
 
drivers/serial/serial_sh.c +0 -1
index 30dea7c..0103a29 100644
@@ -23,7 +23,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-
 #if defined(CONFIG_CONS_SCIF0)
 # define SCIF_BASE	SCIF0_BASE
 #elif defined(CONFIG_CONS_SCIF1)
Signature · 5 lines
1.7.3.3



I will add these when applying.