diff options
-rw-r--r-- | arch/arm/mach-rockchip/rk3188-board-spl.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-rockchip/rk3188-board-tpl.c | 17 |
2 files changed, 10 insertions, 17 deletions
diff --git a/arch/arm/mach-rockchip/rk3188-board-spl.c b/arch/arm/mach-rockchip/rk3188-board-spl.c index d3866bf029..05d4ae682f 100644 --- a/arch/arm/mach-rockchip/rk3188-board-spl.c +++ b/arch/arm/mach-rockchip/rk3188-board-spl.c @@ -101,7 +101,6 @@ static int setup_arm_clock(void) void board_init_f(ulong dummy) { struct udevice *pinctrl, *dev; - struct rk3188_pmu *pmu; int ret; /* Example code showing how to enable the debug UART on RK3188 */ @@ -145,15 +144,6 @@ void board_init_f(ulong dummy) return; } - /* - * Recover the bootrom's stackpointer. - * For whatever reason needs to run after rockchip_get_clk. - */ - pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU); - if (IS_ERR(pmu)) - error("pmu syscon returned %ld\n", PTR_ERR(pmu)); - SAVE_SP_ADDR = readl(&pmu->sys_reg[2]); - ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl); if (ret) { debug("Pinctrl init failed: %d\n", ret); diff --git a/arch/arm/mach-rockchip/rk3188-board-tpl.c b/arch/arm/mach-rockchip/rk3188-board-tpl.c index b458ef6ea8..c714278e33 100644 --- a/arch/arm/mach-rockchip/rk3188-board-tpl.c +++ b/arch/arm/mach-rockchip/rk3188-board-tpl.c @@ -21,15 +21,16 @@ static int rk3188_num_entries __attribute__ ((section(".data"))); static void jump_to_spl(void) { - typedef void __noreturn (*image_entry_noargs_t)(void); + typedef void (*image_entry_noargs_t)(void); - struct rk3188_pmu * const pmu = (void *)PMU_BASE; image_entry_noargs_t tpl_entry = (image_entry_noargs_t)(unsigned long)SPL_ENTRY; - /* Store the SAVE_SP_ADDR in a location shared with SPL. */ - writel(SAVE_SP_ADDR, &pmu->sys_reg[2]); tpl_entry(); + /* + * If the SPL stage triggers a 'return to bootrom', it will + * return to here. + */ } void board_init_f(ulong dummy) @@ -77,10 +78,12 @@ void board_init_f(ulong dummy) back_to_bootrom(); } else { /* - * TPL part of the loader should now wait for us - * at offset 0xC00 in the sram. Should never return - * from there. + * SPL part of the loader should now wait for us at + * offset 0xC00 in the sram. If the SPL returns to us, + * we should in turn return to the BROM (i.e. chain + * through). */ jump_to_spl(); + back_to_bootrom(); } } |