From patchwork Thu Feb 22 09:36:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 774848 Delivered-To: patch@linaro.org Received: by 2002:a5d:6ac2:0:b0:33b:4db1:f5b3 with SMTP id u2csp715508wrw; Thu, 22 Feb 2024 03:29:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWLcqLgkiaqJ8h9YrWdNf5aaqRjFtxBumJFnwWKzsJgRmJD0UhuWg0uRwDtjZy0CfJYAJoLnnwmgex7nv7xaO0Y X-Google-Smtp-Source: AGHT+IEt/uf365ZvvCBfYGQC8pXWnOk7emWtuYNLaiY7htddseOckozUxHT8I5cfaf0x3dSwWwMZ X-Received: by 2002:a19:2d44:0:b0:512:d8b0:2630 with SMTP id t4-20020a192d44000000b00512d8b02630mr1831601lft.39.1708601371310; Thu, 22 Feb 2024 03:29:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708601371; cv=none; d=google.com; s=arc-20160816; b=ZwiQqsDs/nIbKLSe8j5gCPvbuAFOWaLKnRWkx9IwQxDs2N8rZQ1AsG+hedfJIu3CNS D6tcNc6tKf6qnrL+ahBOIApNOIjkUn4AwgDFy2bO83vA3cVhfg/UY1+e2zrHEkjoVpAu wftoXD/ZcIHZ+OY+U+wDha27svROBnJPnnigoq902NR/g8TG82Jw6os45PvvQPiFVIMJ iPROsXd4Eh/x1F2hHa3Xeg/9+8KNfMdqRZCRyhPMiwE+aNNDyLJ8gJPziVcnInwjNtPp /Rsbcz3MrpJR2L3Om2juK4KnAqgjzF/wSEZIWAvD0XII49t46xVfDdGGsSEeDvBwDfpH A+Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=14AzahfzBnDkKxuiQC/TmfvLbJfEMKHj6tMXkEc2j6g=; fh=Yy8GFNbqEhl9MerJz1LfYQ39XksX1Ui9qbEvUBg6hMU=; b=H+GaC4jbAm7K9pfgkcnu564BbMw5bdWD1Bo0Kt/SvuWfvXSrWMee1kTTlxIUAhoYZh VdeTaZFOWlQyWOGn7k/ePnjkltfBKJq154HvsxTRGeILL6Ff3lsvCu4j+NqBCd1yF5JV RgcN1MKcFOGpib8Y4HtFNPCleQA9ytk9Bhu0gVyUsNZ+JKb1tseWLO6vlOxZvvreEV/U kXdrpBd0YlHYUYxWwsBe7uoq5aOeyMeiJZvUndhzmCSBGUw9o9Yma+1VHJCCN9t91zOv TV7azXg5O1b46q1rWCTdYdNNxsBWHg6vVibxIakT8FGjVacYnewPDHOcEKi6/RgQel6g Y6Jg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PttuxfBA; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 27-20020a50875b000000b00564a94db4c2si2891877edv.564.2024.02.22.03.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:29:31 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PttuxfBA; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CE7E6880C0; Thu, 22 Feb 2024 12:26:22 +0100 (CET) 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="PttuxfBA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 582C087E6F; Thu, 22 Feb 2024 10:37:13 +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=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_SBL_CSS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) (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 30AE788087 for ; Thu, 22 Feb 2024 10:37:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sumit.garg@linaro.org Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-59fe5b77c0cso822713eaf.0 for ; Thu, 22 Feb 2024 01:37:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708594622; x=1709199422; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=14AzahfzBnDkKxuiQC/TmfvLbJfEMKHj6tMXkEc2j6g=; b=PttuxfBAySpuDM7bocQcjJv3iW6pQR3D4gaaFAry7w5SyNG/gv2U2owMEwaGLij6C6 OGdYNMR0Ya5qZL9HQv6MtylGCl1nGTsjVBTQRvgZFgLuPPao1twSD1V700bpsB38yyi6 08kW7bRa6yz9i82vi9u7KgZ3SMROWVqwKytkSGrmtSrb2xcFxu2buwFBSWpwzt7d6Vmu pg6h7fZnbtmYP28rDaqcxT/XMqTGTYWCqydiFVZFsccpuhEkunIqlvYwcBhw934HMy+E raER/+2Ub6JDDjhoKSl5e8pazX8O8QlFQN9H+uWRT38oGszRCgV2RaFMixJjtNwZZcl7 e+Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708594622; x=1709199422; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=14AzahfzBnDkKxuiQC/TmfvLbJfEMKHj6tMXkEc2j6g=; b=wXvBPoLQYnw0Cjkdk0jwhPZs6LWvK76vsSgUmrrLUpxn210i+CcHDMVXMbNLO7io/N nmk+tp371rUIwirZ3DzlbgIqbgaSJz/2/2GMDJzWf+MgE3ScMx7wnh76VM2tvZCfhs/m NdP+fj6uPPIXujfy+u9nKold55fRr/hMmDGhjrgsYNAxhTBSJEEaFbpj3DuWp7sriKWk M/Xkmr+fSOYSr52XZbPHZUoU2R3VS/ukXHsQFQ82jEHC0Op665l6Gj7LHCFinbuRi56g DQrokeE2Hv+fIz+kUQ7UyLbDVoupUyv9WfzhoUWnCoy4TtFNXrkFp8LWxavesXyxZ5OE 86Mw== X-Gm-Message-State: AOJu0Ywmo/eWt68VGypNmQmLdUEO0ImLV59W6kDSU+0GzUdAPKslTz5V Q8vJuA5/bYKWkHnjHRwNUkab0HYmaLZ7CCR09dMeF6YMl0aeIwhoqLPWx/ZNcnH4z8CyKej4SaU a X-Received: by 2002:a05:6359:412a:b0:17b:5a19:5366 with SMTP id kh42-20020a056359412a00b0017b5a195366mr5219350rwc.4.1708594622323; Thu, 22 Feb 2024 01:37:02 -0800 (PST) Received: from sumit-X1.. ([223.178.212.115]) by smtp.gmail.com with ESMTPSA id u20-20020a056a00099400b006e47300e4edsm6208404pfg.183.2024.02.22.01.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 01:37:01 -0800 (PST) From: Sumit Garg To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, u-boot-custodians@lists.denx.de Cc: trini@konsulko.com, sjg@chromium.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor@kernel.org, neil.armstrong@linaro.org, caleb.connolly@linaro.org, ff@shokubai.tech, daniel.thompson@linaro.org, dgilmore@fedoraproject.org, pbrobinson@gmail.com, ilias.apalodimas@linaro.org, b.galvani@gmail.com, xypron.glpk@gmx.de, michal.simek@amd.com, seanga2@gmail.com, rasmus.villemoes@prevas.dk, peng.fan@nxp.com, jh80.chung@samsung.com, rfried.dev@gmail.com, marex@denx.de, mibodhi@gmail.com, bb@ti.com, mark.kettenis@xs4all.nl, festevam@gmail.com, nm@ti.com, andre.przywara@arm.com, ijc@hellion.org.uk, paul.barker.ct@bp.renesas.com, Sumit Garg Subject: [PATCH v6 04/11] Makefile: Allow upstream DT subtree to provide DT includes Date: Thu, 22 Feb 2024 15:06:00 +0530 Message-Id: <20240222093607.3085545-5-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222093607.3085545-1-sumit.garg@linaro.org> References: <20240222093607.3085545-1-sumit.garg@linaro.org> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 22 Feb 2024 12:24:08 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Allow platforms to reuse DT headers and dtsi includes directly form upstream DT subtree which will be frequently synced with Linux kernel. This will further allow us to drop corresponding DT includes copy from U-Boot tree. Also, since the DT includes from upstream DT subtree are done after DT includes from U-Boot tree, so it shouldn't cause any conflicts. Tested-by: Bryan Brattlof Signed-off-by: Sumit Garg --- Changes in v6: - None Changes in v5: - None Changes in v4: - New patch to reuse upstream DT includes by U-Boot as per Brian's use-case for TI K3 SoCs. Makefile | 3 ++- scripts/Makefile.lib | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9604a4c517e5..0f0c7f30d271 100644 --- a/Makefile +++ b/Makefile @@ -835,7 +835,8 @@ UBOOTINCLUDE := \ -I$(srctree)/arch/arm/thumb1/include), \ -I$(srctree)/arch/arm/thumb1/include)) \ -I$(srctree)/arch/$(ARCH)/include \ - -include $(srctree)/include/linux/kconfig.h + -include $(srctree)/include/linux/kconfig.h \ + -I$(srctree)/dts/upstream/include NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 9e38d75443c9..12857316c582 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -189,12 +189,17 @@ dtsi_include_list = $(strip $(u_boot_dtsi_options_debug) \ dtsi_include_list += $(CONFIG_DEVICE_TREE_INCLUDES) # Modified for U-Boot +upstream_dtsi_include = $(addprefix -I, $(srctree)/dts/upstream/src/ \ + $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/$(ARCH)/*/*))) \ + $(if (CONFIG_ARM64), \ + $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/arm64/*/*))))) dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ $(UBOOTINCLUDE) \ -I$(dir $<) \ -I$(u_boot_dtsi_loc) \ -I$(srctree)/arch/$(ARCH)/dts/include \ -I$(srctree)/include \ + $(upstream_dtsi_include) \ -D__ASSEMBLY__ \ -undef -D__DTS__