All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] MIPS: add initial infrastructure for device-tree files
Date: Mon, 11 Jan 2016 17:48:20 +0100	[thread overview]
Message-ID: <1452530900-22860-1-git-send-email-daniel.schwierzeck@gmail.com> (raw)
In-Reply-To: <1450564990-17333-1-git-send-email-daniel.schwierzeck@gmail.com>

Prepare sub-folder for device-tree files. Make support for
device-tree on MIPS available in Kbuild/Kconfig.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
---
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/skeleton.dtsi | 23 +++++++++++++++++++++++
 dts/Makefile                |  2 +-
 6 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 arch/mips/dts/.gitignore
 create mode 100644 arch/mips/dts/Makefile
 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/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
-- 
2.5.0

  parent reply	other threads:[~2016-01-11 16:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-19 19:20 [U-Boot] [PATCH 0/5] MIPS updates Daniel Schwierzeck
2015-12-19 19:20 ` [U-Boot] [PATCH 1/5] MIPS: fix annotation of _start and relocate_code Daniel Schwierzeck
2015-12-19 19:20 ` [U-Boot] [PATCH 2/5] MIPS: create .text sub-sections for assembler functions Daniel Schwierzeck
2015-12-19 19:20 ` [U-Boot] [PATCH 3/5] MIPS: do not build position-independent executables for SPL Daniel Schwierzeck
2015-12-19 19:20 ` [U-Boot] [PATCH 4/5] MIPS: add initial infrastructure for device-tree files Daniel Schwierzeck
2015-12-19 22:43   ` [U-Boot] [PATCH v2 " Daniel Schwierzeck
2016-01-11 11:25     ` Purna Chandra Mandal
2016-01-11 16:40       ` Daniel Schwierzeck
2016-01-11 16:48     ` Daniel Schwierzeck [this message]
2016-01-12 19:05       ` [U-Boot] [PATCH v4] " Daniel Schwierzeck
2015-12-19 19:20 ` [U-Boot] [PATCH 5/5] Kconfig: create symbolic link on MIPS Daniel Schwierzeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452530900-22860-1-git-send-email-daniel.schwierzeck@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.