From a6b541b09022acb6f7c2754100ae26bd44eed1d9 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 19 Dec 2014 16:53:24 -0500 Subject: TI ARMv7: Don't use GD before crt0.S has set it Prior to this change we set the gd pointer early so that we can store data in it. This becomes problematic for DM changes as well as being odd in general. Re-work the code paths so that we don't need to set the gd pointer so early and instead can rely upon the normal setting of it. In order to do this we do need to move certain calls from s_init into spl_board_init(), mainly preloader_console_init and save_omap_boot_params. Tested on: Beaglebone Black, AM43xx GP EVM, Beagleboard, Beagleboard xM, OMAP5 uEVM, DRA7xx EVM Signed-off-by: Tom Rini Tested-by: Simon Glass Reviewed-by: Simon Glass --- arch/arm/cpu/armv7/omap-common/boot-common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/cpu/armv7/omap-common/boot-common.c') diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c index 00a108212a..17500f2315 100644 --- a/arch/arm/cpu/armv7/omap-common/boot-common.c +++ b/arch/arm/cpu/armv7/omap-common/boot-common.c @@ -106,6 +106,16 @@ u32 spl_boot_mode(void) void spl_board_init(void) { + /* + * Save the boot parameters passed from romcode. + * We cannot delay the saving further than this, + * to prevent overwrites. + */ + save_omap_boot_params(); + + /* Prepare console output */ + preloader_console_init(); + #ifdef CONFIG_SPL_NAND_SUPPORT gpmc_init(); #endif -- cgit v1.2.1