From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jun Nie Date: Wed, 24 Apr 2019 11:59:25 +0800 Subject: [U-Boot] [PATCH v3 2/9] mx7_common: Share configs to skip low level init In-Reply-To: <1556078372-26851-1-git-send-email-jun.nie@linaro.org> References: <1556078372-26851-1-git-send-email-jun.nie@linaro.org> Message-ID: <1556078372-26851-3-git-send-email-jun.nie@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- include/configs/mx7_common.h | 11 +++++++++++ include/configs/warp7.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h index cc7e872..57fbec7 100644 --- a/include/configs/mx7_common.h +++ b/include/configs/mx7_common.h @@ -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 diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 043f286..80ddd72 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -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 - #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR /* Size of malloc() pool */ -- 2.7.4