[U-Boot,v2,2/4] warp7: include: configs: Skip low-level init if BOOTM_OPTEE false
diff mbox series

Message ID 20190504000826.3618-3-bryan.odonoghue@linaro.org
State New
Delegated to: Stefano Babic
Headers show
Series
  • Tidy up some dangling OP-TEE gotchas
Related show

Commit Message

Bryan O'Donoghue May 4, 2019, 12:08 a.m. UTC
Commit c7b3a7ee5351 ("optee: adjust dependencies and default values for
dram") wants to skip low-level init of i.MX7 hardware in the case where
OP-TEE has already run and u-boot is being run as BL33 in normal world.

Currently we check for both #ifdef CONFIG_OPTEE_TZDRAM_SIZE and #ifndef
CONFIG_OPTEE to determine if lowlevel init should be skipped, however, in
order to ensure non-OPTEE users never see OPTEE related defines we cannot
rely on this method.

Fortunately we can use CONFIG_BOOTM_OPTEE for the same purpose.
CONFIG_BOOTM_OPTEE is only relevant if you want u-boot to load OP-TEE not
if u-boot has already been loaded by OP-TEE.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Breno Lima <breno.lima@nxp.com>
Cc: Rui Miguel Silva <rui.silva@linaro.org>
Acked-by: Rui Miguel Silva <rui.silva@linaro.org>
---
 include/configs/warp7.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 37649cf2c5..06e2e97d5e 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -18,11 +18,9 @@ 
  * launched by OPTEE, because of that we shall skip all the low level
  * initialization since it was already done by ATF or OPTEE
  */
-#ifdef CONFIG_OPTEE_TZDRAM_SIZE
-#ifndef CONFIG_OPTEE
+#ifndef CONFIG_BOOTM_OPTEE
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #endif
-#endif
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(35 * SZ_1M)