From patchwork Mon Oct 1 18:22:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 977381 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42P9wR1YP6z9s3l for ; Tue, 2 Oct 2018 04:36:22 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9900EC21F3B; Mon, 1 Oct 2018 18:28:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5469DC21FD5; Mon, 1 Oct 2018 18:23:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E4FC5C21FE1; Mon, 1 Oct 2018 18:23:37 +0000 (UTC) Received: from mail-qk1-f201.google.com (mail-qk1-f201.google.com [209.85.222.201]) by lists.denx.de (Postfix) with ESMTPS id 2A764C21FA4 for ; Mon, 1 Oct 2018 18:23:28 +0000 (UTC) Received: by mail-qk1-f201.google.com with SMTP id c22-v6so15093483qkb.18 for ; Mon, 01 Oct 2018 11:23:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=58LjlV0zABjJQjazu6wll/OqqQrx4DWcEhe2PxY1CqY=; b=IbDgIaJR/uOC5G75oaEVYCau3p2aSMeC6V6eWTqs8dojkGCrBFYLSlTXeRm1tP2ipr kQwb/rx3hLYqURrzQ/9ih2+giFP0ohgoA436rqvg8aXtBumStK9RPD4AAObV3jvgML0Y f/LdlLJCrybPPfu4P+hRmvxW+5+DNhIe4PdvUtmog5Am4UpGXLj52Ngp8LJ2JJaHQp2P 6Th9V55fvnuJqoU7+Q66mFMc4uKku6jHd7QEnonc7Y3PyjILllDk1FdG1DaulbugNCBS IaX6XZZaH/dqQi4N/fHIsPpJIdMaf/MgLlE8aTaveCUkI7pkRPkkN6UKXIIORD1JP+o2 Z/HQ== X-Gm-Message-State: ABuFfojTa9qbpbP0l7RnjCd483GC9uES573bmLjV6PnHXZ06MJQJ+wm5 q2Y/tT1i8SNUaDmB0iRSSEbrTWs= X-Google-Smtp-Source: ACcGV62qx0PJQXNrWT2CpULc5clIss79eF2h9Dxa5++OVp8NAabeugUH1SKAstoY07PuHMSSn+zsEmI= X-Received: by 2002:a0c:9371:: with SMTP id e46-v6mr9493090qve.14.1538418207368; Mon, 01 Oct 2018 11:23:27 -0700 (PDT) Date: Mon, 1 Oct 2018 12:22:18 -0600 In-Reply-To: <20181001182249.129565-1-sjg@chromium.org> Message-Id: <20181001182249.129565-15-sjg@chromium.org> Mime-Version: 1.0 References: <20181001182249.129565-1-sjg@chromium.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog From: Simon Glass To: U-Boot Mailing List Cc: Jerry Van Baren Subject: [U-Boot] [PATCH 14/45] fdt: Allow indicating a node is for U-Boot proper only X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" At present it is not possible to specify that a node should be used before relocation (in U-Boot proper) without it also ending up in SPL and TPL device trees. Add a new "u-boot,dm-pre-proper" boolean property for this. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- doc/driver-model/README.txt | 4 +++- drivers/core/ofnode.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt index 6085f927dea..36541630a27 100644 --- a/doc/driver-model/README.txt +++ b/doc/driver-model/README.txt @@ -837,7 +837,9 @@ well, if device tree is enabled there. It is possible to limit this to specific relocation steps, by using the more specialized 'u-boot,dm-spl' and 'u-boot,dm-tpl' flags -in the devicetree. +in the device tree node. For U-Boot proper you can use 'u-boot,dm-pre-proper' +which means that it will be processed (and a driver bound) in U-Boot proper +prior to relocation, but will not be available in SPL or TPL. Then post relocation we throw that away and re-init driver model again. For drivers which require some sort of continuity between pre- and diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 1e354803b06..825ffc27496 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -695,6 +695,8 @@ bool ofnode_pre_reloc(ofnode node) { if (ofnode_read_bool(node, "u-boot,dm-pre-reloc")) return true; + if (ofnode_read_bool(node, "u-boot,dm-pre-proper")) + return true; #ifdef CONFIG_TPL_BUILD if (ofnode_read_bool(node, "u-boot,dm-tpl"))