]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: pass args to board_return_to_bootrom
authorPeng Fan <peng.fan@nxp.com>
Wed, 7 Aug 2019 06:40:53 +0000 (06:40 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 8 Oct 2019 14:35:16 +0000 (16:35 +0200)
Pass spl_image and bootdev to board_return_bootrom.
i.MX8MN needs the args to let ROM to load images

Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/cpu/arm926ejs/spear/spl.c
arch/arm/mach-rockchip/spl.c
arch/arm/mach-rockchip/tpl.c
common/spl/spl_bootrom.c
include/spl.h

index fc332fb62691b7bb49af3db900259b14010acaae..a919a455eb0279cc222154eedc4727459a173035 100644 (file)
@@ -277,7 +277,8 @@ void board_init_f(ulong dummy)
  * BootROM code right after having initialized a few components like the DRAM).
  * The following function is called from SPL common code (board_init_r).
  */
-void board_return_to_bootrom(void)
+int board_return_to_bootrom(struct spl_image_info *spl_image,
+                           struct spl_boot_device *bootdev)
 {
        /*
         * Retrieve the BootROM's stack pointer and jump back to the start of
@@ -294,4 +295,6 @@ void board_return_to_bootrom(void)
                      "bl back_to_bootrom;"
 #endif
                      );
+
+       return 0;
 }
index 33137cc5ef4af3fbc9a56734ac1454641c50afe1..92102b39e7d5142d9a4d6e547d686e1419916d6e 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-void board_return_to_bootrom(void)
+int board_return_to_bootrom(struct spl_image_info *spl_image,
+                           struct spl_boot_device *bootdev)
 {
        back_to_bootrom(BROM_BOOT_NEXTSTAGE);
+
+       return 0;
 }
 
 __weak const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
index 55f6e922d0a60d7270fda6deb18e4f3dddbe3d71..c3734cb07082a358de11bca738f0c3bac0bced13 100644 (file)
@@ -77,9 +77,12 @@ void board_init_f(ulong dummy)
        }
 }
 
-void board_return_to_bootrom(void)
+int board_return_to_bootrom(struct spl_image_info *spl_image,
+                           struct spl_boot_device *bootdev)
 {
        back_to_bootrom(BROM_BOOT_NEXTSTAGE);
+
+       return 0;
 }
 
 u32 spl_boot_device(void)
index 076f5d8d9358d888d566b23ac0941a827a23d120..0eefd39a51985247727bbcd579fb24c557a6c03a 100644 (file)
@@ -6,8 +6,10 @@
 #include <common.h>
 #include <spl.h>
 
-__weak void board_return_to_bootrom(void)
+__weak int board_return_to_bootrom(struct spl_image_info *spl_image,
+                                  struct spl_boot_device *bootdev)
 {
+       return 0;
 }
 
 static int spl_return_to_bootrom(struct spl_image_info *spl_image,
@@ -19,8 +21,7 @@ static int spl_return_to_bootrom(struct spl_image_info *spl_image,
         * the ROM), it will implement board_return_to_bootrom() and
         * should not return from it.
         */
-       board_return_to_bootrom();
-       return false;
+       return board_return_to_bootrom(spl_image, bootdev);
 }
 
 SPL_LOAD_IMAGE_METHOD("BOOTROM", 0, BOOT_DEVICE_BOOTROM, spl_return_to_bootrom);
index e4640f3830b04a7adfbcdd259b1aac047eb7bde4..fd4747b44e4c86d5668a1545dea5809a0bd11790 100644 (file)
@@ -387,7 +387,8 @@ void spl_invoke_opensbi(struct spl_image_info *spl_image);
  * stage wants to return to the ROM code to continue booting, boards
  * can implement 'board_return_to_bootrom'.
  */
-void board_return_to_bootrom(void);
+int board_return_to_bootrom(struct spl_image_info *spl_image,
+                           struct spl_boot_device *bootdev);
 
 /**
  * board_spl_fit_post_load - allow process images after loading finished