From patchwork Tue Sep 25 19:06:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 1506371 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 1296DDFE80 for ; Tue, 25 Sep 2012 19:09:14 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TGaTU-0004pz-1P; Tue, 25 Sep 2012 19:07:16 +0000 Received: from avon.wwwdotorg.org ([2001:470:1f0f:bd7::2]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TGaT3-0004m1-2q for linux-arm-kernel@lists.infradead.org; Tue, 25 Sep 2012 19:06:49 +0000 Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id DE485644B; Tue, 25 Sep 2012 13:07:38 -0600 (MDT) Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id D4756E40F2; Tue, 25 Sep 2012 13:06:46 -0600 (MDT) From: Stephen Warren To: David Gibson , Jon Loeliger , Arnd Bergmann , Olof Johansson , Russell King , Grant Likely , Rob Herring Subject: [RFC PATCH 2/3] ARM: use cmd_dtc_cpp for compilation of *.dts-cpp to *.dtb Date: Tue, 25 Sep 2012 13:06:37 -0600 Message-Id: <1348599998-2729-3-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1348599998-2729-1-git-send-email-swarren@wwwdotorg.org> References: <1348599998-2729-1-git-send-email-swarren@wwwdotorg.org> X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.96.5 at avon.wwwdotorg.org X-Virus-Status: Clean X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: devicetree-discuss@lists.ozlabs.org, Stephen Warren , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Stephen Warren This allows DT source files to use the C pre-processor. A new file extension is introduced for this purpose, since use of the pre-processor must be optional; any property or node name that starts with "#" must be escaped to prevent the pre-processor attempting to interpret it as a directive. For this reason, skeleton.dtsi-cpp is introduced for *.dts-cpp to include. Signed-off-by: Stephen Warren --- arch/arm/boot/Makefile | 3 +++ arch/arm/boot/dts/skeleton.dtsi-cpp | 13 +++++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/skeleton.dtsi-cpp diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 3fdab01..c5d7fca 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile @@ -65,6 +65,9 @@ targets += $(dtb-y) $(obj)/%.dtb: $(src)/dts/%.dts FORCE $(call if_changed_dep,dtc) +$(obj)/%.dtb: $(src)/dts/%.dts-cpp FORCE + $(call if_changed_dep,dtc_cpp) + $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) clean-files := *.dtb diff --git a/arch/arm/boot/dts/skeleton.dtsi-cpp b/arch/arm/boot/dts/skeleton.dtsi-cpp new file mode 100644 index 0000000..8bf6729 --- /dev/null +++ b/arch/arm/boot/dts/skeleton.dtsi-cpp @@ -0,0 +1,13 @@ +/* + * Skeleton device tree; the bare minimum needed to boot; just include and + * add a compatible value. The bootloader will typically populate the memory + * node. + */ + +/ { + \#address-cells = <1>; + \#size-cells = <1>; + chosen { }; + aliases { }; + memory { device_type = "memory"; reg = <0 0>; }; +};