summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/hwinit-common.c
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2017-06-27 08:20:56 (GMT)
committerTom Rini <trini@konsulko.com>2017-07-10 18:26:04 (GMT)
commit4bd754d8abef61835d5da2ba0c65b2b0d3badec9 (patch)
tree28107b5d5705d25984e289664168e4c55dad9c34 /arch/arm/mach-omap2/hwinit-common.c
parentd754254f20d29a9cb25b6fed0423b224384263aa (diff)
downloadu-boot-fsl-qoriq-4bd754d8abef61835d5da2ba0c65b2b0d3badec9.tar.xz
arm: omap: Detect boot mode very early
ROM stores the boot params information in a known location and passes it to SPL. This information needs to be copied very early during boot or else there is a chance of getting corrupted by SPL. So move this boot device detection very early during boot. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/mach-omap2/hwinit-common.c')
-rw-r--r--arch/arm/mach-omap2/hwinit-common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/hwinit-common.c b/arch/arm/mach-omap2/hwinit-common.c
index 7f6db3c..77368ee 100644
--- a/arch/arm/mach-omap2/hwinit-common.c
+++ b/arch/arm/mach-omap2/hwinit-common.c
@@ -158,6 +158,14 @@ void early_system_init(void)
do_io_settings();
#endif
setup_early_clocks();
+#ifdef CONFIG_SPL_BUILD
+ /*
+ * Save the boot parameters passed from romcode.
+ * We cannot delay the saving further than this,
+ * to prevent overwrites.
+ */
+ save_omap_boot_params();
+#endif
do_board_detect();
vcores_init();
#ifdef CONFIG_DEBUG_UART_OMAP