From patchwork Wed Jan 10 10:35:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 761436 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp1807671wrz; Wed, 10 Jan 2024 02:37:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IGO77+de0mipB838uPG8NK/wh4mgkqLi3Ztp/jlpqzXDxcd4/9B4ki6r2BtG+dQVD7f56ZJ X-Received: by 2002:a05:600c:1d95:b0:40e:4084:b948 with SMTP id p21-20020a05600c1d9500b0040e4084b948mr426342wms.94.1704883021845; Wed, 10 Jan 2024 02:37:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704883021; cv=none; d=google.com; s=arc-20160816; b=jX66KOJDmiE0BYC6dZG988P9YtL+1AkUN7nfqnhZ4EemmpiZdBPqCYmqdjPlA25XkS 222xaqtNGrFl9Qj20YIoeVQgJO9cAv7gB3zG2T4pWp/Xl2zPDCsWVBnHRsdd8IDr85kV zTxQQTNzR+PmcXs4FLgql49SkzOP7Jj3VCGrVsCgGB53DhREeOmZpeoJlcczxYGK6XPp b4aXJhofadzJjsVj9QjYl9PGiecs/Gpxl6xk3mMFRntI8HzAgHJGvb6MyyxUhHcq6gf7 A6HbdKkC4rQlc/mCpgvDWPcpup2gcKP0Xc/Lb4gsk+TngjpXoI2W/z96ovsz82z2ySfq nssA== 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=5jjrQStR8mg01rea7SGpxXhx6+KLoAYg0dAdhNzxz5w=; fh=g5mGBYdwcRCvgzx1fsOtMayuItbAc+o2ocuRoBH1vWU=; b=Ty+tOI0JYJbKORTIrAFKgQaSrA3JiDRUnNtW/y5pfn0rzpHjz/6moilBsn7x9Kev13 HeBGq9joMGqt1c39J6j6qYyDPWADjrxhHizL1OInkHJkmSHncgaVmwx0ihWQ2P56TfmE 2bh5Vq2Zisa70sMuSgiY6N6yrGBI0R5IhDRjPxyF9hcHNpaKJltoDs3y+zssudnKhAYb /6V4vd9OqWEfyOOySp/Te00dGdJx3D8ktw3+zmkabpgwehu+3zX/72b7H4QV22+dANGw bNItUvwcIrJfgaxg93Wx1HvJmwETd0JBSU/ES+ByqRmWynx4rIaiqyRbW+wRzFoFJuy+ 8ibw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=STtAJNGb; 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 n12-20020a7bc5cc000000b0040e424a126csi559900wmk.26.2024.01.10.02.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:37:01 -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=STtAJNGb; 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 C6A7F87ABA; Wed, 10 Jan 2024 11:36:47 +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="STtAJNGb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 37D7787A7F; Wed, 10 Jan 2024 11:36:46 +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-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 9A0F187AD5 for ; Wed, 10 Jan 2024 11:36:42 +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-pf1-x432.google.com with SMTP id d2e1a72fcca58-6d9cb95ddd1so1751819b3a.1 for ; Wed, 10 Jan 2024 02:36:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704883000; x=1705487800; 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=5jjrQStR8mg01rea7SGpxXhx6+KLoAYg0dAdhNzxz5w=; b=STtAJNGbzkPG6dvBd8bG0jLVDKkFwODzB0Y0qxwcQjeveytbNy8WMYrlke4pVvdH1i zT23NJuXhvuMQjWMFdnU365QQSJhH+qAp1s7uDMSITx8/SQP7yhzaDUL4X9FxFq8bieR /ZJzfCYZgvovJJpNoqZhMoaduNyjfdOiWpQcEQ+htmx/Xu4Dj31fj0ohQAFtBkw+je22 DcY25Wgn3AZOqnrrOr29jYTJBKAq9JiOH/GVTajUFBF7HsacUuRZYM10S8THb9iMETLa qNnKM42wLOr3mrO06wqhhpbv6poIzlzRg/iX2qBBCicAbY3CnF3feStTseXUGNpqmaU6 tp2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704883000; x=1705487800; 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=5jjrQStR8mg01rea7SGpxXhx6+KLoAYg0dAdhNzxz5w=; b=LqK/ytJXWN0nHlKZcU0AWJf4tKnYd4DNsqxKQcp2wDmN+0xuZPyAuLGMGYIGmJAlLG 87kHyOSst5xmqSc3pAo7sTJ82sefyDZrxS+4QJcqIcuGXMi3SmB7i35Rs7vMOCMn5pPh zdPDzM42GdC2ARkhTIA2zQIqcI+xGGGS81VlVTd6d7+XvfYURR7t8OHf5hrh9btW+kqY sEgiuh01tpO+0KOOzdgT0iv4yskI7HlFBVXtz8Fv7KDE0gthGTDXSNEJZyw79zdsTod4 Ny3fVXVDfiWrvo77GVE9479It5rbVgQFotTFyWpJ04X9Xzbyhg7Q+vB47qDDFaiFOlCw OPFw== X-Gm-Message-State: AOJu0YyljVPz1/2as2MiDr3C7triSd6mNkwHS5nESNS5DRheoVCxgB46 GgIV3ys6qBpBvimHVEG3Mh4zg+qGKODY3kQkdbwcFDhWWcM= X-Received: by 2002:a17:902:7841:b0:1d4:ebbc:227f with SMTP id e1-20020a170902784100b001d4ebbc227fmr438033pln.134.1704883000645; Wed, 10 Jan 2024 02:36:40 -0800 (PST) Received: from sumit-X1.. ([223.178.208.66]) by smtp.gmail.com with ESMTPSA id i7-20020a17090332c700b001d38a7e6a30sm3332604plr.70.2024.01.10.02.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 02:36:40 -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, maxim.uvarov@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, Sumit Garg Subject: [PATCH v4 04/11] Makefile: Allow upstream DT subtree to provide DT includes Date: Wed, 10 Jan 2024 16:05:40 +0530 Message-Id: <20240110103547.719757-5-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240110103547.719757-1-sumit.garg@linaro.org> References: <20240110103547.719757-1-sumit.garg@linaro.org> MIME-Version: 1.0 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 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 69cffb16ee2..d4e65ffe49f 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 fe2a0aadc41..fbcaf335f9a 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__