From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 773D4C433F5 for ; Wed, 8 Sep 2021 00:01:47 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F0DD361102 for ; Wed, 8 Sep 2021 00:01:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F0DD361102 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8344C8335C; Wed, 8 Sep 2021 02:00:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ETYKq/k1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8E506817D3; Wed, 8 Sep 2021 02:00:18 +0200 (CEST) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3C657832FE for ; Wed, 8 Sep 2021 01:59:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-qt1-x82d.google.com with SMTP id w17so361975qta.9 for ; Tue, 07 Sep 2021 16:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XlUg7RO7kw4MoUmpYMCmlrfg8HxVGqffXkzZtrTrT/4=; b=ETYKq/k10vkE2oa1PuiNFN5/ZtbA+qHS+D/OTOLsTnLPUjV6ocKUW6DO3tbQS3/Q4s EpSPURsYKgyQiifjpEYCGFC05eOQeZNkbBsxV9nO39C2vp2AjQLl50Ix3YqCLtdlO3fS x+F56F4gh09NzqOOEWFzCMwovakQIfizNtF9kFbvyIpIaVDzpvEC40szb1uygBHSpN6j 5nXJD0WP8imXR00EPIC+VZ27DHs+xDfnaj9qDvUvZcO2zoIZcrs10+nA9G2Qx1nF/VwH WMZwlBnQAKlCEHWSChZYv8kcc7X2uMZG877nAIJUnPAyM2l4I+7obwYpdYJB38xB2FSp BTdw== 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:mime-version:content-transfer-encoding; bh=XlUg7RO7kw4MoUmpYMCmlrfg8HxVGqffXkzZtrTrT/4=; b=rP7YgwjwBROU+LxW+cEAmizWfX/MF97ELCe+nloBOVQwZ5RJGoYKC47KH3Jb67t8or HnFf3iPnsjJB/2Hqd0zE8yk941KBFh4u45y6bGhFBcVOEW/8eZ5ml7XUR3qFXgzryGDx ci3Mm7Na9s9+TKX1qZY9F0mFPg9+Ww40m+KR4k4a68SsDXTEfmKNK7YUSPywiuWawrM/ OqFYx2YNpREuCK2TLGuqvPTX/DJTtZ7r/5HC4AoOAsg8/ekP2ELQEyzwH2xCzMifd7xW 1A4WM1W7MPSHP6DgV4m9BZz1MAGlUTKWg07pgK149aBYy3DUiNG/BwYZJFUgbfmV2og5 Eugw== X-Gm-Message-State: AOAM532MscThbo16uj1UfmrT9Sf+GdRmeRC9c9GP/7776UklvH/fTnum N6hnnL08w66Zw7x2T3IsoD0LVe/T0ok= X-Google-Smtp-Source: ABdhPJzM9+ErToH7UbJFIZL/Gc4q2Ehju+EkEEKxhgEzGtlp8ZzcOdiaQeRYam6rCJxv6y4yNi9SuQ== X-Received: by 2002:ac8:5f52:: with SMTP id y18mr1012976qta.379.1631059188756; Tue, 07 Sep 2021 16:59:48 -0700 (PDT) Received: from nuclearis3.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id d78sm460351qkg.92.2021.09.07.16.59.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 16:59:48 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de, uboot-stm32@st-md-mailman.stormreply.com, patrick.delaunay@foss.st.com Cc: Alexandru Gagniuc , patrice.chotard@foss.st.com, etienne.carriere@linaro.org Subject: [PATCH v2 11/11] stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads Date: Tue, 7 Sep 2021 18:59:33 -0500 Message-Id: <20210907235933.2798330-12-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210907235933.2798330-1-mr.nuke.me@gmail.com> References: <20210907235933.2798330-1-mr.nuke.me@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean OP-TEE does not take a devicetree for its own use. However, it does pass the devicetree to the normal world OS. In most cases that will be some other devicetree-bearing platform, such as linux. OP-TEE is capable of patching the devicetree and adding the required "/firmware" and "/reserved-memory" nodes. Not all OP-TEE configurations do so, and it would need to be explicitly enabled (CFG_DT=y). There is a measurable boot time penalty to enabling this feature, and sometimes it is preferrable to do it in SPL for this exact reason. As such, there are cases where it is required to copy the optee nodes to he target's FDT. Do this as part of spl_board_prepare_for_optee(). Signed-off-by: Alexandru Gagniuc --- arch/arm/mach-stm32mp/spl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c index d9fdc5926c..94fbb45cf9 100644 --- a/arch/arm/mach-stm32mp/spl.c +++ b/arch/arm/mach-stm32mp/spl.c @@ -19,6 +19,7 @@ #include #include #include +#include u32 spl_boot_device(void) { @@ -182,6 +183,7 @@ void stm32_init_tzc_for_optee(void) void spl_board_prepare_for_optee(void *fdt) { stm32_fdt_setup_mac_addr(fdt); + optee_copy_fdt_nodes(fdt); stm32_init_tzc_for_optee(); } -- 2.31.1