powerpc/board: SPL: Enable malloc flag in global data.
authorSumit Garg <sumit.garg@nxp.com>
Wed, 25 May 2016 16:41:48 +0000 (12:41 -0400)
committerYork Sun <york.sun@nxp.com>
Sat, 4 Jun 2016 05:12:06 +0000 (22:12 -0700)
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 <sumit.garg@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
12 files changed:
board/freescale/b4860qds/spl.c
board/freescale/c29xpcie/spl.c
board/freescale/p1010rdb/spl.c
board/freescale/p1022ds/spl.c
board/freescale/p1_p2_rdb_pc/spl.c
board/freescale/t102xqds/spl.c
board/freescale/t102xrdb/spl.c
board/freescale/t104xrdb/spl.c
board/freescale/t208xqds/spl.c
board/freescale/t208xrdb/spl.c
board/freescale/t4qds/spl.c
board/freescale/t4rdb/spl.c

index 3f7cc03..fabc783 100644 (file)
@@ -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();
index 3d31d41..d8d73c7 100644 (file)
@@ -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,
index eb8e567..f858408 100644 (file)
@@ -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();
index 89ef95a..04db767 100644 (file)
@@ -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
index 0142746..76a3cf4 100644 (file)
@@ -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();
index 073ff2d..d59d343 100644 (file)
@@ -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,
index da97c44..bd3cbbf 100644 (file)
@@ -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,
index 81f48c4..4b35af6 100644 (file)
@@ -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);
index 55a0f8f..bb02dab 100644 (file)
@@ -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,
index f63366b..2ff05a2 100644 (file)
@@ -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,
index d52059a..6ca0f03 100644 (file)
@@ -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,
index 4c1e0cc..b148a7f 100644 (file)
@@ -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,