Skip to contentSkip to conversation

spl: Remove bogus GD_FLG_SPL_INIT check

PATCH New Marek Vasut 5 participants 13 messages May 30, 2016 – May 31, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 spl: Remove bogus GD_FLG_SPL_INIT check

Remove the check for GD_FLG_SPL_INIT in spl_relocate_stack_gd(). The check will always fail. This is because spl_relocate_stack_gd() is called from ARM's crt0.S and it is called before board_init_r(). The board_init_r() calls spl_init(), which sets the GD_FLG_SPL_INIT flag.

Note that reserving the malloc area in RAM is not a problem even if the GD_FLG_SPL_INIT flag is not set.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Stephen Warren <[email protected]>
---
 common/spl/spl.c | 3 ---
 1 file changed, 3 deletions(-)
common/spl/spl.c +0 -3
index bdde716..8b10bdf 100644
@@ -486,9 +486,6 @@ ulong spl_relocate_stack_gd(void)
 
 #ifdef CONFIG_SPL_SYS_MALLOC_SIMPLE
 	if (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) {
-		if (!(gd->flags & GD_FLG_SPL_INIT))
-			panic_str("spl_init must be called before heap reloc");
-
 		ptr -= CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN;
 		gd->malloc_base = ptr;
 		gd->malloc_limit = CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN;
Signature · 1 line
2.7.0
#1 lore raw

PATCH 2/2 arm: socfpga: Enable tiny printf and simple malloc in SPL

Enable both features to reduce the SPL size by 6 kiB.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
---
 configs/socfpga_arria5_defconfig       | 2 ++
 configs/socfpga_cyclone5_defconfig     | 2 ++
 configs/socfpga_de0_nano_soc_defconfig | 2 ++
 configs/socfpga_mcvevk_defconfig       | 2 ++
 configs/socfpga_sockit_defconfig       | 2 ++
 configs/socfpga_socrates_defconfig     | 2 ++
 configs/socfpga_sr1500_defconfig       | 2 ++
 configs/socfpga_vining_fpga_defconfig  | 2 ++
 include/configs/socfpga_common.h       | 3 ---
 9 files changed, 16 insertions(+), 3 deletions(-)
configs/socfpga_arria5_defconfig +2 -0
index a662e72..ec40ec7 100644
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_TARGET_SOCFPGA_ARRIA5_SOCDK=y
configs/socfpga_cyclone5_defconfig +2 -0
index b2933f7..8e5c527 100644
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y
configs/socfpga_de0_nano_soc_defconfig +2 -0
index f197b6d..034a215 100644
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y
configs/socfpga_mcvevk_defconfig +2 -0
index 6624f9e..133a6eb 100644
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_TARGET_SOCFPGA_DENX_MCVEVK=y
configs/socfpga_sockit_defconfig +2 -0
index c6414f8..8b1bcfc 100644
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y
configs/socfpga_socrates_defconfig +2 -0
index b47a560..56284a1 100644
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_TARGET_SOCFPGA_EBV_SOCRATES=y
configs/socfpga_sr1500_defconfig +2 -0
index aab4498..d66f7c6 100644
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_TARGET_SOCFPGA_SR1500=y
configs/socfpga_vining_fpga_defconfig +2 -0
index bfce9b6..b5a0814 100644
@@ -1,6 +1,8 @@
 CONFIG_ARM=y
 CONFIG_ARCH_SOCFPGA=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_USE_TINY_PRINTF=y
 CONFIG_SPL_DM=y
 CONFIG_DM_GPIO=y
 CONFIG_TARGET_SOCFPGA_SAMTEC_VINING_FPGA=y
include/configs/socfpga_common.h +0 -3
index f657766..aee4012 100644
@@ -324,9 +324,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SPL_RAM_DEVICE
 #define CONFIG_SPL_TEXT_BASE		CONFIG_SYS_INIT_RAM_ADDR
 #define CONFIG_SPL_MAX_SIZE		(64 * 1024)
-#ifdef CONFIG_SPL_BUILD
-#define CONFIG_SYS_MALLOC_SIMPLE
-#endif
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
Signature · 1 line
2.7.0
#3 lore raw

PATCH 2/2 arm: socfpga: Enable tiny printf and simple malloc in SPL

Quoted 11 lines · Stefan Roese
Quoted 7 lines · Marek Vasut

Enable both features to reduce the SPL size by 6 kiB.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>

Thanks
Chin Liang

Quoted 2 lines

Thanks,
Stefan

#4 lore raw

PATCH 2/2 arm: socfpga: Enable tiny printf and simple malloc in SPL

Quoted 10 lines · Chin Liang See
Quoted 9 lines · Stefan Roese
Quoted 7 lines · Marek Vasut

Enable both features to reduce the SPL size by 6 kiB.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Quoted 4 lines
Quoted 2 lines

Applied both to u-boot-socfpga/master

Signature · 2 lines
Best regards,
Marek Vasut
#5 lore raw

PATCH 2/2 arm: socfpga: Enable tiny printf and simple malloc in SPL

In reply to Marek Vasut

Hi,

Quoted 7 lines · Marek Vasut

Enable both features to reduce the SPL size by 6 kiB.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>

I tried to use the raw MMC boot (on the sockit, with current master
+ your patches), so I changed the following:

include/configs/socfpga_common.h +0 -0
@@ -349,9 +349,10 @@ unsigned int cm_get_qspi_controller_clk_hz(void);

#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" #define CONFIG_SPL_LIBDISK_SUPPORT
#else
-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 3
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xa00 /* offset 2560 sect (1M+256k) */
-#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */ +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* offset 512 sect (256k) */
+#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 1000 /* 512 KB */ +#define CONFIG_SPL_LIBDISK_SUPPORT
#endif
#endif

AFAIK, there were two mistakes:
1) FS_BOOT_PARTITION instead of RAW_MODE_U_BOOT
2) CONFIG_SPL_LIBDISK_SUPPORT was missing

