From patchwork Wed Mar 10 18:04:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Gagniuc X-Patchwork-Id: 1450703 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=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; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Pglu30KA; 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 4Dwg3k6JdSz9sCD for ; Thu, 11 Mar 2021 05:05:38 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D005282879; Wed, 10 Mar 2021 19:05:06 +0100 (CET) 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="Pglu30KA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5572782858; Wed, 10 Mar 2021 19:04:53 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oo1-xc33.google.com (mail-oo1-xc33.google.com [IPv6:2607:f8b0:4864:20::c33]) (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 6F6548280F for ; Wed, 10 Mar 2021 19:04:49 +0100 (CET) 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-oo1-xc33.google.com with SMTP id e19-20020a4a73530000b02901b62c0e1bb6so9162oof.11 for ; Wed, 10 Mar 2021 10:04:49 -0800 (PST) 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=iVZ40YEjwOj4RvCbzP4fvthG3mPWCdeGQf/gOri7VX8=; b=Pglu30KA4mgGf1k35MODHmBAmVtPA8WVrYml7Z9lI+ytuv1JDcPnWQG/9SijQzugg1 5Marw2ICJDRZPAd15tZAG+CTMprVikSZBOdArVgtZA9IdUyfG0iNSoKk4qS2i69O/F9y m/tcZGKs3OyKfzY9UKkASsbKGUoCce7qTW3XuN/1Pk7gHEWl6WXfxNbBENbUzMBGUYwc UWO3rfqKBGHOqQEwlyVNuuuFZO+MzpzC94qt/e0C/CwKFouVczjOTSt4qXaZkGRY8S94 RrpizcYV/8tQ3DthCwmPkKWu99LCE11iT7y3hWqFRZIWYfCNdAJg7Uzq2NsfiHgGqNxW Kj0A== 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=iVZ40YEjwOj4RvCbzP4fvthG3mPWCdeGQf/gOri7VX8=; b=SfOyZFRPTwCffYvfu7UkLQukhKHyF/BNOnxolSAep+BygCpAfmcAQaFbGgPZ//nMEj oYdHIGdKNhjfxm4h0jA9TH10nIOtQOWePOryD35+s9OTJ7nsD7N77LWvGArGxjQEiX7T cwKpLAOu6cbhLEG6vGXh10yvj9958XykAzyy4UT6LtmoSCOGq7SUNMsHTvbuB3Fw2SCg idhaUCf4u+Qfrg+DvgJev5GqstjrCzoqzYJPRttH2MWnBkqEfdKlxWyKPoX/tD1rClYd 9xNg9DjTFZoKurfLQiZC+RiXvsyO3MOHBLsUIlnSFJmvDte2Vs8xnRQW0E5KGRNbBmKA zXMQ== X-Gm-Message-State: AOAM532BpuUS1b4OWXDocLsYWDKXLlZvbw2dxnN0fN7/kQ0GUHOi421o 65ElXZ2j2YHa3uZL4kVx/5GXti8EneNYDQ== X-Google-Smtp-Source: ABdhPJxPn10Vu76QmsIryTdo7WW0fO2k+zkgtB9mahlb82lctku8LEZYSoE9ItQHtkyjxWqErMvlJA== X-Received: by 2002:a4a:d0ce:: with SMTP id u14mr3232056oor.36.1615399487973; Wed, 10 Mar 2021 10:04:47 -0800 (PST) Received: from nuclearis2-1.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id 67sm82965otv.5.2021.03.10.10.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:04:47 -0800 (PST) From: Alexandru Gagniuc To: u-boot@lists.denx.de, trini@konsulko.com, sjg@chromium.org Cc: Alexandru Gagniuc , marex@denx.de Subject: [PATCH 4/7] spl: fit: Warn if FIT contains "fpga" property in config node Date: Wed, 10 Mar 2021 12:04:39 -0600 Message-Id: <20210310180442.746517-5-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210310180442.746517-1-mr.nuke.me@gmail.com> References: <20210310180442.746517-1-mr.nuke.me@gmail.com> MIME-Version: 1.0 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.102.4 at phobos.denx.de X-Virus-Status: Clean Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify syntax") requires that FPGA images be referenced through the "loadables" in the config node. This means that "fpga" properties in config nodes are deprecated. Given that there are likely FIT images which use "fpga", let's not break those right away. Print a warning message that such use is deprecated, and give users a couple of releases to update their Signed-off-by: Alexandru Gagniuc --- common/spl/spl_fit.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 55fca9f399..68f29c0026 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -526,6 +526,13 @@ __weak bool spl_load_simple_fit_skip_processing(void) return false; } +static void warn_deprecated(const char *msg) +{ + printf("DEPRECATED: %s\n", msg); + printf("\tThis will stop working in a future u-boot release\n"); + printf("\tSee doc/uImage.FIT/source_file_format.txt\n"); +} + static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node, struct spl_image_info *fpga_image) { @@ -558,6 +565,8 @@ static int spl_fit_load_fpga(struct spl_fit_info *ctx, if (node < 0) return node; + warn_deprecated("'fpga' property in config node. Use 'loadables'"); + /* Load the image and set up the fpga_image structure */ ret = spl_load_fit_image(info, sector, ctx, node, &fpga_image); if (ret) {