From patchwork Mon Mar 23 13:57:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1260044 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=zpR8WoWM; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48mGF55n1kz9sSV for ; Tue, 24 Mar 2020 00:58:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EFCFF818BC; Mon, 23 Mar 2020 14:58:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="zpR8WoWM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 59D36818BD; Mon, 23 Mar 2020 14:58:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 DC133818A2 for ; Mon, 23 Mar 2020 14:58:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wr1-x442.google.com with SMTP id a25so17224654wrd.0 for ; Mon, 23 Mar 2020 06:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vx/bozapi8WUBcEW4CacdvJ7BelGm6ue2s7yydl2zNg=; b=zpR8WoWMFZ39noFCtH2vyo17tTvNdch//kR/dE3sVOKE+UIaNhvR/ETX9hTleRpLz/ uVaJYgbpfY5WVjArY47VmLZRVZdfAAWU3WGi+PjluHsXPT404uRJZMAPO2GQPQSqcxv1 zQALmrh85Bts5l4F6YN3Hi0GpjtHKJQPssSntl3mITwsZLHlhjej1iURfZvwX7bQOizY g+8M4kLXHuQIN+k4Tdyl6PvAsAGKRPyjmRAjXG7nt7bBmeoFBujogQWVjkVWjvpJXgLp XpgSFfwQyGmLYvdsZVO/NkT2HWk8RKpVJpUMvPZsz5XpXwlQSBegvkPXTFBoNxZVRBng M8xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Vx/bozapi8WUBcEW4CacdvJ7BelGm6ue2s7yydl2zNg=; b=NFRiB0GcZB4/lemhpSDzK8G2y9NXE2ZODDs5AjJMNsRJzUEHqL8S0CkM1SYxLWU4oe yo3CkFwpX7vJnMsbiBaJjzEV/l4un/9VBWufCmfxSeoWQ1wX7oyEwrGL+MMpHRjAHGqO +p3N4OekGpIycvJqxiwaZzP85KBn3uaK4tvAgPWEkWNBEHVVGQIZ4Vdyvtq7d98Dwxph 3HyC9VQE6nUA2x0l8wGwI+N0zY1XJhEWGLn/LKawl9yXBwyAgkupiodHKWh0Mn7xpDfR Qfrd37LiY5+dn7ANPXrkj2uMNpRidVB7UGxm8lO5k7a7/DjMEhfK5NrMmcFL9rdu2D43 6PXw== X-Gm-Message-State: ANhLgQ0sTIF0xVRrf106dH+zhg04D6Rt905IsEl9tCGAnOcLVcZbRUkp tD9cdg7Rog4qB8jXNAFv0GmXUDpJpDKRfw== X-Google-Smtp-Source: ADFU+vsn6IHb1Qba/eZF2L4w71JyLQxYe68vQ7BynBeGuoaJAYvtXcZ31t6J4jO9IRJQrFz7V5yMAg== X-Received: by 2002:adf:b60d:: with SMTP id f13mr2013681wre.12.1584971884170; Mon, 23 Mar 2020 06:58:04 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id m12sm15575580wmi.3.2020.03.23.06.58.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Mar 2020 06:58:03 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, ynezz@true.cz Cc: Ashok Reddy Soma , Ibai Erkiaga , Luca Ceresoli , Rajan Vaja , Siva Durga Prasad Paladugu Subject: [PATCH 1/3] firmware: zynqmp: Enable IPI code calling also in EL3 Date: Mon, 23 Mar 2020 14:57:58 +0100 Message-Id: <0d1ffc4839bef7223c575b2948a01faf2bd36bff.1584971878.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.102.2 at phobos.denx.de X-Virus-Status: Clean U-Boot proper can still run in EL3 without using firmware interface wired via ATF. For supporting this use case there is a need to check EL level where U-Boot runs and based on that choose the way how to talk to firmware. Signed-off-by: Michal Simek --- drivers/firmware/firmware-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c index 2a2aa2f4f169..c37642569dda 100644 --- a/drivers/firmware/firmware-zynqmp.c +++ b/drivers/firmware/firmware-zynqmp.c @@ -51,7 +51,7 @@ static int ipi_req(const u32 *req, size_t req_len, u32 *res, size_t res_maxlen) static int send_req(const u32 *req, size_t req_len, u32 *res, size_t res_maxlen) { - if (IS_ENABLED(CONFIG_SPL_BUILD)) + if (IS_ENABLED(CONFIG_SPL_BUILD) || current_el() == 3) return ipi_req(req, req_len, res, res_maxlen); return xilinx_pm_request(req[0], 0, 0, 0, 0, res); From patchwork Mon Mar 23 13:57:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1260045 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=czZwJIrV; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48mGFG4QKZz9sNg for ; Tue, 24 Mar 2020 00:58:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9FDF181901; Mon, 23 Mar 2020 14:58:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="czZwJIrV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9CB6818BC; Mon, 23 Mar 2020 14:58:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 70409818BC for ; Mon, 23 Mar 2020 14:58:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x341.google.com with SMTP id d1so14916931wmb.2 for ; Mon, 23 Mar 2020 06:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LWCcz0iQlkmB9PZrpydcr66GqhfLQ2dZvhdrKY1draA=; b=czZwJIrVFOysKdFnqTY9zSE9lsp1ZTBcrKAW/Jl8kK5pY4n4fboAKwaPxNwm7qOvOh BkCqx5rPIblX6/Dju04Y0bggx8kGK0Swmt0MyxChBO56Zqj7ZQkHhjjEcxpcnaHpfwQj /P4A+NiKzZuINjRByqlMfBN+4Av9k0phb5mDHXuBjlaNdMHvUtiTnwkCRPW0y9s6ZXIA 5xLXrx6jMQ3mW7+YBYKbWPBMyol2fBzm6E6JObNbEKWQcPMsLnxhJSKqvsUgcOsPEj5C 52c7ne9RRCgieHGluPOCFIjCQbaY1FIFrKl7/uh7r9LfbLKwF3JRg67CaT0qZi2iAb77 7+7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LWCcz0iQlkmB9PZrpydcr66GqhfLQ2dZvhdrKY1draA=; b=syN0dGBm95fBOUlgoMxqoTSkn/EXM1/klgFx8z53TDpGS63jn3uSvPlK/kbosZtGff HNJKMz6XBBsBaZFAYILsW/0Aal3bqtfQXPMIlleTPB2qdQEcxlD0/Ny0NWdix6ZRuW78 mHD84eAvIvKwDPmVmTyR8zPo4Ke4R3D3xdw5ebryvV/OWTiSg3cqSQbPAV6onLGyUnoH S/Rw4LoayRmIKkjpg1kwMshg7+ovIk3rv9jQkFbxEaWJgHs2atTm7Y1uA1mLgQAq/c8T K+iOAROvJefebF+gKQYoiIWdiywJlHwU7OJpsmbE/N4GPF72fcvObAF0GRlp1DiRr241 leRg== X-Gm-Message-State: ANhLgQ137bd+wQyrWZqQajMKQzmt6TNylZbPJZ+AEeuj468zQCqyKK/n iQjhZkKk/aApSClMvhyvMV46bQNkdGhpiw== X-Google-Smtp-Source: ADFU+vs4Wb0/kEkedxeNw2i/X/XP/K8yNeYrQZLZxd3/LgVEGVBW36Qnv1Yd1Ya1FuMZuEgaz1VL4Q== X-Received: by 2002:a1c:9d09:: with SMTP id g9mr28008109wme.68.1584971885792; Mon, 23 Mar 2020 06:58:05 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id a192sm22695183wme.5.2020.03.23.06.58.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Mar 2020 06:58:05 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, ynezz@true.cz Subject: [PATCH 2/3] arm64: zynqmp: Reorder parameters for zynqmp_mmio_write() Date: Mon, 23 Mar 2020 14:57:59 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.102.2 at phobos.denx.de X-Virus-Status: Clean Parameter order is not correct based on zynqmp_mmio_write() declaration. Fixes: be52372ff1bb ("arm64: zynqmp: Use zynqmp_mmio_read/write functions") Signed-off-by: Michal Simek --- board/xilinx/zynqmp/zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index eb1bc0861e2f..3c92b1a5825f 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -515,7 +515,7 @@ static int reset_reason(void) env_set("reset_reason", reason); - ret = zynqmp_mmio_write(~0, ~0, (ulong)&crlapb_base->reset_reason); + ret = zynqmp_mmio_write((ulong)&crlapb_base->reset_reason, ~0, ~0); if (ret) return -EINVAL; From patchwork Mon Mar 23 13:58:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1260046 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=OqF650L+; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48mGFT6Dtcz9sNg for ; Tue, 24 Mar 2020 00:58:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0B9A0818EB; Mon, 23 Mar 2020 14:58:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="OqF650L+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 11EC6818A0; Mon, 23 Mar 2020 14:58:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 63770818A0 for ; Mon, 23 Mar 2020 14:58:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x342.google.com with SMTP id 6so14750264wmi.5 for ; Mon, 23 Mar 2020 06:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qsOxEcSpCUmGlzNjg+S9UUsxP4VBzND1mii1/pR5B2Y=; b=OqF650L+7cK+0Txp3+EgbuyKnOznS51FTzVieTvVtGJNN+yduNhBAAFSkOznqbBZGB vUc5PTr1D74XyN0ZcsVfmgxC2CwaOtsITK+S4hJ1AW9ZfPCoEKiNQiw1JECX2cjvr+aK VnLdB/ksKwztRDQOk3v9sLeU66EBShOdDtFXBtE5bHxu8PCsOg/G8yr/M8LKlBxSf1AW arZzex4PuKFcBKunb1jUhwoogmP4euFS11jHBwz3nOwz+i36UrtLGgQzszekG5E2qvJt qh/7RswKu54zykwzP58iaJIHiV60uWdwqwVo1yVy0AUlyg2ycORzcVVtEEXotkXByIUl 0VKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qsOxEcSpCUmGlzNjg+S9UUsxP4VBzND1mii1/pR5B2Y=; b=C+YDoeftd9lW5RKYeHAqz//fqK597tIt84BMMGCDQOgFtfIJ7IrpNozK1hFxFrGYEe mW9/pKv7rF6NfHzWGng54SkI+UsdmEd/9sKK3zn9ZYGR7qdUwpr0N+c8ks9kD2Kymp22 czydhgZKzK4hzlSWy2iJCTwtG9rLhXiltSMEBelYiizsKvL1Vh11kwwreyflxDt3cvzi Fcq++fuDtS+8piJrOQ7Dna91LUgGwVvf3vWB9wBcvIwXZrEBPH/QYw/fA3wMLSdYeDDp I0/CsAntVxbRIE0zKt5xbfyS0oXv/yJWizCfrCtUcNOPkYB9UivV7O3edYOQf3IjlMJo KucQ== X-Gm-Message-State: ANhLgQ2bi1fV7X4QJxTR/tDt234eRb9dZeBeKhPZY9NTX6RuhtjN2nRu r8iJsFpKl4PvtT0IRusZWGJ28/UmCZPtAg== X-Google-Smtp-Source: ADFU+vurROpTvRjEcWTPQFMKtENA8MWxv5mrw8IMM0T9ooA/9lf7y/dxn88fm2BuYhKEzNyumb220w== X-Received: by 2002:a05:600c:11:: with SMTP id g17mr27032490wmc.142.1584971887559; Mon, 23 Mar 2020 06:58:07 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id y5sm21867468wmi.34.2020.03.23.06.58.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Mar 2020 06:58:07 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, ynezz@true.cz Cc: Michal Simek Subject: [PATCH 3/3] arm64: zynqmp: Add support for u-boot.itb generation without ATF Date: Mon, 23 Mar 2020 14:58:00 +0100 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.102.2 at phobos.denx.de X-Virus-Status: Clean If ATF doesn't exist generate u-boot.itb without it and let U-Boot run in EL3. Still keep warning to let user know that ATF/BL31 is missing. Signed-off-by: Michal Simek --- arch/arm/mach-zynqmp/mkimage_fit_atf.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-zynqmp/mkimage_fit_atf.sh b/arch/arm/mach-zynqmp/mkimage_fit_atf.sh index 1e770ba111d3..e221e92828ad 100755 --- a/arch/arm/mach-zynqmp/mkimage_fit_atf.sh +++ b/arch/arm/mach-zynqmp/mkimage_fit_atf.sh @@ -29,11 +29,8 @@ else fi if [ ! -f $BL31 ]; then - echo "WARNING: BL31 file $BL31 NOT found, resulting binary is non-functional" >&2 + echo "WARNING: BL31 file $BL31 NOT found, U-Boot will run in EL3" >&2 BL31=/dev/null - # But U-Boot proper could be loaded in EL3 by specifying - # firmware = "uboot"; - # instead of "atf" in config node fi cat << __HEADER_EOF @@ -106,6 +103,15 @@ __CONF_HEADER_EOF cnt=1 for dtname in $DT do +if [ ! -f $BL31 ]; then +cat << __CONF_SECTION1_EOF + config_$cnt { + description = "$(basename $dtname .dtb)"; + firmware = "uboot"; + fdt = "fdt_$cnt"; + }; +__CONF_SECTION1_EOF +else cat << __CONF_SECTION1_EOF config_$cnt { description = "$(basename $dtname .dtb)"; @@ -114,6 +120,8 @@ cat << __CONF_SECTION1_EOF fdt = "fdt_$cnt"; }; __CONF_SECTION1_EOF +fi + cnt=$((cnt+1)) done