(I edited the offset to be able to use u-boot-with-spl.sfp directly)

With these settings, I think we run into the size problem reported previously in the ML.

So, enabling tiny printf could help, but we now get:

disk/built-in.o: In function `part_get_info_extended':
...u-boot/disk/part_dos.c:236: undefined reference to `sprintf'

So I think we can just put "info->name[0] = 0;" instead of the snprintf() calls, when using tiny printf.

I can submit those changes as two patches if it makes sense.

Thanks,
Sylvain

#6 lore raw

PATCH 2/2 arm: socfpga: Enable tiny printf and simple malloc in SPL

Quoted 1 line · Sylvain Lesne

Hi,

Hi,

Quoted 24 lines · Marek Vasut
Quoted 7 lines

Enable both features to reduce the SPL size by 6 kiB.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>

I tried to use the raw MMC boot (on the sockit, with current master
+ your patches), so I changed the following:

include/configs/socfpga_common.h +0 -2
@@ -349,9 +349,10 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img"
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #else
-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 3
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xa00 /* offset 2560

sect (1M+256k) */

include/configs/socfpga_common.h +2 -1
-#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* offset 512
Quoted 2 lines

sect (256k) */
+#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 1000 /* 512 KB */

This should be 0x800 (was probably a typo in the original). Otherwise this should not break anything, yeah.

Quoted 7 lines

+#define CONFIG_SPL_LIBDISK_SUPPORT
#endif
#endif

AFAIK, there were two mistakes:
1) FS_BOOT_PARTITION instead of RAW_MODE_U_BOOT
2) CONFIG_SPL_LIBDISK_SUPPORT was missing

In fact, LIBDISK support was not used before you added the CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION into the board config. The libdisk functions are needed for determining the start of the partition. Looking through the SPL MMC, the code originally loaded the u-boot image from a fixed offset on the card (2560 sectors), which is indeed not optimal.

So yes, please send the above patch, it'd be a nice improvement.

Quoted 5 lines

(I edited the offset to be able to use u-boot-with-spl.sfp directly)

With these settings, I think we run into the size problem reported previously in the ML.

Quoted 7 lines

So, enabling tiny printf could help, but we now get:

disk/built-in.o: In function `part_get_info_extended':
...u-boot/disk/part_dos.c:236: undefined reference to `sprintf'

So I think we can just put "info->name[0] = 0;" instead of the snprintf() calls, when using tiny printf.

There is more of that stuff in disk/ , at least part_efi.c and part_iso.c suffer from the exact same problem. I am not sure if setting the name to '\0' wouldn't break anything, CCing Simon as he was recently digging in those areas.

Also, take a look at this patch:
https://patchwork.ozlabs.org/patch/626760/

Quoted 1 line

I can submit those changes as two patches if it makes sense.

Please do.

Quoted 3 lines

Thanks,
Sylvain

Signature · 2 lines
Best regards,
Marek Vasut
#7 lore raw

PATCH 2/2 arm: socfpga: Enable tiny printf and simple malloc in SPL

Quoted 26 lines · Marek Vasut
Quoted 1 line · Sylvain Lesne

Hi,

Hi,

