aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip/Kconfig
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-10-10 16:21:10 +0200
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-11-21 23:57:22 +0100
commitb377d22264178122e72c18c4d5d5ab2d4585cfdb (patch)
treef6ca0733b87999fcfc983721ce4390b61a097ecc /arch/arm/mach-rockchip/Kconfig
parent16d761e3dd8911760bb87d7c983cdea79d8540e3 (diff)
downloadu-boot-b377d22264178122e72c18c4d5d5ab2d4585cfdb.zip
u-boot-b377d22264178122e72c18c4d5d5ab2d4585cfdb.tar.gz
u-boot-b377d22264178122e72c18c4d5d5ab2d4585cfdb.tar.bz2
rockchip: boot0 hook: support early return for RK3188/RK3066-style BROM
Some Rockchip BROM versions (e.g. the RK3188 and RK3066) first read 1KB data from NAND into SRAM and executes it. Then, following a return to bootrom, the BROM loads additional code to SRAM (not overwriting the first block read) and reenters at the same address as the first time. To support booting either a TPL (on the RK3066) or SPL (on the RK3188) using this model of having to count entries, this commit adds code to the boot0 hook to track the number of entries and handle them accordingly. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com> Tested-by: Andy Yan <andy.yan@rock-chips.com>
Diffstat (limited to 'arch/arm/mach-rockchip/Kconfig')
-rw-r--r--arch/arm/mach-rockchip/Kconfig28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 31e9864..d59a1d5 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -158,6 +158,34 @@ config ROCKCHIP_SPL_RESERVE_IRAM
config ROCKCHIP_BROM_HELPER
bool
+config SPL_ROCKCHIP_EARLYRETURN_TO_BROM
+ bool "SPL requires early-return (for RK3188-style BROM) to BROM"
+ depends on SPL && ENABLE_ARM_SOC_BOOT0_HOOK
+ help
+ Some Rockchip BROM variants (e.g. on the RK3188) load the
+ first stage in segments and enter multiple times. E.g. on
+ the RK3188, the first 1KB of the first stage are loaded
+ first and entered; after returning to the BROM, the
+ remainder of the first stage is loaded, but the BROM
+ re-enters at the same address/to the same code as previously.
+
+ This enables support code in the BOOT0 hook for the SPL stage
+ to allow multiple entries.
+
+config TPL_ROCKCHIP_EARLYRETURN_TO_BROM
+ bool "TPL requires early-return (for RK3188-style BROM) to BROM"
+ depends on TPL && ENABLE_ARM_SOC_BOOT0_HOOK
+ help
+ Some Rockchip BROM variants (e.g. on the RK3188) load the
+ first stage in segments and enter multiple times. E.g. on
+ the RK3188, the first 1KB of the first stage are loaded
+ first and entered; after returning to the BROM, the
+ remainder of the first stage is loaded, but the BROM
+ re-enters at the same address/to the same code as previously.
+
+ This enables support code in the BOOT0 hook for the TPL stage
+ to allow multiple entries.
+
config SPL_MMC_SUPPORT
default y if !SPL_ROCKCHIP_BACK_TO_BROM