From patchwork Wed Apr 24 03:59:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 1089879 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="Poto84Kv"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44pmv9695sz9s3q for ; Wed, 24 Apr 2019 14:05:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 57F48C21DA2; Wed, 24 Apr 2019 04:01:43 +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=RCVD_IN_MSPIKE_H2, 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 1D511C21DF3; Wed, 24 Apr 2019 04:01:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 55E87C21C27; Wed, 24 Apr 2019 04:00:16 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by lists.denx.de (Postfix) with ESMTPS id 17A4DC21DCA for ; Wed, 24 Apr 2019 04:00:13 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id h18so2872630wml.1 for ; Tue, 23 Apr 2019 21:00:13 -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=dx5X40rwCpMyDxgxlMSACSKGbHBQ4NdUsTItU+h96zA=; b=Poto84Kv/WpFA0s3f+Ge2qQiObkU0q6BcFtFK/KfSUkvUrv39z6x2K8aaA888kHVMe 4nX/oNfuIL/P3J7AifWoqGbAFi/s2HMbm8cgAN5zvN7ae/QVhmJy/7ylu1rIToDAMIEW Qkr0B3jShDbDSfZZoLOMSfu8j5j9ybAXMg8IW6G8aQdkYOVS+h0Gf7dw04xGpT3YYG2F cdLoyYn7CI+n5PQf7ZM4wRpdUlZ9lwqVCpPsl0BtoA3xCO0Zt72zGPO+a9WcmLIdRPsD CTlLDOUmF4bTeAMszVpH+UUY5n/sJWeNWXp3PKmiY0MHgpTysSMgKQKejH0tv7RCkmCD 449A== 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=dx5X40rwCpMyDxgxlMSACSKGbHBQ4NdUsTItU+h96zA=; b=t0JTC950RhaGs55ByqBZ2pQCsNz9ZD11++EkjBuKWe/eJR/KUSIdnGb7O/Apsp2TZo uxXOosjFOMPKpZUTXIvzkL6OyFtNia1IStgPZ5kVqH4vp4y+qkaBqu/+trIgLzjyaptj mheZ29GcbtDXWX4Zve+eX5TZbLCOtEt9kBC4EwFhRjdi+elfqYLqKjwCrSJD2Fjuz5Yn bFESl8ZzHCG93vTG39bN+35AR2FI0FXcFURPsbU2mldr2uVBrZTV0l0DkIZwKdVdJYc/ mGwbu6R+J5HbCrXFsWSZeavy41Zzp+B/rOq31iaIUdpIurrFwMNUPLQV6U+7oh4kyc8x RMWw== X-Gm-Message-State: APjAAAVmDwePXkCMIpbj+AGhicxTeSr1zFReDtcY8IOy6J8pMMDoJEJB ZZaYZK6vvO2+uo09XXpX5CNKmQ== X-Google-Smtp-Source: APXvYqwtOkC1LkxEHhlIhmZ+7wyK5/As4DgnZ9uvWr0h0aUu/8wDrEW0vogMJ43DnmDBFzNwxUySDw== X-Received: by 2002:a1c:ef10:: with SMTP id n16mr823585wmh.70.1556078412749; Tue, 23 Apr 2019 21:00:12 -0700 (PDT) Received: from localhost.localdomain (li1805-140.members.linode.com. [172.104.229.140]) by smtp.gmail.com with ESMTPSA id x192sm26613948wmf.48.2019.04.23.21.00.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Apr 2019 21:00:12 -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: Wed, 24 Apr 2019 11:59:25 +0800 Message-Id: <1556078372-26851-3-git-send-email-jun.nie@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556078372-26851-1-git-send-email-jun.nie@linaro.org> References: <1556078372-26851-1-git-send-email-jun.nie@linaro.org> Subject: [U-Boot] [PATCH v3 2/9] 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 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 */