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 4A82AC432BE for ; Thu, 26 Aug 2021 21:44:05 +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 B79D260F4A for ; Thu, 26 Aug 2021 21:44:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B79D260F4A 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 8E6518322D; Thu, 26 Aug 2021 23:43:44 +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="vXDFCqke"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E69683213; Thu, 26 Aug 2021 23:42:45 +0200 (CEST) Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (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 927118323A for ; Thu, 26 Aug 2021 23:42:25 +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-ot1-x32d.google.com with SMTP id i3-20020a056830210300b0051af5666070so5391709otc.4 for ; Thu, 26 Aug 2021 14:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D9d00reuPnJt4IO8tXXk7K6+yF2oG/OxD6cAC0AOIs4=; b=vXDFCqkexZN7txz0aWZor4QmZL0a7Z2z0BmZwhqnHZ72iM1RvjFhVLN3FKxG5CZoMn 6JJH1+Lk8EfgjM8ju08TDK1Af/eVlkL3vAF3aV/YhboCRhq+FmfJgUDM+rSGasYemKnx aP2KiO9oS3h9WoJom3pk3mcIowelScIfUjIzBgKd7zH8BjO1/wgtSnyKvsGnWayBjuAS RzPRdusRqLMUkX+vDogW/96boZ5GxpWOkF7Y7xOUnr3E7esPmmTkAknCbrpJRhd84WjX LTBcHCOg94d8NqCiytrfzS3Fvs0Mtig3x5nhGx+gHDzU6OjqBiSnZdrT/OLD2P44M+Kb SS8Q== 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=D9d00reuPnJt4IO8tXXk7K6+yF2oG/OxD6cAC0AOIs4=; b=iB5SXoUC2Ltkmp14rzYmQutgq6fpTI/diCrjcVq8JPXLYZHomYFRqbKitRug7fxpJm szjm0Ri6b8bZGDVT+nt+SYXTG3wWnIzoSlxVPHo4jEMO3be6zhEavOx1Y0wfPMZ3ng/i DXlYJKBGvMZFBEmiRx/0NpRLoFFahGFfL5ATPYaUq4oeD5qzpRpJFHR5IUVaVfo11irs bGwl+NHAJydt3iMoKSUoXIhnlTo9wA+Job0s1esgDC8yeNMKV1hd17UooPeepwlhZoPs O0S33ivD0mxneBxDqRwkAt97jP36AuqKAyR1BTBERno+QpovXP7W3VOvKJH7y6UbikP1 Ou8A== X-Gm-Message-State: AOAM530qNkodejNoYJfrVdL81tOx0f5FNnXAXkyXyz6aEL6ddgiBKV6D CMkuYb14RFvRysQoLevewrYQRQKH7jo= X-Google-Smtp-Source: ABdhPJzrsvi5sGDq0MIm2W43mAkZ/q6p+FR3WmmralWQa5y+oXR3kjz/zPe52JbDaRWRhQmzr8IxQg== X-Received: by 2002:a05:6830:4097:: with SMTP id x23mr4949855ott.289.1630014143913; Thu, 26 Aug 2021 14:42:23 -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 14sm858852otl.78.2021.08.26.14.42.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 14:42:23 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de Cc: patrick.delaunay@foss.st.com, marex@denx.de, Alexandru Gagniuc Subject: [PATCH 10/10] stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads Date: Thu, 26 Aug 2021 16:42:09 -0500 Message-Id: <20210826214209.254461-11-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210826214209.254461-1-mr.nuke.me@gmail.com> References: <20210826214209.254461-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. As in other cases where there's an OPTEE payload (e.g. BOOTM_OPTEE), 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