mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-09 20:18:54 -04:00
Blackfin: fix bd_t handling
The recent global data changes (making the size autogenerated) broke the board info handling on Blackfin ports as we were lying and lumping the bd_t size in with the gd_t size. So use the new dedicated bd_t size to setup its own address in memory. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
d2ab733c05
commit
5a9a2c55d1
@ -109,8 +109,11 @@
|
|||||||
#ifndef CONFIG_SYS_GBL_DATA_ADDR
|
#ifndef CONFIG_SYS_GBL_DATA_ADDR
|
||||||
# define CONFIG_SYS_GBL_DATA_ADDR (CONFIG_SYS_MALLOC_BASE - GENERATED_GBL_DATA_SIZE)
|
# define CONFIG_SYS_GBL_DATA_ADDR (CONFIG_SYS_MALLOC_BASE - GENERATED_GBL_DATA_SIZE)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef CONFIG_SYS_BD_INFO_ADDR
|
||||||
|
# define CONFIG_SYS_BD_INFO_ADDR (CONFIG_SYS_GBL_DATA_ADDR - GENERATED_BD_INFO_SIZE)
|
||||||
|
#endif
|
||||||
#ifndef CONFIG_STACKBASE
|
#ifndef CONFIG_STACKBASE
|
||||||
# define CONFIG_STACKBASE (CONFIG_SYS_GBL_DATA_ADDR - 4)
|
# define CONFIG_STACKBASE (CONFIG_SYS_BD_INFO_ADDR - 4)
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_SYS_MEMTEST_START
|
#ifndef CONFIG_SYS_MEMTEST_START
|
||||||
# define CONFIG_SYS_MEMTEST_START 0
|
# define CONFIG_SYS_MEMTEST_START 0
|
||||||
|
@ -207,7 +207,6 @@ extern int timer_init(void);
|
|||||||
|
|
||||||
void board_init_f(ulong bootflag)
|
void board_init_f(ulong bootflag)
|
||||||
{
|
{
|
||||||
ulong addr;
|
|
||||||
bd_t *bd;
|
bd_t *bd;
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
|
||||||
@ -244,14 +243,9 @@ void board_init_f(ulong bootflag)
|
|||||||
gd = (gd_t *) (CONFIG_SYS_GBL_DATA_ADDR);
|
gd = (gd_t *) (CONFIG_SYS_GBL_DATA_ADDR);
|
||||||
memset((void *)gd, 0, GENERATED_GBL_DATA_SIZE);
|
memset((void *)gd, 0, GENERATED_GBL_DATA_SIZE);
|
||||||
|
|
||||||
/* Board data initialization */
|
bd = (bd_t *) (CONFIG_SYS_BD_INFO_ADDR);
|
||||||
addr = (CONFIG_SYS_GBL_DATA_ADDR + sizeof(gd_t));
|
|
||||||
|
|
||||||
/* Align to 4 byte boundary */
|
|
||||||
addr &= ~(4 - 1);
|
|
||||||
bd = (bd_t *) addr;
|
|
||||||
gd->bd = bd;
|
gd->bd = bd;
|
||||||
memset((void *)bd, 0, sizeof(bd_t));
|
memset((void *)bd, 0, GENERATED_BD_INFO_SIZE);
|
||||||
|
|
||||||
bd->bi_r_version = version_string;
|
bd->bi_r_version = version_string;
|
||||||
bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
|
bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user