Skip to content
Snippets Groups Projects
Commit cbe18f10 authored by Philipp Tomsich's avatar Philipp Tomsich
Browse files

rockchip: rk3399: spl: convert to using BOOT_DEVICE_BOOTROM


Instead of directly calling into the back-to-bootrom code, the RK3399
common SPL implementation now uses BOOT_DEVICE_BOOTROM to trigger a
transfer back into the bootrom.

With this factored out, the spl_board_init function can not be
customised for each RK3399 board.

Signed-off-by: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 8d35f369
No related branches found
No related tags found
No related merge requests found
/* /*
* (C) Copyright 2016 Rockchip Electronics Co., Ltd * (C) Copyright 2016 Rockchip Electronics Co., Ltd
* (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH
* *
* SPDX-License-Identifier: GPL-2.0+ * SPDX-License-Identifier: GPL-2.0+
*/ */
#include <common.h> #include <common.h>
#include <asm/arch/bootrom.h>
#include <asm/arch/clock.h> #include <asm/arch/clock.h>
#include <asm/arch/grf_rk3399.h> #include <asm/arch/grf_rk3399.h>
#include <asm/arch/hardware.h> #include <asm/arch/hardware.h>
...@@ -19,9 +21,19 @@ ...@@ -19,9 +21,19 @@
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
void board_return_to_bootrom(void)
{
back_to_bootrom();
}
u32 spl_boot_device(void) u32 spl_boot_device(void)
{ {
return BOOT_DEVICE_MMC1; u32 boot_device = BOOT_DEVICE_MMC1;
if (CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM))
return BOOT_DEVICE_BOOTROM;
return boot_device;
} }
u32 spl_boot_mode(const u32 boot_device) u32 spl_boot_mode(const u32 boot_device)
...@@ -156,10 +168,6 @@ void spl_board_init(void) ...@@ -156,10 +168,6 @@ void spl_board_init(void)
} }
preloader_console_init(); preloader_console_init();
#if CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM)
back_to_bootrom();
#endif
return; return;
err: err:
printf("spl_board_init: Error %d\n", ret); printf("spl_board_init: Error %d\n", ret);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment