From patchwork Thu Mar 28 08:29:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 1067885 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="rQVMpVq5"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44VJ471rMfz9sPp for ; Thu, 28 Mar 2019 19:31:19 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id E395AC21E85; Thu, 28 Mar 2019 08:31:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 521C6C21EBB; Thu, 28 Mar 2019 08:30:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8D3BAC21E38; Thu, 28 Mar 2019 08:30:39 +0000 (UTC) Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) by lists.denx.de (Postfix) with ESMTPS id B89D1C21E1D for ; Thu, 28 Mar 2019 08:30:32 +0000 (UTC) Received: by mail-ot1-f65.google.com with SMTP id f10so17526473otb.6 for ; Thu, 28 Mar 2019 01:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9rjM+atYur+6FSpM4AF/2P3WrBJgpOmMpUitrHkDMhs=; b=rQVMpVq51QXUoiF1FUmqhAdMrpduWl3gOE8aJfGy4LB88sT6xKsxhljyYFCHGE36Bl 45kg1KLenSWfoLwwiybKUj9o24D2PhLMej+8whJKuTUEaJnEjktegr7Knn9Tj+mz2tg1 IQlBxU440C4vZyer1UdZQfFcfFVS92fyloVjLKDIsfSggQN8zGBcOy/mUgGH4NH6gvEN RCzRu+bUQQ/bwSnIxT8PL4No+Tc2C2KSgQp8ETHvsrn4g8ZJo4w2H1BhhIeU+A52djsp I3/8wyjdtPcRPCiD+xUi2znl0q1ff2tzzKVdv2Kk7c6LcuRI9luNo+HHIQ/LGhw7UaRs PwkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9rjM+atYur+6FSpM4AF/2P3WrBJgpOmMpUitrHkDMhs=; b=RnADtMiz/sVB3PJ+hJOMupUupLkSy1Hxh8Eza0h05+elFXNq5LiZ7ArPY0MZwHTB71 Na3d3lxePhljubrJA91T5OMbi2yNN84vTU4O9hRGi6438m6IuQo3h3UvG0lOYWqci6W5 ZN9iD8o9cBGAnR3roZdfYmdXva42osfAH1vSw+CByNjSeClB7AElXLlmTsCK/QoUs2US Pokuc1iRnAtcRD6LR+NlRz0Mk0O0V6VrM5/kT26UJjHFPc3zmeQXGTDtsUEW0b87hhTv Id9SXZ+kTwtkhtNOVnji9A8ID6JKSdgl6O5gQKL0JXlUb/6JMSjOArikojsGLCW+JhW6 i5JQ== X-Gm-Message-State: APjAAAVzWRK/pzew3rafYWBgsAhmOia7GaE2PHWuaUWIQjdx4rwLrPxc 78SQW4sPgmJJvPvUQCuXwcjANQ== X-Google-Smtp-Source: APXvYqxZn5Q33BkAUPrbiFudUZuJ7l/lakJkE2UmNvhOOoTFhg7izfxrIMW+8uxjLvjlbkMZbs1o/A== X-Received: by 2002:a9d:7306:: with SMTP id e6mr28560448otk.79.1553761831693; Thu, 28 Mar 2019 01:30:31 -0700 (PDT) Received: from localhost.localdomain (li808-42.members.linode.com. [104.237.132.42]) by smtp.gmail.com with ESMTPSA id 96sm7290778otf.17.2019.03.28.01.30.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Mar 2019 01:30:31 -0700 (PDT) From: Jun Nie To: festevam@gmail.com, otavio@ossystems.com.br, peng.fan@nxp.com, vanessa.maegima@nxp.com, bryan.odonoghue@linaro.org, u-boot@lists.denx.de Date: Thu, 28 Mar 2019 16:29:56 +0800 Message-Id: <1553761801-2489-2-git-send-email-jun.nie@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553761801-2489-1-git-send-email-jun.nie@linaro.org> References: <1553761801-2489-1-git-send-email-jun.nie@linaro.org> Subject: [U-Boot] [PATCH v2 1/6] mx7_common: Share configs to skip low level init X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 a895c93..912fb06 100644 --- a/include/configs/mx7_common.h +++ b/include/configs/mx7_common.h @@ -57,4 +57,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 */