Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5741657iog; Thu, 23 Jun 2022 04:34:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uNZa6vPfePmLD3+FGrAObNdqYeHjkYw+ct6esY2NSTGWvbfvMAkVX+bJG6HxtEA6LzWjGx X-Received: by 2002:a05:6402:42c6:b0:435:dc4b:1bb2 with SMTP id i6-20020a05640242c600b00435dc4b1bb2mr931428edc.355.1655984054426; Thu, 23 Jun 2022 04:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655984054; cv=none; d=google.com; s=arc-20160816; b=YWkBZ1HUR1CzFhVrTJp5B2LrKyOM0UMQl4s+niD+JlIkufbIiJVvHeamouoeNRk5yO fDcwwsPK8O1Em0b7Z1T0C6TssB8ln3WLDX/zbFKAqtF9BRubu3A0u32FbFnhoz7F/Ttv UVhgFv4P+IuY1TsKHJ19papyaccNbD/QS3mgczPVv2IVVJYMPkYKoI8j9irQQIEP0A8T BG3M24PJLgubMfyEOlwQpFt3kgDcl1OG/WeRTV7C73anteJO7Ufp20LqxAdpxKi4CuoC NIJ4WGj8o0ModeLW+R//lvZ0vW29FTzxU6Tr3anKFx4EOAEN521n58gNPCW3+5MuTUHk DQLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=U7RfSrcQuRamOWWjJI1BD1X5IJAeB9zPMHMT1huumAE=; b=DgOsbwL+SOy3bvvWg3DAJegm15a8IpgpgWPLiA7JAcQA55C12dk+bUpQuT/NUlcxFE AVVh45PIG4bQxxInvS2Ec/wLYOpH7aAnU8MEVCC64gQBKZUIm/Gk1kVZW4+BBLTBNEqT V67tLH5G9vfQHJRmES2MNgFxN1Jr/ic4Gq/VcIJs+wzq5X5oyp+Saf2NkIFDPmGFMZyh 7AeDL7o2g719x1WlPCE/wMvEOzjRfF1azwdnAaOMSp73Adm/nh3hC++/Qd3WcDyEgg6C Ivq5PNJ6gkCimv1MoAbFEIbX7nw77DiN6srm5gSS3OL2RuDzd2/RElaROMbzvLw1l4i1 upXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=daIUvP2f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb12-20020a170907160c00b0071256de3c6bsi263131ejc.299.2022.06.23.04.33.48; Thu, 23 Jun 2022 04:34:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=daIUvP2f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231440AbiFWKwK (ORCPT + 99 others); Thu, 23 Jun 2022 06:52:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231469AbiFWKwC (ORCPT ); Thu, 23 Jun 2022 06:52:02 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 165474B428; Thu, 23 Jun 2022 03:51:58 -0700 (PDT) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id A0F02E0017; Thu, 23 Jun 2022 10:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1655981516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U7RfSrcQuRamOWWjJI1BD1X5IJAeB9zPMHMT1huumAE=; b=daIUvP2fgkDg44Q7KttVzCGnVY2CC5+apqLBGn+WAZtC2QHkWgqJwJB7oP0289V0HCA88R FaUHdxpzCoZRUIlqI64KAvvP0uKfZoBLEqOPnYSnYPIR/sHoJN8EWXd0liboXaDV2d4551 Uc+/zyVedUxNk4ojob4Bv4mbw/OhTXDoQKB8RXumMUDXpsRh+qO0m5gh8JLONluvsNNEkD LhagOIc0fZiAWOuKYGQZe7PJioJ6R6hwJmHOHr97hF/DshqSQAirFpNht4Hof8eKK/SQWN esItSdNHPVo1YGvTenMJAHdZbqOGW4xAT2DVisuJBdmozNmHN9odNF95borl1A== From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: Rob Herring , Frank Rowand Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Lizhi Hou , Allan Nielsen , Horatiu Vultur , Steen Hegelund , Thomas Petazzoni Subject: [PATCH v1 0/2] of: populate of_root node if not set Date: Thu, 23 Jun 2022 12:50:42 +0200 Message-Id: <20220623105044.152832-1-clement.leger@bootlin.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to apply overlays or create new nodes under the root node, the kernel expects of_root to be set. On some system were a device-tree us not provided by firmware (x86 for instance) if CONFIG_OF is enabled, then we will end up with a null of_root. This series add support to create this root node using a builtin dtb and remove the manual creation of the root node done in unittests.c. Clément Léger (2): of: base: populate of_root node if not set of: unittest: remove check for of_root drivers/of/Makefile | 2 +- drivers/of/base.c | 18 ++++++++++++++++-- drivers/of/empty_root.dts | 6 ++++++ drivers/of/unittest.c | 10 ---------- 4 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 drivers/of/empty_root.dts -- 2.36.1