dts: Deduplicate dtbs target
The dtbs: target is almost identical in all architecture Makefiles.
All architecture Makefiles include scripts/Makefile.dts . Deduplicate
the dtbs: target into scripts/Makefile.dts . No functional change.
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Caleb Connolly <caleb.connolly@linaro.org> #qcom, OF_UPSTREAM
diff --git a/arch/arc/dts/Makefile b/arch/arc/dts/Makefile
index 532a813..fe6ad7b 100644
--- a/arch/arc/dts/Makefile
+++ b/arch/arc/dts/Makefile
@@ -10,12 +10,5 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 123e121..8cbb5d8 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1306,16 +1306,8 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
# Add any required device tree compiler flags here
DTC_FLAGS += -a 0x8
DTC_FLAGS_imx8mp-dhcom-som-overlay-rev100 += -Wno-avoid_default_addr_size -Wno-reg_format
DTC_FLAGS_imx8mp-dhcom-pdk3-overlay-rev100 += -Wno-avoid_default_addr_size -Wno-reg_format
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb *.dtbo *_HS
diff --git a/arch/m68k/dts/Makefile b/arch/m68k/dts/Makefile
index 7988522..8b354b9 100644
--- a/arch/m68k/dts/Makefile
+++ b/arch/m68k/dts/Makefile
@@ -20,12 +20,5 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb
diff --git a/arch/microblaze/dts/Makefile b/arch/microblaze/dts/Makefile
index 427a8f9..9be902d 100644
--- a/arch/microblaze/dts/Makefile
+++ b/arch/microblaze/dts/Makefile
@@ -4,12 +4,5 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb
diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile
index 14fbce5..752e771 100644
--- a/arch/mips/dts/Makefile
+++ b/arch/mips/dts/Makefile
@@ -39,13 +39,5 @@
include $(srctree)/scripts/Makefile.dts
-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/nios2/dts/Makefile b/arch/nios2/dts/Makefile
index 2b29fa9..d77db97 100644
--- a/arch/nios2/dts/Makefile
+++ b/arch/nios2/dts/Makefile
@@ -4,12 +4,5 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb
diff --git a/arch/powerpc/dts/Makefile b/arch/powerpc/dts/Makefile
index 321c644..766b0c0 100644
--- a/arch/powerpc/dts/Makefile
+++ b/arch/powerpc/dts/Makefile
@@ -35,13 +35,5 @@
include $(srctree)/scripts/Makefile.dts
-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/riscv/dts/Makefile b/arch/riscv/dts/Makefile
index c4c4405..f3dfd75 100644
--- a/arch/riscv/dts/Makefile
+++ b/arch/riscv/dts/Makefile
@@ -15,12 +15,5 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb
diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile
index f810b47..1c9fb4a 100644
--- a/arch/sandbox/dts/Makefile
+++ b/arch/sandbox/dts/Makefile
@@ -10,12 +10,5 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb *.dtbo
diff --git a/arch/sh/dts/Makefile b/arch/sh/dts/Makefile
index 144fd3e..e9153e4 100644
--- a/arch/sh/dts/Makefile
+++ b/arch/sh/dts/Makefile
@@ -2,13 +2,5 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
# Add any required device tree compiler flags here
DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb *_HS
diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile
index cd77f4c..9a46726 100644
--- a/arch/x86/dts/Makefile
+++ b/arch/x86/dts/Makefile
@@ -24,12 +24,4 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
DTC_FLAGS += -R 4 -p $(if $(CONFIG_EFI_APP),0x8000,0x1000)
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb
diff --git a/arch/xtensa/dts/Makefile b/arch/xtensa/dts/Makefile
index c22c50a..aa582b8 100644
--- a/arch/xtensa/dts/Makefile
+++ b/arch/xtensa/dts/Makefile
@@ -4,12 +4,4 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb
diff --git a/dts/upstream/src/arm/Makefile b/dts/upstream/src/arm/Makefile
index 9a8f6aa..c86a2be 100644
--- a/dts/upstream/src/arm/Makefile
+++ b/dts/upstream/src/arm/Makefile
@@ -2,13 +2,5 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
# Add any required device tree compiler flags here
DTC_FLAGS += -a 0x8
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := */*.dtb */*.dtbo
diff --git a/dts/upstream/src/arm64/Makefile b/dts/upstream/src/arm64/Makefile
index 26a83d3..b6db0dc 100644
--- a/dts/upstream/src/arm64/Makefile
+++ b/dts/upstream/src/arm64/Makefile
@@ -2,17 +2,9 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
# Add any required device tree compiler flags here
DTC_FLAGS += -a 0x8
ifdef CONFIG_RCAR_64
DTC_FLAGS += -R 4 -p 0x1000
endif
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := */*.dtb */*.dtbo
diff --git a/dts/upstream/src/xtensa/Makefile b/dts/upstream/src/xtensa/Makefile
index 2a81acb..c86a2be 100644
--- a/dts/upstream/src/xtensa/Makefile
+++ b/dts/upstream/src/xtensa/Makefile
@@ -2,13 +2,5 @@
include $(srctree)/scripts/Makefile.dts
-targets += $(dtb-y)
-
# Add any required device tree compiler flags here
DTC_FLAGS += -a 0x8
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
- @:
-
-clean-files := *.dtb *.dtbo */*.dtb */*.dtbo
diff --git a/scripts/Makefile.dts b/scripts/Makefile.dts
index 790f3c5..1fe142f 100644
--- a/scripts/Makefile.dts
+++ b/scripts/Makefile.dts
@@ -14,3 +14,11 @@
dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts))
endif
+
+targets += $(dtb-y)
+
+PHONY += dtbs
+dtbs: $(addprefix $(obj)/, $(dtb-y))
+ @:
+
+clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS