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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAF06C433F5 for ; Fri, 24 Sep 2021 16:46:17 +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 C447F6124B for ; Fri, 24 Sep 2021 16:46:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C447F6124B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 3ADE5832C1; Fri, 24 Sep 2021 18:46:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="ne9uwcSq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8DB90832E8; Fri, 24 Sep 2021 18:46:11 +0200 (CEST) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 03050832AD for ; Fri, 24 Sep 2021 18:46:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wr1-x435.google.com with SMTP id w17so29218960wrv.10 for ; Fri, 24 Sep 2021 09:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bafMd70OQ65pS4miGm4DaFvh5fTOCDFXwK6y+XwwYFI=; b=ne9uwcSqBVcu2Vh8UuIZZKUKmU7eUj137ppu86/E3+lLWAJscxgMAIYS2iwm0Buvoe EM1A2QmBYfVl3YVz5yDmC9T7/0KSSCD+uUoD3onONDqOK33qdkMvQVhR5uWLATZv3i2W kkgyrY6ZkpHhZnXK0IElcml+lfu/y9GdoWf9inGS4dg+DRF1wygiDkRhYLIsTnoriqJK l0u+SzGNmUhz5/rX2U6M9IZ7GcyXI2uQ+jnEpmqC0PMBVT6vak6SSw+aTdFTTF2i5WpZ EPLNcHyky0j5VMf7uRW1ejCfuLKZIc3EhAEEAHj2lmpa3ySXM+Pz4MQZpSNwXqZ2jXqO lQKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bafMd70OQ65pS4miGm4DaFvh5fTOCDFXwK6y+XwwYFI=; b=xqezWqWumbLqromAYay2/LKZWO7Gf8pl6RYpBWtiLyTHTNXdNuCo/GhlXMb/zce/+T RaAv7I/5f3qqrJJbyq0zxZ2wKkP+N+K7fyjJ7Sqo8NsM96rXyG86asYFycNNOUfVoZt6 elsULKoh8yzMviD9vHv+jaWn1GkJi0Bd3F5Q9OQfxE8DBrvhd0qbgxKQdwKoyrBTkmAW 1oHTfnclOHb6HH9d67rrkXfkDLbKOqII66w6H/ykjGYIhEGwsONI3TaLqDcZ0ru9LYD9 7v3rlH5LaoZ4Low1spElHIOkNdYLTL6lukJrasRql6qqsahXxYIKLe/w3CV2UcQgojQE i9MQ== X-Gm-Message-State: AOAM5330scuWJsmR1V5f2x4hfUk0pv6jJq592H1jG8eyk6xKi40mg6pP 6F9Go7hOw6Jj9SvYfttxqW1OJg== X-Google-Smtp-Source: ABdhPJxJmATwKWsBPbHwQZMnzurM9t30VJlseJZTjmn4xF/+WC4xqxAWyomxR2prq+9xXo4WHIBd2w== X-Received: by 2002:a5d:4601:: with SMTP id t1mr12390801wrq.298.1632501967540; Fri, 24 Sep 2021 09:46:07 -0700 (PDT) Received: from enceladus (ppp-94-66-220-137.home.otenet.gr. [94.66.220.137]) by smtp.gmail.com with ESMTPSA id c7sm10608604wmq.13.2021.09.24.09.46.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 09:46:07 -0700 (PDT) Date: Fri, 24 Sep 2021 19:46:04 +0300 From: Ilias Apalodimas To: Heinrich Schuchardt Cc: Rick Chen , Leo , Thomas Fitzsimmons , Simon Glass , Bin Meng , Marek =?iso-8859-1?Q?Beh=FAn?= , Green Wan , Sean Anderson , Lukas Auer , Brad Kim , Zong Li , David Abdurachmanov , Dimitri John Ledkov , u-boot@lists.denx.de, trini@konsulko.com Subject: Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE Message-ID: References: <20210924131021.814662-1-ilias.apalodimas@linaro.org> <47893238-a216-1ae4-0af0-e9bf340798a8@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47893238-a216-1ae4-0af0-e9bf340798a8@canonical.com> 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 On Fri, Sep 24, 2021 at 04:46:58PM +0200, Heinrich Schuchardt wrote: > > > On 9/24/21 3:10 PM, Ilias Apalodimas wrote: > > At some point back in 2018 prior_stage_fdt_address and OF_PRIOR_STAGE got > > introduced, in order to support a DTB handed over by an earlier stage boot > > loader. However we have another option in the Kconfig (OF_BOARD) which has > > identical semantics. > > > > A good example of this is RISC-V boards which during their startup, > > pick up the DTB from a1 and copy it in their private gd_t. Apart from that > > they also copy it to prior_stage_fdt_address, if the Kconfig option is > > selected, which seems unnecessary(??). > > > > This is mostly an RFC, trying to figure out if I am missing some subtle > > functionality, which would justify having 2 Kconfig options doing similar > > things present. > > > > - Should we do this? > > - Doesn't OF_BOARD and OF_PRIOR_STAGE practically mean "Someone else is > > going to pass me my DTB". Why should we care if that someone is a prior > > bootloader or runtime memory generated on the fly by U-Boot? It all > > boils down to having a *board* specific callback for that. > > - RISC-V binman should get rid of the option as well if we decide to go > > though with this (but I have no idea what RISC-V expects there). > > Just replace CONFIG_OF_PRIOR_STAGE by CONFIG_OF_BOARD. Ah thanks! > > > - return (ulong *)gd->arch.firmware_fdt_addr; [...] > > - else > > - return (ulong *)&_end; > > - } > > + if (gd->arch.firmware_fdt_addr) > > + return (ulong *)gd->arch.firmware_fdt_addr; > > (ulong *) makes no sense here. (void *) would be more adequate. > Yea I preserved what was already in there, since I thought that was gonna require a different patch to fix. But Since I'll be moving these lines away I might as well fix it. > > # elif defined(CONFIG_OF_PRIOR_STAGE) [...] > > + /* > > + * obsolete don't use this on newer boards. Prefer CONFIG_OF_BOARD > > + * instead > > + */ > > This comment should be in Kconfig. I'll add it on both. The point is prevent people from doing a similar thing again, even if I miss the mail on the list! Cheers /Ilias > > Best regards > > Heinrich > > > gd->fdt_blob = (void *)(uintptr_t)prior_stage_fdt_address; > > # endif > > # ifndef CONFIG_SPL_BUILD > >