Quoted 21 lines · Marek Vasut
Quoted 7 lines

Enable both features to reduce the SPL size by 6 kiB.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>

I tried to use the raw MMC boot (on the sockit, with current master
+ your patches), so I changed the following:

include/configs/socfpga_common.h +0 -2
@@ -349,9 +349,10 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img"
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #else
-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 3
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xa00 /* offset 2560

sect (1M+256k) */

Quoted 9 lines
Quoted 5 lines
include/configs/socfpga_common.h +2 -1
-#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* offset 512

sect (256k) */
+#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 1000 /* 512 KB */

This should be 0x800 (was probably a typo in the original). Otherwise this should not break anything, yeah.

I might be missing something obvious, but it actually seems that this define isn't used outside of the include/configs/ folder...

Quoted 8 lines
Quoted 7 lines

+#define CONFIG_SPL_LIBDISK_SUPPORT
#endif
#endif

AFAIK, there were two mistakes:
1) FS_BOOT_PARTITION instead of RAW_MODE_U_BOOT
2) CONFIG_SPL_LIBDISK_SUPPORT was missing

Quoted 7 lines

In fact, LIBDISK support was not used before you added the CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION into the board config. The libdisk functions are needed for determining the start of the partition. Looking through the SPL MMC, the code originally loaded the u-boot image from a fixed offset on the card (2560 sectors), which is indeed not optimal.

I agree, but I thought that the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION option was a bit confusing in this context! And I did not realise the behaviour would be to load from a fixed offset.

As soon as the tiny printf "issue" is solved, I'll send this patch (as I don't want to break the build).

Quoted 15 lines

So yes, please send the above patch, it'd be a nice improvement.

Quoted 5 lines

(I edited the offset to be able to use u-boot-with-spl.sfp directly)

With these settings, I think we run into the size problem reported previously in the ML.

Quoted 7 lines

So, enabling tiny printf could help, but we now get:

disk/built-in.o: In function `part_get_info_extended':
...u-boot/disk/part_dos.c:236: undefined reference to `sprintf'

So I think we can just put "info->name[0] = 0;" instead of the snprintf() calls, when using tiny printf.

Quoted 7 lines

There is more of that stuff in disk/ , at least part_efi.c and part_iso.c suffer from the exact same problem. I am not sure if setting the name to '\0' wouldn't break anything, CCing Simon as he was recently digging in those areas.

Also, take a look at this patch:
https://patchwork.ozlabs.org/patch/626760/

Ah yes, I naively only looked at the part_dos.c file. Actually a tiny snprintf implementation by Simon was already merged!

http://git.denx.de/?p=u-boot.git;a=commit;h=5c411d88be8df5f6a8a1ea0c961f7c35ba82c064

If I implement a naive sprintf() using this as a basis, I can boot from MMC without tweaking anything else, but it adds ~730 bytes to tiny-printf.o.

Thanks!
Sylvain

Quoted 5 lines
Quoted 2 lines

I can submit those changes as two patches if it makes sense.

Please do.

#8 lore raw

PATCH 2/2 arm: socfpga: Enable tiny printf and simple malloc in SPL

Quoted 37 lines · Sylvain Lesne
Quoted 26 lines · Marek Vasut
Quoted 1 line · Sylvain Lesne

Hi,

Hi,

Quoted 21 lines · Marek Vasut
Quoted 7 lines

Enable both features to reduce the SPL size by 6 kiB.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>

I tried to use the raw MMC boot (on the sockit, with current master
+ your patches), so I changed the following:

include/configs/socfpga_common.h +0 -2
@@ -349,9 +349,10 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img"
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #else
-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 3
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xa00 /* offset 2560

sect (1M+256k) */

Quoted 9 lines
Quoted 5 lines
include/configs/socfpga_common.h +2 -1
-#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* offset 512

sect (256k) */
+#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 1000 /* 512 KB */

This should be 0x800 (was probably a typo in the original). Otherwise this should not break anything, yeah.

Quoted 2 lines

I might be missing something obvious, but it actually seems that this define isn't used outside of the include/configs/ folder...

Oh heh, good catch. If you want to nuke that one in include/configs/, be my guest. The mmc spl is now parsing the uImage header to load the right amount of data.

Quoted 16 lines
Quoted 8 lines
Quoted 7 lines

+#define CONFIG_SPL_LIBDISK_SUPPORT
#endif
#endif

AFAIK, there were two mistakes:
1) FS_BOOT_PARTITION instead of RAW_MODE_U_BOOT
2) CONFIG_SPL_LIBDISK_SUPPORT was missing

