From patchwork Tue Aug 21 21:55:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 144781 Delivered-To: patch@linaro.org Received: by 2002:a2e:164a:0:0:0:0:0 with SMTP id 10-v6csp51194ljw; Tue, 21 Aug 2018 14:55:30 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwoOvNSELPGLIVZzBSfWuyTvK6p2+NjicHo6KAT+jJ9fokXp0spG6/4rp8Et15gm0MDnmY8 X-Received: by 2002:a63:ce12:: with SMTP id y18-v6mr49049635pgf.144.1534888530662; Tue, 21 Aug 2018 14:55:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534888530; cv=none; d=google.com; s=arc-20160816; b=nxa6IEnPsP5IV3F0TPSolP2Zw7rslXI4euuU+H5YJNwI51ZqR/O5j7L8AW+5zJ7HJs yTBs06O6uK7wR/um1uz6pj+Lq47odqj7fO7NnWIoq2NyxIU5g2jM+p+trnpynq28Sbbm proYsN8XOyrnHyXmnAvDTs+KwZppK+0aKdnW0uaT6U7+l8FYR7rvoyQTpKpFTKHwCnlW zeieM61tt/noIjzKQ6Lh6X7z4iXVsdlpfyKcDO+WeKMmgTRlZ3mvRB59ANO8JxjKXF+B lidTHKe8SUlrMtFO6Lo55b04Bfm4KFnfGb8Xc5o7hBCwDcXvMhD3hMDr3tm0JCmvv/dC mC+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=FWWpu/rZ73LHeaOx/3FicCXTVC+bW2dp+6ooQF6mKYw=; b=WOWOUROBSg0BTlijErocilBeMSTDCrz8CqQTWNL+ewQryWEY/vmQ+pofyIEo5WpcK5 oR/Ix7u/ATpkhT+VWQ3fw2seu+EyDUqdfEPbcUNlbZXciFDb73FWJaax6jf5nbifh6eH eP0GkS4aDbYAOKtPD1JmZ4lYN+V/MxPt9OXjw0GBJpz6epMV2SapTybIAxDk3PCUpzMI q2yZ8qtNOI1W1G+PgIC1qMyyNJ5Ys6Gg3XICNDFjNsZczyBm81MXbpycN6Km4RnpqlNO 2BBqEMOeZQNXcwMANAzWEH6hoO6aNjxnoxHyGLDCOCj0wZkHNPzCqPH/qE+WlmkgHcV1 hWhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9-v6si13015549pgk.384.2018.08.21.14.55.30; Tue, 21 Aug 2018 14:55:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727595AbeHVBRY (ORCPT + 6 others); Tue, 21 Aug 2018 21:17:24 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:37722 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726755AbeHVBRX (ORCPT ); Tue, 21 Aug 2018 21:17:23 -0400 Received: by mail-oi0-f68.google.com with SMTP id p84-v6so453681oic.4; Tue, 21 Aug 2018 14:55: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:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FWWpu/rZ73LHeaOx/3FicCXTVC+bW2dp+6ooQF6mKYw=; b=ZQeBinZqWuOfV/bAIV7lrxp5WhDUKD6oQVbpr7WDC2By8ryFtDJpX9KWeG7IcwZaux bvdPvDelvP/cIX1UL+PgY3P5iZi6Q14tIuwSxXgtcIzxGLq9v8qMQuendpoHKsq9s6Lu B+8mJcpw6n4MGOTxiM3lOYJsVIlHAeNL2+x7ByaqeebYuA7zWu4yQXUcaZRQymMQuOy1 SDBR//THPLTEy9Jwqwb6CGNYz+N3sjC1eK4rTAcHPjegJCYWd6pABR84nrEXy538kFMG HGoZhorGGIofPbVSy9fmN91Pf7YnyViJ94nW3PIW5HJCtmF841Ch0kg25Kkwj89gsbjw E8oQ== X-Gm-Message-State: APzg51BfpjYvWBPVj54mjFyMFKezUpCXT9XCdF0qlg+Sl8LI8OQIAgel CDYqZhbdzBPO2B0lFL/nGXIjvkQ= X-Received: by 2002:aca:2c83:: with SMTP id s125-v6mr1259570ois.103.1534888528339; Tue, 21 Aug 2018 14:55:28 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id x126-v6sm18785332oig.15.2018.08.21.14.55.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 14:55:27 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Frank Rowand , Ley Foon Tan , nios2-dev@lists.rocketboards.org Subject: [PATCH 2/8] nios2: build .dtb files in dts directory Date: Tue, 21 Aug 2018 16:55:18 -0500 Message-Id: <20180821215524.23040-3-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180821215524.23040-1-robh@kernel.org> References: <20180821215524.23040-1-robh@kernel.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Align nios2 with other architectures which build the dtb files in the same directory as the dts files. This is also in line with most other build targets which are located in the same directory as the source. This move will help enable the 'dtbs' target which builds all the dtbs regardless of kernel config. This transition could break some scripts if they expect dtb files in the old location. Cc: Ley Foon Tan Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Rob Herring --- arch/nios2/Makefile | 4 ++-- arch/nios2/boot/Makefile | 4 ---- arch/nios2/boot/dts/Makefile | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 arch/nios2/boot/dts/Makefile -- 2.17.1 diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile index 8673a79dca9c..50eece1c6adb 100644 --- a/arch/nios2/Makefile +++ b/arch/nios2/Makefile @@ -59,10 +59,10 @@ archclean: $(Q)$(MAKE) $(clean)=$(nios2-boot) %.dtb: | scripts - $(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@ + $(Q)$(MAKE) $(build)=$(nios2-boot)/dts $(nios2-boot)/dts/$@ dtbs: - $(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@ + $(Q)$(MAKE) $(build)=$(nios2-boot)/dts $(BOOT_TARGETS): vmlinux $(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@ diff --git a/arch/nios2/boot/Makefile b/arch/nios2/boot/Makefile index 2ba23a679732..007586094dde 100644 --- a/arch/nios2/boot/Makefile +++ b/arch/nios2/boot/Makefile @@ -47,10 +47,6 @@ obj-$(CONFIG_NIOS2_DTB_SOURCE_BOOL) += linked_dtb.o targets += $(dtb-y) -# Rule to build device tree blobs with make command -$(obj)/%.dtb: $(src)/dts/%.dts FORCE - $(call if_changed_dep,dtc) - $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y)) install: diff --git a/arch/nios2/boot/dts/Makefile b/arch/nios2/boot/dts/Makefile new file mode 100644 index 000000000000..f66554cd5c45 --- /dev/null +++ b/arch/nios2/boot/dts/Makefile @@ -0,0 +1 @@ +# SPDX-License-Identifier: GPL-2.0 From patchwork Tue Aug 21 21:55:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 144784 Delivered-To: patch@linaro.org Received: by 2002:a2e:164a:0:0:0:0:0 with SMTP id 10-v6csp51239ljw; Tue, 21 Aug 2018 14:55:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaRe3IO7Xiub37J0CfERTSfZSgyMqOekKtgW0J/ZGN/aq8vPMiDza7oyrGdXcx3WQZjOXDZ X-Received: by 2002:a62:2483:: with SMTP id k3-v6mr4000347pfk.195.1534888535662; Tue, 21 Aug 2018 14:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534888535; cv=none; d=google.com; s=arc-20160816; b=N/uE5F3x+jub8KW7dg+ZmPi252yZ+uXYCb7wx8HC8LIzqulGd47jhhr3U02tNvla9I mZFR/U6Vz+l37IETu/PAiMNnoXvpGC2nVnVMYDVWZ55bjnoR/NxMPYBKQIl+fI8VTHHk Vfm8M59wul+oD/2vgNLuVFV4t9jyedv26Qg+1XTX0XF6VfId0kCqf1v9AknKp4UBnr9Q TiM5RuVP0yKVsYU0DCpKTafLA77ASzFg6lkap9m702sllVDfjTXla9u34lksjvBSX5tj 7MDI13XA3fJR7QLt6XuySJgroAuNUT6AMVsD5L7UAEwiiG+i7u8Hr3gd+VOhv9j6cfY1 /eZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=pZCrU7sKSacy1VBSF9agKPmwdt5c58S7qyS84QVXni0=; b=cOsOX4jPFcM+DOtK6WtozulPYKM/vu0nRqThM4nyrfZfYEy+HWnDfOBptZH4bQxJA/ V5Jv93jWGcO/icpTp6hM/6rjJVY7sku1vUkkb8Hsm8RRB3/LOtHj7dHLA7KbOoGraLZx NXFof1CQSMRvbKuxdNcmth4M/EuLhzv9DOQQ7lD/pKkFngNIaym2ezyBWxG4tk/tf6gl mUw95F5PBYrJWHCo+Hz+UOdwPAwy9gRWtxBh4ikHNa5W+q2cpQnf+gQ7ajhciIJi6s4Q +QzYkwsoUl9IvpVQEM5RWXMIgElY/ZWIrYGG62KhEKsyQ/DeG9MRYwuorflLi45ZLGaY +tWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w133-v6si14605559pfd.313.2018.08.21.14.55.35; Tue, 21 Aug 2018 14:55:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727757AbeHVBR1 (ORCPT + 6 others); Tue, 21 Aug 2018 21:17:27 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:42130 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727027AbeHVBR1 (ORCPT ); Tue, 21 Aug 2018 21:17:27 -0400 Received: by mail-oi0-f65.google.com with SMTP id q204-v6so5570235oig.9; Tue, 21 Aug 2018 14:55:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pZCrU7sKSacy1VBSF9agKPmwdt5c58S7qyS84QVXni0=; b=kntbw4ZxtadYq9EYj+kQZibcR7jt/xlLddImiKTble3j3ysE/peDQX7O59SkPew1Tl /P9o8xwb8rKAb/gCOwXlQEhGHOQlOs/cSauDhG25SoR+pX/+Rw2pgFszx8dMOXKc9eqM LlicIqzXvdGomw2A327UetXf6VIvf+68Cm0vf5roPL0qh7XFfoDhyKZXW2TD60NqwOAd Om+wMkrhm2wQMCB7f5hJA4XwxL5X32MuG1HZTq+ZxAiI6YrUJfyIs6o4HvY4uul4SztM R8hdAQ1CkroKyEFTzgWUpac0IhAmCMkNWq5xZ0UE7N9s9wK52mFrG+zG/LgjvYSHeVK2 znHw== X-Gm-Message-State: APzg51BOy6rLvg2dSYvis2zEChmfTGTFhpySIzZyx16nAj/tq7VsfJRS 6ihHXmBgvXxlex9V1+hQ7BwTOS8= X-Received: by 2002:aca:c5d8:: with SMTP id v207-v6mr1251450oif.264.1534888531275; Tue, 21 Aug 2018 14:55:31 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id x126-v6sm18785332oig.15.2018.08.21.14.55.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 14:55:30 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Frank Rowand , Mark Salter , Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org Subject: [PATCH 5/8] c6x: use common built-in dtb support Date: Tue, 21 Aug 2018 16:55:21 -0500 Message-Id: <20180821215524.23040-6-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180821215524.23040-1-robh@kernel.org> References: <20180821215524.23040-1-robh@kernel.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Using the common build support for built-in dtb files just requires adding a .dtb.o target to obj-y. The dtb now needs to be copied when unflattened because an init section is used now. Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Rob Herring --- I couldn't find a built cross-compiler for c6x, so this had no testing. arch/c6x/boot/dts/Makefile | 11 +---------- arch/c6x/boot/dts/linked_dtb.S | 2 -- arch/c6x/include/asm/sections.h | 1 - arch/c6x/kernel/setup.c | 4 ++-- arch/c6x/kernel/vmlinux.lds.S | 10 ---------- 5 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 arch/c6x/boot/dts/linked_dtb.S -- 2.17.1 diff --git a/arch/c6x/boot/dts/Makefile b/arch/c6x/boot/dts/Makefile index b212d278ebc4..fd937f781d16 100644 --- a/arch/c6x/boot/dts/Makefile +++ b/arch/c6x/boot/dts/Makefile @@ -6,14 +6,5 @@ DTC_FLAGS ?= -p 1024 ifneq ($(DTB),) -obj-y += linked_dtb.o +obj-y += $(DTB).dtb.o endif - -quiet_cmd_cp = CP $< $@$2 - cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false) - -# Generate builtin.dtb from $(DTB).dtb -$(obj)/builtin.dtb: $(obj)/$(DTB).dtb - $(call if_changed,cp) - -$(obj)/linked_dtb.o: $(obj)/builtin.dtb diff --git a/arch/c6x/boot/dts/linked_dtb.S b/arch/c6x/boot/dts/linked_dtb.S deleted file mode 100644 index cf347f1d16ce..000000000000 --- a/arch/c6x/boot/dts/linked_dtb.S +++ /dev/null @@ -1,2 +0,0 @@ -.section __fdt_blob,"a" -.incbin "arch/c6x/boot/dts/builtin.dtb" diff --git a/arch/c6x/include/asm/sections.h b/arch/c6x/include/asm/sections.h index d6c591ab5b7e..dc2f15eb3bde 100644 --- a/arch/c6x/include/asm/sections.h +++ b/arch/c6x/include/asm/sections.h @@ -8,6 +8,5 @@ extern char _vectors_start[]; extern char _vectors_end[]; extern char _data_lma[]; -extern char _fdt_start[], _fdt_end[]; #endif /* _ASM_C6X_SECTIONS_H */ diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c index 786e36e2f61d..509c5f086496 100644 --- a/arch/c6x/kernel/setup.c +++ b/arch/c6x/kernel/setup.c @@ -270,7 +270,7 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size) notrace void __init machine_init(unsigned long dt_ptr) { void *dtb = __va(dt_ptr); - void *fdt = _fdt_start; + void *fdt = __dtb_start; /* interrupts must be masked */ set_creg(IER, 2); @@ -363,7 +363,7 @@ void __init setup_arch(char **cmdline_p) memory_end >> PAGE_SHIFT); memblock_reserve(memory_start, bootmap_size); - unflatten_device_tree(); + unflatten_and_copy_device_tree(); c6x_cache_init(); diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S index 1fba5b421eee..584bab2bace6 100644 --- a/arch/c6x/kernel/vmlinux.lds.S +++ b/arch/c6x/kernel/vmlinux.lds.S @@ -90,16 +90,6 @@ SECTIONS *(.switch) } - . = ALIGN (8) ; - __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) - { - _fdt_start = . ; /* place for fdt blob */ - *(__fdt_blob) ; /* Any link-placed DTB */ - BYTE(0); /* section always has contents */ - . = _fdt_start + 0x4000; /* Pad up to 16kbyte */ - _fdt_end = . ; - } - _etext = .; /*