[U-Boot] [PATCH 18/29] blackfin: Don't set global_data again

Simon Glass sjg at chromium.org
Thu Dec 15 04:27:49 CET 2016


We have already set up gd in the standard board_init_f_init_reserve()
function. Drop the duplicate setup.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/blackfin/cpu/cpu.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/arch/blackfin/cpu/cpu.c b/arch/blackfin/cpu/cpu.c
index d46e251..25c97b5 100644
--- a/arch/blackfin/cpu/cpu.c
+++ b/arch/blackfin/cpu/cpu.c
@@ -67,22 +67,12 @@ static inline void serial_early_puts(const char *s)
 
 static int global_board_data_init(void)
 {
-#ifndef CONFIG_SYS_GBL_DATA_ADDR
-# define CONFIG_SYS_GBL_DATA_ADDR 0
-#endif
 #ifndef CONFIG_SYS_BD_INFO_ADDR
 # define CONFIG_SYS_BD_INFO_ADDR 0
 #endif
 
 	bd_t *bd;
 
-	if (CONFIG_SYS_GBL_DATA_ADDR) {
-		gd = (gd_t *)(CONFIG_SYS_GBL_DATA_ADDR);
-		memset((void *)gd, 0, GENERATED_GBL_DATA_SIZE);
-	} else {
-		static gd_t _bfin_gd;
-		gd = &_bfin_gd;
-	}
 	if (CONFIG_SYS_BD_INFO_ADDR) {
 		bd = (bd_t *)(CONFIG_SYS_BD_INFO_ADDR);
 		memset(bd, 0, GENERATED_BD_INFO_SIZE);
-- 
2.8.0.rc3.226.g39d4020



More information about the U-Boot mailing list