Quoted 7 lines

In fact, LIBDISK support was not used before you added the CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION into the board config. The libdisk functions are needed for determining the start of the partition. Looking through the SPL MMC, the code originally loaded the u-boot image from a fixed offset on the card (2560 sectors), which is indeed not optimal.

Quoted 6 lines

I agree, but I thought that the CONFIG_SYS_MMCSD_FS_BOOT_PARTITION option was a bit confusing in this context! And I did not realise the behaviour would be to load from a fixed offset.

As soon as the tiny printf "issue" is solved, I'll send this patch (as I don't want to break the build).

I think I will just pick these patches here, you can apply them and send whatever you have.

Quoted 23 lines
Quoted 15 lines

So yes, please send the above patch, it'd be a nice improvement.

Quoted 5 lines

(I edited the offset to be able to use u-boot-with-spl.sfp directly)

With these settings, I think we run into the size problem reported previously in the ML.

Quoted 7 lines

So, enabling tiny printf could help, but we now get:

disk/built-in.o: In function `part_get_info_extended':
...u-boot/disk/part_dos.c:236: undefined reference to `sprintf'

So I think we can just put "info->name[0] = 0;" instead of the snprintf() calls, when using tiny printf.

Quoted 7 lines

There is more of that stuff in disk/ , at least part_efi.c and part_iso.c suffer from the exact same problem. I am not sure if setting the name to '\0' wouldn't break anything, CCing Simon as he was recently digging in those areas.

Also, take a look at this patch:
https://patchwork.ozlabs.org/patch/626760/

Quoted 8 lines

Ah yes, I naively only looked at the part_dos.c file. Actually a tiny snprintf implementation by Simon was already merged!

http://git.denx.de/?p=u-boot.git;a=commit;h=5c411d88be8df5f6a8a1ea0c961f7c35ba82c064

If I implement a naive sprintf() using this as a basis, I can boot from MMC without tweaking anything else, but it adds ~730 bytes to tiny-printf.o.

I suppose the naive implementation would be calling snprintf() with size = ~0 ? Go for it.

Signature · 2 lines
Best regards,
Marek Vasut
#9 lore raw

PATCH 2/2 arm: socfpga: Enable tiny printf and simple malloc in SPL

In reply to Marek Vasut
Quoted 5 lines · Marek Vasut

Enable both features to reduce the SPL size by 6 kiB.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>

Thanks!
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#10 lore raw

PATCH 1/2 spl: Remove bogus GD_FLG_SPL_INIT check

In reply to Marek Vasut
Quoted 9 lines · Marek Vasut

Remove the check for GD_FLG_SPL_INIT in spl_relocate_stack_gd(). The check will always fail. This is because spl_relocate_stack_gd() is called from ARM's crt0.S and it is called before board_init_r(). The board_init_r() calls spl_init(), which sets the GD_FLG_SPL_INIT flag.

Note that reserving the malloc area in RAM is not a problem even if the GD_FLG_SPL_INIT flag is not set.

Quoted 7 lines
Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Stephen Warren <[email protected]>

Thanks,
Stefan

#11 lore raw

PATCH 1/2 spl: Remove bogus GD_FLG_SPL_INIT check

Quoted 18 lines · Stefan Roese
Quoted 9 lines · Marek Vasut

Remove the check for GD_FLG_SPL_INIT in spl_relocate_stack_gd(). The check will always fail. This is because spl_relocate_stack_gd() is called from ARM's crt0.S and it is called before board_init_r(). The board_init_r() calls spl_init(), which sets the GD_FLG_SPL_INIT flag.

Note that reserving the malloc area in RAM is not a problem even if the GD_FLG_SPL_INIT flag is not set.

Quoted 7 lines
Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Stephen Warren <[email protected]>
Quoted 2 lines

Thanks
Chin Liang

Quoted 2 lines

Thanks,
Stefan

#12 lore raw

PATCH 1/2 spl: Remove bogus GD_FLG_SPL_INIT check

In reply to Marek Vasut
Quoted 9 lines · Marek Vasut

Remove the check for GD_FLG_SPL_INIT in spl_relocate_stack_gd(). The check will always fail. This is because spl_relocate_stack_gd() is called from ARM's crt0.S and it is called before board_init_r(). The board_init_r() calls spl_init(), which sets the GD_FLG_SPL_INIT flag.

Note that reserving the malloc area in RAM is not a problem even if the GD_FLG_SPL_INIT flag is not set.

Quoted 7 lines
Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Hans de Goede <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Stephen Warren <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html