u-boot-brain/arch
Dirk Eibach f73002bc01 ppc: Fix ppc4xx CONFIG_SYS_GENERIC_BOARD
I realized that with v2014.10 u-boot is not starting up on
ppc4xx boards with CONFIG_SYS_GENERIC_BOARD set.

I bisected it down to this:
d54d7eb support blackfin board initialization in generic board_f

With
d29437a ppc: Make ppc4xx ready for CONFIG_SYS_GENERIC_BOARD
I set gd to a defined value for ppc4xx in cpu_init_f().
I did not realize that the gd struct has also to be memset()
to zero at this point.

But at least commit d54d7eb assumes it is:
@@ -516,11 +528,13 @@ static int reserve_malloc(void)
 /* (permanently) allocate a Board Info struct */
 static int reserve_board(void)
 {
-	gd->start_addr_sp -= sizeof(bd_t);
-	gd->bd = (bd_t *)map_sysmem(gd->start_addr_sp, sizeof(bd_t));
-	memset(gd->bd, '\0', sizeof(bd_t));
-	debug("Reserving %zu Bytes for Board Info at: %08lx\n",
-			sizeof(bd_t), gd->start_addr_sp);
+	if (!gd->bd) {
+		gd->start_addr_sp -= sizeof(bd_t);
+		gd->bd = (bd_t *)map_sysmem(gd->start_addr_sp, sizeof(bd_t));
+		memset(gd->bd, '\0', sizeof(bd_t));
+		debug("Reserving %zu Bytes for Board Info at: %08lx\n",
+		      sizeof(bd_t), gd->start_addr_sp);
+	}
 	return 0;
 }
 #endif

This might also be an issue on other architectures, so maintainers should
check.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
2014-11-05 10:23:50 +01:00
..
arc kconfig: remove redundant "string" type in arch and board Kconfigs 2014-09-13 16:43:55 -04:00
arm arm926ejs: cache: use __weak 2014-11-04 15:01:04 -05:00
avr32 kconfig: remove redundant "string" type in arch and board Kconfigs 2014-09-13 16:43:55 -04:00
blackfin kconfig: remove redundant "string" type in arch and board Kconfigs 2014-09-13 16:43:55 -04:00
m68k kconfig: remove redundant "string" type in arch and board Kconfigs 2014-09-13 16:43:55 -04:00
microblaze kconfig: add CONFIG_SUPPORT_SPL 2014-10-27 17:54:10 -04:00
mips MIPS: add .padding section to linker script 2014-11-01 18:18:05 +01:00
nds32 kconfig: remove redundant "string" type in arch and board Kconfigs 2014-09-13 16:43:55 -04:00
nios2 kconfig: remove redundant "string" type in arch and board Kconfigs 2014-09-13 16:43:55 -04:00
openrisc kconfig: remove redundant "string" type in arch and board Kconfigs 2014-09-13 16:43:55 -04:00
powerpc ppc: Fix ppc4xx CONFIG_SYS_GENERIC_BOARD 2014-11-05 10:23:50 +01:00
sandbox Provide option to avoid defining a custom version of uintptr_t. 2014-10-27 11:04:01 -04:00
sh kconfig: remove redundant "string" type in arch and board Kconfigs 2014-09-13 16:43:55 -04:00
sparc sparc: merge CONFIG_SYS_CPU and CONFIG_SYS_VENDOR defines 2014-11-04 15:01:38 -05:00
x86 x86: Correct a few progress message nits 2014-10-28 20:44:27 -06:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig 2014-10-23 13:19:09 -04:00