Skip to contentSkip to conversation

MIPS: Prepare device-tree support.

PATCH Superseded Purna Chandra Mandal 3 participants 5 messages Dec 17, 2015 – Dec 21, 2015 MIPS

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/18 MIPS: Prepare device-tree support.

---

 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
arch/Kconfig +1 -0
index 6489cc9..589fc47 100644
@@ -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"
arch/mips/config.mk +3 -0
index 52e28f2..d4d688e 100644
@@ -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
arch/mips/dts/.gitignore new file +1 -0
new file mode 100644
index 0000000..b60ed20
@@ -0,0 +1 @@
+*.dtb
arch/mips/dts/Makefile new file +16 -0
new file mode 100644
index 0000000..724b5d2
@@ -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
arch/mips/dts/include/dt-bindings new file +1 -0
new file mode 120000
index 0000000..0cecb3d
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
arch/mips/dts/skeleton.dtsi new file +21 -0
new file mode 100644
index 0000000..ad41546
@@ -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>;
+    };
+};
dts/Makefile +1 -1
index d3122aa..5c3a01f 100644
@@ -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
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/18 MIPS: Prepare device-tree support.

Quoted 52 lines · 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
arch/Kconfig +1 -0
index 6489cc9..589fc47 100644
@@ -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"
arch/mips/config.mk +3 -1
index 52e28f2..d4d688e 100644
@@ -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
arch/mips/dts/.gitignore new file +1 -0
new file mode 100644
index 0000000..b60ed20
@@ -0,0 +1 @@
+*.dtb
arch/mips/dts/Makefile new file +0 -0
new file mode 100644
index 0000000..724b5d2

arch/mips/dts/Makefile line 5

Quoted 5 lines
arch/mips/dts/Makefile new file +5 -0
@@ -0,0 +1,16 @@
+#
+# SPDX-License-Identifier:    GPL-2.0+
+#
+
+#dtb-$(CONFIG_XXX) += xxx.dtb

XXX ?

Quoted 34 lines
arch/mips/dts/Makefile new file +10 -0
+targets += $(dtb-y)
+
+# Add any required device tree compiler flags here
+DTC_FLAGS +=
+
+PHONY += dtbs
+dtbs: $(addprefix $(obj)/, $(dtb-y))
+    @:
+
+clean-files := *.dtb
(quoted diff) +0 -0

b/arch/mips/dts/include/dt-bindings new file mode 120000 index 0000000..0cecb3d

arch/mips/dts/include/dt-bindings new file +1 -0
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
arch/mips/dts/skeleton.dtsi new file +3 -0
new file mode 100644
index 0000000..ad41546
@@ -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.
+ */

arch/mips/dts/skeleton.dtsi new file +5 -0
+
+/ {
+    #address-cells = <1>;
+    #size-cells = <1>;
+

arch/mips/dts/skeleton.dtsi line 20

Quoted 10 lines
arch/mips/dts/skeleton.dtsi new file +10 -0
+    chosen {
+    };
+
+    aliases {
+    };
+
+    memory {
+        device_type = "memory";
+        reg = <0 0>;
+    };

You don't need any of these nodes, do you ?

Quoted 12 lines
arch/mips/dts/skeleton.dtsi new file +1 -0
+};
dts/Makefile +0 -1
index d3122aa..5c3a01f 100644
@@ -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

#2 lore raw

PATCH 1/18 MIPS: Prepare device-tree support.

Quoted 51 lines · Marek Vasut
Quoted 50 lines · 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
arch/Kconfig +1 -0
index 6489cc9..589fc47 100644
@@ -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"
arch/mips/config.mk +3 -1
index 52e28f2..d4d688e 100644
@@ -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
arch/mips/dts/.gitignore new file +1 -0
new file mode 100644
index 0000000..b60ed20
@@ -0,0 +1 @@
+*.dtb
arch/mips/dts/Makefile new file +0 -1
new file mode 100644
index 0000000..724b5d2
--- /dev/null
Quoted 8 lines

arch/mips/dts/Makefile line 5

Quoted 7 lines

+++ b/arch/mips/dts/Makefile

arch/mips/dts/Makefile new file +5 -0
@@ -0,0 +1,16 @@
+#
+# SPDX-License-Identifier:    GPL-2.0+
+#
+
+#dtb-$(CONFIG_XXX) += xxx.dtb

XXX ?

ack. will remove.

