From patchwork Mon Oct 1 15:25:27 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: 147913 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4044355lji; Mon, 1 Oct 2018 08:25:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV61jmRnwP7twGpn9arHb7837g9cVL3ghnJQMw43ijdfQLDoyOhz2+D49Y/xxeI1HA1gKyGY+ X-Received: by 2002:a65:5cc3:: with SMTP id b3-v6mr10940049pgt.277.1538407545211; Mon, 01 Oct 2018 08:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538407545; cv=none; d=google.com; s=arc-20160816; b=oPsX7SEMlwfq3LMlhDtwxcEAisZZ4KCVvhpMznFRr1aQDGK9I4etRAOvK3cBBIuyiB DADfR9tIZZfuMelrwZsj7GdyFAytzKpwDKGbFy2pgdTlcZCiN2tOay1JGH8SvHsDo+Vt G+tifcFP5ARh5s0uNasMEIqXVYdLc6/p7bX8IU/VngDjzXXy+hAzs5gP3rzhosArQ7Ac /LZOnshh/5Mxe7sxBjmkrxFXgW/vEXlWy1FKC4wwLmrCsVsVw7YQIn/jHXqIqtEC0qje PlpygmuUqBHnWWbizGXnfkfIL9/CYxKC8wjzqvLE2YiioCFiG2eOgZABVr7SeVCUGS0t OXoA== 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; bh=OFEEaVtg96Vzr+wRENqq56ej9KS7VctFB/C9wMh58yU=; b=RJNgxF4VdOX98PLfIa107bU3tzELiX9IlcGU9/CZQINHaToW3ya51nw0r5HugMVQty H2gvdIm1Mlq7reblnL97eAmWyixoYtWn1hADqHrPCihshWJxOPSuUHTZdthxg7cLlWQ2 PrOckN4LBFmshExPjDNui1r5Zq5M9BaRQkKYNYnwA8qxwz6H0j1tbMnrHos+5Mq6qEFr 0zbGxmMRFCrfJiMA9LTqTfD9+FlSXb+GQRmA9WcfTZTisIVFm/AZxgYvnw7LkPT1bgKd UM5DZt0IbBJIOW7oKgLoh4PAJpzvMs280jNpp/XKlnNXpWLRMWVpjed8o8UGR0heEoTT 4lHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 q19-v6si12988432pll.72.2018.10.01.08.25.44; Mon, 01 Oct 2018 08:25:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1729671AbeJAWEA (ORCPT + 32 others); Mon, 1 Oct 2018 18:04:00 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:39919 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729516AbeJAWD7 (ORCPT ); Mon, 1 Oct 2018 18:03:59 -0400 Received: by mail-oi1-f195.google.com with SMTP id y81-v6so11515792oia.6; Mon, 01 Oct 2018 08:25:40 -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=OFEEaVtg96Vzr+wRENqq56ej9KS7VctFB/C9wMh58yU=; b=aLWJhe9Wmj3hHW7/eECJnguh7okdtftxHJ8WAtnrm5P9VGe59agbK1ZjFJ59uACwXz tENDLCNiHFblT6O7lOca5b5Ox49JuLcVImebWLfiSCObPVl6X4RqbfFDvd2zNmwqkshi 8LtR3419t9ogveLvGovKyiH6t31A3dC9yAtPuE2JNpITliiDFDXS9crbtsQwDt59D7x1 1uh3G/qizsC1C7D6sNg9HNHQc46Q6jqhASDDgKakhpf44G1cIONnBnA2qEd5P+vlms8k P+BFo8bzOJj0Lw0Bu8hCXQ3Vr81j9sh1/fH7wBVVpO7bxmm19UpyNr7Cor1wWhVpCPyb hwQQ== X-Gm-Message-State: ABuFfoglrHA6CNOzKRdRFVO8uOKd62Ka8e/HtgXusowFdu7JoHBR/ETt zDNGFU6NCKuLEme9jr9CaDGYBy5K+Q== X-Received: by 2002:aca:5c05:: with SMTP id q5-v6mr2718814oib.208.1538407540039; Mon, 01 Oct 2018 08:25:40 -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 s203-v6sm2047035oif.33.2018.10.01.08.25.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 08:25:39 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Frank Rowand Cc: Mark Salter , Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org Subject: [PATCH v4 5/9] c6x: use common built-in dtb support Date: Mon, 1 Oct 2018 10:25:27 -0500 Message-Id: <20181001152531.3385-6-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001152531.3385-1-robh@kernel.org> References: <20181001152531.3385-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- 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 = .; /*