diff options
author | Dirk Eibach <dirk.eibach@gdsys.cc> | 2014-11-03 10:56:31 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2014-11-05 10:23:50 +0100 |
commit | f73002bc015aa8518a88a98d2e305e8c2868bf50 (patch) | |
tree | 464cf64613556d47c7b73356f894820fc6ff05b0 /drivers/video/fsl_diu_fb.c | |
parent | 26f195c71252e98aebfffd5cfa994a4475559370 (diff) | |
download | u-boot-imx-f73002bc015aa8518a88a98d2e305e8c2868bf50.zip u-boot-imx-f73002bc015aa8518a88a98d2e305e8c2868bf50.tar.gz u-boot-imx-f73002bc015aa8518a88a98d2e305e8c2868bf50.tar.bz2 |
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>
Diffstat (limited to 'drivers/video/fsl_diu_fb.c')
0 files changed, 0 insertions, 0 deletions