From patchwork Thu Dec 17 17:28:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Purna Chandra Mandal X-Patchwork-Id: 558464 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 CF264140187 for ; Fri, 18 Dec 2015 04:30:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2E8AB4BC47; Thu, 17 Dec 2015 18:30: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 g314mT6GNFMz; Thu, 17 Dec 2015 18:30:05 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C93174BC3D; Thu, 17 Dec 2015 18:30:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B7BED4BC3D for ; Thu, 17 Dec 2015 18:30:01 +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 N4xgEsdr-Luk for ; Thu, 17 Dec 2015 18:30:01 +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 email.microchip.com (exsmtp01.microchip.com [198.175.253.37]) by theia.denx.de (Postfix) with ESMTPS id 0D5BB4BC2A for ; Thu, 17 Dec 2015 18:29:59 +0100 (CET) Received: from [10.41.20.11] (10.10.76.4) by CHN-SV-EXCH01.mchp-main.com (10.10.76.37) with Microsoft SMTP Server id 14.3.181.6; Thu, 17 Dec 2015 10:29:57 -0700 To: From: Purna Chandra Mandal Message-ID: <5672F0A8.4020309@microchip.com> Date: Thu, 17 Dec 2015 22:58:08 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Cc: Marek Vasut , Alexey Brodkin Subject: [U-Boot] [PATCH v1 01/18] MIPS: Prepare device-tree support. 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Purna Chandra Mandal --- arch/Kconfig | 1 + arch/mips/config.mk | 3 +++ arch/mips/dts/.gitignore | 1 + arch/mips/dts/Makefile | 16 ++++++++++++++++ arch/mips/dts/include/dt-bindings | 1 + arch/mips/dts/skeleton.dtsi | 21 +++++++++++++++++++++ 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 6489cc9..589fc47 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -54,6 +54,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 52e28f2..d4d688e 100644 --- a/arch/mips/config.mk +++ b/arch/mips/config.mk @@ -70,3 +70,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections LDFLAGS_FINAL += --gc-sections -pie OBJCOPYFLAGS += -j .text -j .rodata -j .data -j .got OBJCOPYFLAGS += -j .u_boot_list -j .rel.dyn -j .padding +ifdef CONFIG_OF_EMBED +OBJCOPYFLAGS += -j .dtb.init.rodata +endif 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..724b5d2 --- /dev/null +++ b/arch/mips/dts/Makefile @@ -0,0 +1,16 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +#dtb-$(CONFIG_XXX) += xxx.dtb + +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..ad41546 --- /dev/null +++ b/arch/mips/dts/skeleton.dtsi @@ -0,0 +1,21 @@ +/* + * 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>; + }; +}; diff --git a/dts/Makefile b/dts/Makefile index d3122aa..5c3a01f 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/sandbox/dts ../arch/x86/dts ../arch/mips/dts