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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 904FFC433F5 for ; Fri, 17 Dec 2021 04:05:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F1CA0830C3; Fri, 17 Dec 2021 05:02:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Ay5fsGW9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A607A8317A; Fri, 17 Dec 2021 05:01:12 +0100 (CET) Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) (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 0D75F830B3 for ; Fri, 17 Dec 2021 05:00:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x232.google.com with SMTP id t23so1857602oiw.3 for ; Thu, 16 Dec 2021 20:00:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EvL6nPRwHlrgSjFsK9yUure2Hko1F8AX8aKPnWVwcCY=; b=Ay5fsGW9J8QVmNbKJwvx0n/KsDQ5Wk/ih1eWvjOx3zbjfMbGuauK61nrpMo/T8JNSM BzyPNpXnvj9osd0MemcHfUsIT5zB1NcYTATECRNbW152vUhBn7kTM9W2l6Mj5avpZHsK 8xY+tWdixyC69NL2JGiPBBxsNdp5XKnA2y1/E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EvL6nPRwHlrgSjFsK9yUure2Hko1F8AX8aKPnWVwcCY=; b=yYQrOBppGw0GBNCAwcfsrgwD4QbwUeXsb5uVDz8aColyoxqyL7Fwd4/lV11yAXv3Je BY6NGFoVL/lY6POGNCWiY7LBFc8F9rX1JIhu1AxUPmUfnJjz7iAf36Gm+9tUulezhqhP ygPkHwhd6ZxrpBDOKUxrrApOKRTsmv3tLSvKt0p1OfyBMnDYbn1ZQwRUVXxad5r7vXCq uHbjNYh2TT1pz+s83MJ4zFRmlxBzs0duOEpubcDx+QhWIB8XvavCwqKNujqZtwf6RIFT ttKkgYpQEZKQtNDSpygAGp2NmC0w/HJ2t5hTPk6RgEU9tStAgo3ezvp4mkpVHjQdwpki covA== X-Gm-Message-State: AOAM5332A11fENogiA6iQ7//h9T/asKJILYbPF7KgS7RtSvdmTpDhP3p fSb6iQQPKLl2+VrEtWoAKS8WuOLpeGbeQQ== X-Google-Smtp-Source: ABdhPJzz01YvoSi4PPR5BwoM0bBMjlKy6eH1djia3EhbfFUNEL3x6UNs1esd5FIyXADwEmnurDzj/Q== X-Received: by 2002:a54:4791:: with SMTP id o17mr760484oic.114.1639713632522; Thu, 16 Dec 2021 20:00:32 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id h14sm1431249ots.22.2021.12.16.20.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 20:00:32 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Sean Anderson , Heinrich Schuchardt , Tom Rini , Mark Kettenis , =?UTF-8?q?Fran=C3=A7ois=20Ozog?= , Simon Glass , Jerry Van Baren Subject: [PATCH v8 32/32] fdt: Show a runtime warning based on devicetree source Date: Thu, 16 Dec 2021 20:59:39 -0700 Message-Id: <20211217035939.670884-32-sjg@chromium.org> X-Mailer: git-send-email 2.34.1.173.g76aa8bc2d0-goog In-Reply-To: <20211217035939.670884-1-sjg@chromium.org> References: <20211217035939.670884-1-sjg@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 When running, if the devicetree failed to come from the expected source, show a warning, e.g: U-Boot ... DRAM: 128 MiB Core: 42 devices, 11 uclasses, devicetree: separate Warning: Unexpected devicetree source (not from a prior stage) Warning: U-Boot may not function properly Flash: 64 MiB ... These warnings should only appear if the board config has been changed, or the prior stage is broken. Signed-off-by: Simon Glass --- Changes in v8: - Drop documentation patches - Drop the build-time warning, since people may ignore it common/board_r.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index 99adff14b39..6d520662dbb 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -598,6 +598,12 @@ static int dm_announce(void) if (CONFIG_IS_ENABLED(OF_REAL)) printf(", devicetree: %s", fdtdec_get_srcname()); printf("\n"); + if (IS_ENABLED(CONFIG_OF_HAS_PRIOR_STAGE) && + (gd->fdt_src == FDTSRC_SEPARATE || + gd->fdt_src == FDTSRC_EMBED)) { + printf("Warning: Unexpected devicetree source (not from a prior stage)"); + printf("Warning: U-Boot may not function properly\n"); + } } return 0; -- 2.34.1.173.g76aa8bc2d0-goog