mx7_common: Share configs to skip low level init

Share configs in mx7 to skip low level init if we are in the case where
OPTEE is loaded already (maybe by ARM Trusted Firmware) and that most of
the low level initialization is already done and that we may/should skip
it doing them here.

Fix the definition detection with size detection to decide whether to skip
it.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
This commit is contained in:
Jun Nie 2019-05-08 14:38:29 +08:00 committed by Stefano Babic
parent 7a3faf31a7
commit 3ad0d26878
2 changed files with 11 additions and 11 deletions

View File

@ -54,4 +54,15 @@
#endif
#endif
/*
* If we have defined the OPTEE ram size and not OPTEE it means that we were
* launched by OPTEE, because of that we shall skip all the low level
* initialization since it was already done by ATF or OPTEE
*/
#if (CONFIG_OPTEE_TZDRAM_SIZE != 0)
#ifndef CONFIG_OPTEE
#define CONFIG_SKIP_LOWLEVEL_INIT
#endif
#endif
#endif

View File

@ -13,17 +13,6 @@
#define PHYS_SDRAM_SIZE SZ_512M
/*
* If we have defined the OPTEE ram size and not OPTEE it means that we were
* 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
#define CONFIG_SKIP_LOWLEVEL_INIT
#endif
#endif
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M)