diff options
author | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-09-18 18:53:10 +0200 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-11-01 23:20:55 +0100 |
commit | 2f8e7c40be7f0de0bfd01d0cfbb8f453aa35f841 (patch) | |
tree | e8a69a28c6dea22eb2f570cf043bd30d3ea7cce1 /arch/arm/mach-rockchip/rk3188-board-spl.c | |
parent | 8917f697af3ac3f2fd7fbfdc3f23c4f663422d4c (diff) |
rockchip: rk3188: use boot0 hook to load up SPL in 2 steps
For the RK3188, the BROM will attempt to load up the first stage
image (SPL for the RK3188) in two steps: first 1KB to offset 0x800
in the SRAM and then the remainder to offset 0xc00 in the SRAM.
It always enters at 0x804, though.
With this changeset, the RK3188 boot removes the TPL (stub) stage and
builds a single SPL binary that utilizes the early back-to-bootrom via
the boot0-hook.
Consequently, the passing of the saved boot params via pmu->os_reg[2]
is also removed.
Series-changes: 2
- [added in v2] chain back_to_bootrom calls for SPL, first returning
to the TPL (using the same mechanism) and the to the BROM from the
TPL
Series-changes: 4
- after merging the 'back-to-bootrom' series with the 'boot0-hook'
series, this drops the TPL stub and builds only a single SPL image
that uses the 'early back-to-bootrom' logic originally implemented
by Pawel for the RK3066.
- changes the SPL_STACK_BASE to +0x800 (from +0x804), as the boot0
hook already reserves the space for the SPL magic (previously
inserted by mkimage)
Diffstat (limited to 'arch/arm/mach-rockchip/rk3188-board-spl.c')
-rw-r--r-- | arch/arm/mach-rockchip/rk3188-board-spl.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/arm/mach-rockchip/rk3188-board-spl.c b/arch/arm/mach-rockchip/rk3188-board-spl.c index 406207ed21..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)) - pr_err("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); |