powerpc/board: SPL: Enable malloc flag in global data.
PATCH 1/1 powerpc/board: SPL: Enable malloc flag in global data.
For malloc to work in SPL framework enable GD_FLG_FULL_MALLOC_INIT flag in global data after allocating memory using mem_malloc_init.
Signed-off-by Sumit Garg <[email protected]>
--- board/freescale/b4860qds/spl.c | 1 + board/freescale/c29xpcie/spl.c | 1 + board/freescale/p1010rdb/spl.c | 1 + board/freescale/p1022ds/spl.c | 1 + board/freescale/p1_p2_rdb_pc/spl.c | 1 + board/freescale/t102xqds/spl.c | 1 + board/freescale/t102xrdb/spl.c | 1 + board/freescale/t104xrdb/spl.c | 1 + board/freescale/t208xqds/spl.c | 1 + board/freescale/t208xrdb/spl.c | 1 + board/freescale/t4qds/spl.c | 1 + board/freescale/t4rdb/spl.c | 1 + 12 files changed, 12 insertions(+)
board/freescale/b4860qds/spl.c +1 -0
@@ -91,6 +91,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifndef CONFIG_SPL_NAND_BOOT env_init ();
board/freescale/c29xpcie/spl.c +1 -0
@@ -57,6 +57,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;/* relocate environment function pointers etc. */ nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
board/freescale/p1010rdb/spl.c +1 -0
@@ -72,6 +72,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifndef CONFIG_SPL_NAND_BOOT env_init ();
board/freescale/p1022ds/spl.c +1 -0
@@ -86,6 +86,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifndef CONFIG_SPL_NAND_BOOT env_init ();#endif
board/freescale/p1_p2_rdb_pc/spl.c +1 -0
@@ -83,6 +83,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifndef CONFIG_SPL_NAND_BOOT env_init ();
board/freescale/t102xqds/spl.c +1 -0
@@ -120,6 +120,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifdef CONFIG_SPL_NAND_BOOT nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
board/freescale/t102xrdb/spl.c +1 -0
@@ -107,6 +107,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifdef CONFIG_SPL_NAND_BOOT nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
board/freescale/t104xrdb/spl.c +1 -0
@@ -98,6 +98,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifdef CONFIG_SPL_MMC_BOOT mmc_initialize (bd);
board/freescale/t208xqds/spl.c +1 -0
@@ -106,6 +106,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifdef CONFIG_SPL_NAND_BOOT nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
board/freescale/t208xrdb/spl.c +1 -0
@@ -76,6 +76,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifdef CONFIG_SPL_NAND_BOOT nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
board/freescale/t4qds/spl.c +1 -0
@@ -116,6 +116,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;#ifdef CONFIG_SPL_NAND_BOOT nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
board/freescale/t4rdb/spl.c +1 -0
@@ -80,6 +80,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)get_clocks ();mem_malloc_init (CONFIG_SPL_RELOC_MALLOC_ADDR ,CONFIG_SPL_RELOC_MALLOC_SIZE ); + gd->flags |=GD_FLG_FULL_MALLOC_INIT ;mmc_initialize (bd); mmc_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
Signature · 1 line
1.8.1.4
PATCH 1/1 powerpc/board: SPL: Enable malloc flag in global data.
Quoted 4 lines · Sumit Garg
For malloc to work in SPL framework enable
GD_FLG_FULL_MALLOC_INITflag in global data after allocating memory usingmem_malloc_init.Signed-off-by Sumit Garg <[email protected]>
Quoted 14 lines
--- board/freescale/b4860qds/spl.c | 1 + board/freescale/c29xpcie/spl.c | 1 + board/freescale/p1010rdb/spl.c | 1 + board/freescale/p1022ds/spl.c | 1 + board/freescale/p1_p2_rdb_pc/spl.c | 1 + board/freescale/t102xqds/spl.c | 1 + board/freescale/t102xrdb/spl.c | 1 + board/freescale/t104xrdb/spl.c | 1 + board/freescale/t208xqds/spl.c | 1 + board/freescale/t208xrdb/spl.c | 1 + board/freescale/t4qds/spl.c | 1 + board/freescale/t4rdb/spl.c | 1 + 12 files changed, 12 insertions(+)
Applied to u-boot-mpc85xx master. Awaiting upstream. Thanks.
York