summaryrefslogtreecommitdiff
path: root/arch/microblaze/boot/dts
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-11-27 23:29:15 (GMT)
committerRob Herring <rob.herring@calxeda.com>2012-12-03 23:17:50 (GMT)
commit300db34a7256c94dbb7676f1e87101a3bb13cdd9 (patch)
tree4caad7b25e8d8c918dba3a3abddfb53a4f9f82ae /arch/microblaze/boot/dts
parent1020e29cdab6bed8521a5a1a1b6f6513c393bc85 (diff)
downloadlinux-fsl-qoriq-300db34a7256c94dbb7676f1e87101a3bb13cdd9.tar.xz
microblaze: use new common dtc rule
The current rules have the .dtb files build in a different directory from the .dts files. This patch changes microblaze to use the generic dtb rule which builds .dtb files in the same directory as the source .dts. This requires moving parts of arch/microblaze/boot/Makefile into newly created arch/microblaze/boot/dts/Makefile, and updating arch/microblaze/Makefile to call the new Makefile. linked_dtb.S is also moved into boot/dts/ since it's used by rules that were moved. Cc: Michal Simek <monstr@monstr.eu> Cc: microblaze-uclinux@itee.uq.edu.au Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'arch/microblaze/boot/dts')
-rw-r--r--arch/microblaze/boot/dts/Makefile22
-rw-r--r--arch/microblaze/boot/dts/linked_dtb.S2
2 files changed, 24 insertions, 0 deletions
diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile
new file mode 100644
index 0000000..c3b3a5d
--- /dev/null
+++ b/arch/microblaze/boot/dts/Makefile
@@ -0,0 +1,22 @@
+#
+# arch/microblaze/boot/Makefile
+#
+
+obj-y += linked_dtb.o
+
+# Ensure system.dtb exists
+$(obj)/linked_dtb.o: $(obj)/system.dtb
+
+# Generate system.dtb from $(DTB).dtb
+ifneq ($(DTB),system)
+$(obj)/system.dtb: $(obj)/$(DTB).dtb
+ $(call if_changed,cp)
+endif
+
+quiet_cmd_cp = CP $< $@$2
+ cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
+
+# Rule to build device tree blobs
+DTC_FLAGS := -p 1024
+
+clean-files += *.dtb
diff --git a/arch/microblaze/boot/dts/linked_dtb.S b/arch/microblaze/boot/dts/linked_dtb.S
new file mode 100644
index 0000000..23345af
--- /dev/null
+++ b/arch/microblaze/boot/dts/linked_dtb.S
@@ -0,0 +1,2 @@
+.section __fdt_blob,"a"
+.incbin "arch/microblaze/boot/dts/system.dtb"