diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2020-07-24 14:12:25 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-06 18:08:47 -0400 |
commit | 276b6c943a9b8166666b808c64d8a1deefdccbb3 (patch) | |
tree | ee655d923cfdfd5d4a273f75db4ec3d3f314fe28 /common/board_r.c | |
parent | 365af27f0dec5013c9749ee397e9274ff32e06c4 (diff) | |
download | u-boot-276b6c943a9b8166666b808c64d8a1deefdccbb3.tar.gz u-boot-276b6c943a9b8166666b808c64d8a1deefdccbb3.tar.bz2 u-boot-276b6c943a9b8166666b808c64d8a1deefdccbb3.zip |
common/board_r: Move blkcache_init call earlier in the boot sequence
blkcache_init manually relocates blkcache list pointers when
CONFIG_NEEDS_MANUAL_RELOC is enabled. However, it is called very late in
the boot sequence, which could be a problem if previous boot calls execute
blkcache operations with the non-relocated pointers. For example, mmc is
initialized earlier and might call blkcache_invalidate (in
mmc_select_hwpart()) when trying to load the environment from mmc via
env_load().
To fix this issue, move blkcache_init boot call earlier, before mmc gets
initialized.
Acked-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Tested-by: Angelo Dureghello <angelo.dureghello@timesys.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Diffstat (limited to 'common/board_r.c')
-rw-r--r-- | common/board_r.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/board_r.c b/common/board_r.c index 53792e9a31..d48d2bb8a0 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -714,6 +714,9 @@ static init_fnc_t init_sequence_r[] = { initr_watchdog, #endif INIT_FUNC_WATCHDOG_RESET +#if defined(CONFIG_NEEDS_MANUAL_RELOC) && defined(CONFIG_BLOCK_CACHE) + blkcache_init, +#endif #ifdef CONFIG_NEEDS_MANUAL_RELOC initr_manual_reloc_cmdtable, #endif @@ -848,9 +851,6 @@ static init_fnc_t init_sequence_r[] = { #if defined(CONFIG_PRAM) initr_mem, #endif -#if defined(CONFIG_NEEDS_MANUAL_RELOC) && defined(CONFIG_BLOCK_CACHE) - blkcache_init, -#endif run_main_loop, }; |