Quoted 37 lines
Quoted 37 lines
arch/mips/dts/Makefile new file +10 -0
+targets += $(dtb-y)
+
+# Add any required device tree compiler flags here
+DTC_FLAGS +=
+
+PHONY += dtbs
+dtbs: $(addprefix $(obj)/, $(dtb-y))
+    @:
+
+clean-files := *.dtb
(quoted diff) +0 -0

b/arch/mips/dts/include/dt-bindings new file mode 120000 index 0000000..0cecb3d

arch/mips/dts/include/dt-bindings new file +1 -0
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
arch/mips/dts/skeleton.dtsi new file +3 -0
new file mode 100644
index 0000000..ad41546
@@ -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.
+ */

arch/mips/dts/skeleton.dtsi new file +8 -0
+
+/ {
+    #address-cells = <1>;
+    #size-cells = <1>;
+
+    chosen {
+    };
+
Quoted 8 lines

arch/mips/dts/skeleton.dtsi line 20

Quoted 7 lines
arch/mips/dts/skeleton.dtsi new file +7 -0
+    aliases {
+    };
+
+    memory {
+        device_type = "memory";
+        reg = <0 0>;
+    };

You don't need any of these nodes, do you ?

ack. This is skeleton code copied from arm, might be needed by others. will remove as not needed by me.

Quoted 12 lines
Quoted 12 lines
arch/mips/dts/skeleton.dtsi new file +1 -0
+};
dts/Makefile +0 -1
index d3122aa..5c3a01f 100644
@@ -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

#3 lore raw

PATCH 1/18 MIPS: Prepare device-tree support.

In reply to Purna Chandra Mandal

Am 17.12.2015 um 18:28 schrieb Purna Chandra Mandal:

Quoted 2 lines

if you send patches from other people, you should not remove their Author or Signed-off-by. I already prepared a cleaned up version of that patch some days ago for submission. But I see you did some modifications which I missed. I will add those to my patch and you can drop this one in your next patch series. You should rebase your patches against the next branch in u-boot-mips tree [1]

[1] http://git.denx.de/?p=u-boot/u-boot-mips.git;a=summary

Quoted 113 lines

---

 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
arch/Kconfig +1 -0
index 6489cc9..589fc47 100644
@@ -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"
arch/mips/config.mk +3 -0
index 52e28f2..d4d688e 100644
@@ -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
arch/mips/dts/.gitignore new file +1 -0
new file mode 100644
index 0000000..b60ed20
@@ -0,0 +1 @@
+*.dtb
arch/mips/dts/Makefile new file +16 -0
new file mode 100644
index 0000000..724b5d2
@@ -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
arch/mips/dts/include/dt-bindings new file +1 -0
new file mode 120000
index 0000000..0cecb3d
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
arch/mips/dts/skeleton.dtsi new file +21 -0
new file mode 100644
index 0000000..ad41546
@@ -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>;
+    };
+};
dts/Makefile +1 -1
index d3122aa..5c3a01f 100644
@@ -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
Signature · 1 line
- Daniel
#4 lore raw

PATCH 1/18 MIPS: Prepare device-tree support.

Quoted 11 lines · Daniel Schwierzeck

Am 17.12.2015 um 18:28 schrieb Purna Chandra Mandal:

Quoted 1 line

if you send patches from other people, you should not remove their Author or Signed-off-by. I already prepared a cleaned up version of that patch some days ago for submission. But I see you did some modifications which I missed. I will add those to my patch and you can drop this one in your next patch series. You should rebase your patches against the next branch in u-boot-mips tree [1]

[1] http://git.denx.de/?p=u-boot/u-boot-mips.git;a=summary

ack. I'll drop in next version.

Quoted 113 lines
Quoted 113 lines

---

 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
arch/Kconfig +1 -0
index 6489cc9..589fc47 100644
@@ -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"
arch/mips/config.mk +3 -0
index 52e28f2..d4d688e 100644
@@ -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
arch/mips/dts/.gitignore new file +1 -0
new file mode 100644
index 0000000..b60ed20
@@ -0,0 +1 @@
+*.dtb
arch/mips/dts/Makefile new file +16 -0
new file mode 100644
index 0000000..724b5d2
@@ -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
arch/mips/dts/include/dt-bindings new file +1 -0
new file mode 120000
index 0000000..0cecb3d
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
arch/mips/dts/skeleton.dtsi new file +21 -0
new file mode 100644
index 0000000..ad41546
@@ -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>;
+    };
+};
dts/Makefile +1 -1
index d3122aa..5c3a01f 100644
@@ -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