From patchwork Tue Jan 12 19:05:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 566695 X-Patchwork-Delegate: daniel.schwierzeck@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id D6259140556 for ; Wed, 13 Jan 2016 06:06:14 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=WhvzhK71; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AD8264C000; Tue, 12 Jan 2016 20:06:10 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xVCJeuNA6ElB; Tue, 12 Jan 2016 20:06:10 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 93B204BFEE; Tue, 12 Jan 2016 20:06:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3E1F54BFED for ; Tue, 12 Jan 2016 20:06:05 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DNDMVTjVgKRK for ; Tue, 12 Jan 2016 20:06:05 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by theia.denx.de (Postfix) with ESMTPS id 063CE4BFEC for ; Tue, 12 Jan 2016 20:06:02 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id f206so32919689wmf.2 for ; Tue, 12 Jan 2016 11:06:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gTfqL1nNFP1KXGOG6MIzxWP5RNauv4fbTBgMC4vyK9E=; b=WhvzhK71vU2oymrnH504touWTldRyDaG7K6YSEzopWvWU4Ncl5slRN/89tY6XrhSVy Z0UANHe/6a2SAV6trMoMREPp+7CMvCv7qTq8taVFzchuF8zfKjErfVVs3IKcckBRv9w/ qhlOUq6v+907H0lgU+yRzxuJBCgBgUdVKXzH9ta9WQBBcMPmKixM9hl1cm6qWzaGwEmV nUo1FZoRAk1H6VdtUfb032mUcaR6dwU3Ub3RTR6YJu/CihU9T5EofxsMgH7e/VQCu86f C1maDg7iIshiAHJAVOU31dFagEMyGnydDFdTYeEkM2aqpWjzG0knDV+6+8SuR4CGm8rf wslA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gTfqL1nNFP1KXGOG6MIzxWP5RNauv4fbTBgMC4vyK9E=; b=RziNPcUzZ/kwE1dipRDK4zxtkWdMbhNYFSieZx4VRnNlFzPNhxSPWA6bPItI/ss3Ot IQZTe/K1eRv0boiH6ZNRlcmbh1Dd8MNkqV5T1GMddOd2qm/h1qq6KRU/XgzEb1QVe4rJ SyuRcJz8qRUDCIDCkXCqYrAlpTL1tvo1lDPd+djeVsyE+yhHNn7smssUPZ9p4U9DFZKx BHOU4pmzSW14iEeZGieM9ohDMnE425Kc5bUJ3YoKq+mhyODWkVW4wS/J/Vc6Kexztg0p cG9xa9dCmOOuD7CIb6Ap/uKoGi5614bF+m9xkzAFHOvXItYFU66kMRtahm77GY36nzus WTgQ== X-Gm-Message-State: ALoCoQlIiCyHSD3Eq/Ah8rl1xrL3Ckw9NnT62sXrAnFO2ZXV8Tybw2Sx0JVZv+hIzVlv4zka6EzR0qCve74uE2GgmnWi9BIewQ== X-Received: by 10.28.109.87 with SMTP id i84mr20129204wmc.51.1452625561870; Tue, 12 Jan 2016 11:06:01 -0800 (PST) Received: from workstation.zombienet.local (p4FCC82A2.dip0.t-ipconnect.de. [79.204.130.162]) by smtp.gmail.com with ESMTPSA id ha9sm29392022wjc.3.2016.01.12.11.06.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jan 2016 11:06:00 -0800 (PST) From: Daniel Schwierzeck To: u-boot@lists.denx.de Date: Tue, 12 Jan 2016 20:05:57 +0100 Message-Id: <1452625557-20205-1-git-send-email-daniel.schwierzeck@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452530900-22860-1-git-send-email-daniel.schwierzeck@gmail.com> References: <1452530900-22860-1-git-send-email-daniel.schwierzeck@gmail.com> Cc: Purna Chandra Mandal Subject: [U-Boot] [PATCH v4] MIPS: add initial infrastructure for device-tree files X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Prepare sub-folder for device-tree files. Make support for device-tree on MIPS available in Kbuild/Kconfig. Signed-off-by: Daniel Schwierzeck Signed-off-by: Purna Chandra Mandal --- Changes in v4: - add directory arch/mips/dts/include/ - add symlink arch/mips/dts/include/dt-bindings/ Changes in v3: - keep section .dtb.init.rodata during link in case of CONFIG_OF_EMBED, .dtb only does not work Changes in v2: - add arch/mips/dts to clean list in dts/Makefile - keep section .dtb during link in case of CONFIG_OF_EMBED arch/Kconfig | 1 + arch/mips/config.mk | 1 + arch/mips/dts/.gitignore | 1 + arch/mips/dts/Makefile | 16 ++++++++++++++++ arch/mips/dts/include/dt-bindings | 1 + arch/mips/dts/skeleton.dtsi | 23 +++++++++++++++++++++++ dts/Makefile | 2 +- 7 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 arch/mips/dts/.gitignore create mode 100644 arch/mips/dts/Makefile create mode 120000 arch/mips/dts/include/dt-bindings create mode 100644 arch/mips/dts/skeleton.dtsi diff --git a/arch/Kconfig b/arch/Kconfig index 1709d40..ec12013 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -55,6 +55,7 @@ config MIPS select HAVE_PRIVATE_LIBGCC select HAVE_GENERIC_BOARD select SYS_GENERIC_BOARD + select SUPPORT_OF_CONTROL config NDS32 bool "NDS32 architecture" diff --git a/arch/mips/config.mk b/arch/mips/config.mk index 415ec8a..b78d495 100644 --- a/arch/mips/config.mk +++ b/arch/mips/config.mk @@ -72,6 +72,7 @@ PF_ABICALLS := -mabicalls PF_PIC := -fpic PF_PIE := -pie PF_OBJCOPY := -j .got -j .u_boot_list -j .rel.dyn -j .padding +PF_OBJCOPY += -j .dtb.init.rodata endif PLATFORM_CPPFLAGS += -G 0 $(PF_ABICALLS) $(PF_PIC) diff --git a/arch/mips/dts/.gitignore b/arch/mips/dts/.gitignore new file mode 100644 index 0000000..b60ed20 --- /dev/null +++ b/arch/mips/dts/.gitignore @@ -0,0 +1 @@ +*.dtb diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile new file mode 100644 index 0000000..47b6eb5 --- /dev/null +++ b/arch/mips/dts/Makefile @@ -0,0 +1,16 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +dtb-y += + +targets += $(dtb-y) + +# Add any required device tree compiler flags here +DTC_FLAGS += + +PHONY += dtbs +dtbs: $(addprefix $(obj)/, $(dtb-y)) + @: + +clean-files := *.dtb diff --git a/arch/mips/dts/include/dt-bindings b/arch/mips/dts/include/dt-bindings new file mode 120000 index 0000000..0cecb3d --- /dev/null +++ b/arch/mips/dts/include/dt-bindings @@ -0,0 +1 @@ +../../../../include/dt-bindings \ No newline at end of file diff --git a/arch/mips/dts/skeleton.dtsi b/arch/mips/dts/skeleton.dtsi new file mode 100644 index 0000000..24ee6c3 --- /dev/null +++ b/arch/mips/dts/skeleton.dtsi @@ -0,0 +1,23 @@ +/* + * Skeleton device tree; the bare minimum needed to boot; just include and + * add a compatible value. The bootloader will typically populate the memory + * node. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +/ { + #address-cells = <1>; + #size-cells = <1>; + + chosen { + }; + + aliases { + }; + + memory { + device_type = "memory"; + reg = <0 0>; + }; +}; diff --git a/dts/Makefile b/dts/Makefile index d3122aa..c4ac153 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -45,4 +45,4 @@ dtbs: $(obj)/dt.dtb clean-files := dt.dtb.S # Let clean descend into dts directories -subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/sandbox/dts ../arch/x86/dts +subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/mips/dts ../arch/sandbox/dts ../arch/x86/dts