* [PATCH 1/4] microblaze: fix 'FORCE prerequisite is missing' warning
@ 2025-01-14 18:13 Masahiro Yamada
2025-01-14 18:13 ` [PATCH 2/4] microblaze: merge build rules for linux.bin and simpleImage.$(DTB) Masahiro Yamada
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Masahiro Yamada @ 2025-01-14 18:13 UTC (permalink / raw)
To: Michal Simek
Cc: linux-kernel, Masahiro Yamada, Conor Dooley, Krzysztof Kozlowski,
Rob Herring, devicetree
If you add foo.dtb into the arch/microblaze/boot/dts/ directory and
run 'make simpleImage.foo', you will observe the following warning:
arch/microblaze/boot/dts/Makefile:15: FORCE prerequisite is missing
Without FORCE, if_changed cannot detect the command line changes.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/microblaze/boot/dts/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile
index b84e2cbb20ee..932dc7550a1b 100644
--- a/arch/microblaze/boot/dts/Makefile
+++ b/arch/microblaze/boot/dts/Makefile
@@ -11,7 +11,7 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb
# Generate system.dtb from $(DTB).dtb
ifneq ($(DTB),system)
-$(obj)/system.dtb: $(obj)/$(DTB).dtb
+$(obj)/system.dtb: $(obj)/$(DTB).dtb FORCE
$(call if_changed,copy)
endif
endif
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/4] microblaze: merge build rules for linux.bin and simpleImage.$(DTB) 2025-01-14 18:13 [PATCH 1/4] microblaze: fix 'FORCE prerequisite is missing' warning Masahiro Yamada @ 2025-01-14 18:13 ` Masahiro Yamada 2025-01-14 18:13 ` [PATCH 3/4] microblaze: prevent linux.bin from containing a built-in DTB Masahiro Yamada 2025-01-14 18:13 ` [PATCH 4/4] microblaze: remove unnecessary system.dts Masahiro Yamada 2 siblings, 0 replies; 9+ messages in thread From: Masahiro Yamada @ 2025-01-14 18:13 UTC (permalink / raw) To: Michal Simek; +Cc: linux-kernel, Masahiro Yamada The build rules for $(obj)/linux.bin and $(obj)/simpleImage.$(DTB) are identical. The build rules for $(obj)/linux.bin.ub and $(obj)/simpleImage.$(DTB).ub are also identical. This commit consolidates the identical build rules. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- arch/microblaze/boot/Makefile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile index 2b42c370d574..9e3fec78f084 100644 --- a/arch/microblaze/boot/Makefile +++ b/arch/microblaze/boot/Makefile @@ -7,12 +7,6 @@ targets := linux.bin linux.bin.gz linux.bin.ub simpleImage.* OBJCOPYFLAGS := -R .note -R .comment -R .note.gnu.build-id -O binary -$(obj)/linux.bin: vmlinux FORCE - $(call if_changed,objcopy) - -$(obj)/linux.bin.ub: $(obj)/linux.bin FORCE - $(call if_changed,uimage) - $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE $(call if_changed,gzip) @@ -22,10 +16,10 @@ quiet_cmd_strip = STRIP $< $@$2 UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR) -$(obj)/simpleImage.$(DTB): vmlinux FORCE +$(obj)/linux.bin $(obj)/simpleImage.$(DTB): vmlinux FORCE $(call if_changed,objcopy) -$(obj)/simpleImage.$(DTB).ub: $(obj)/simpleImage.$(DTB) FORCE +$(obj)/linux.bin.ub $(obj)/simpleImage.$(DTB).ub: %.ub: % FORCE $(call if_changed,uimage) $(obj)/simpleImage.$(DTB).unstrip: vmlinux FORCE -- 2.43.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] microblaze: prevent linux.bin from containing a built-in DTB 2025-01-14 18:13 [PATCH 1/4] microblaze: fix 'FORCE prerequisite is missing' warning Masahiro Yamada 2025-01-14 18:13 ` [PATCH 2/4] microblaze: merge build rules for linux.bin and simpleImage.$(DTB) Masahiro Yamada @ 2025-01-14 18:13 ` Masahiro Yamada 2025-01-14 18:13 ` [PATCH 4/4] microblaze: remove unnecessary system.dts Masahiro Yamada 2 siblings, 0 replies; 9+ messages in thread From: Masahiro Yamada @ 2025-01-14 18:13 UTC (permalink / raw) To: Michal Simek; +Cc: linux-kernel, Masahiro Yamada MicroBlaze is the only architecture that specifies the built-in DTB directly via the command line (i.e., 'make simpleImage.*'). All other architectures supporting a builtin DTB use a CONFIG option to specify the DTB. Kbuild supports building multiple targets in a single command. Running 'make foo bar' should produce the same output as executing 'make foo' and 'make bar' separately. The oddity in MicroBlaze does not align with the Kbuild philosophy. For example: $ make all simpleImage.foo This creates both linux.bin (since 'all' depends on linux.bin) and simpleImage.foo. It generates linux.bin containing foo.dtb, while linux.bin generated by 'make all' contains no DTB. Michal Simek requires that linux.bin contain no built-in DTB. [1] Therefore, the linux.bin generated in the example above is considered invalid. This commit introduces a sanity check to avoid creating such an invalid linux.bin. Similarly, you cannot do 'make simpleImage.foo simpleImage.bar' since it is unclear which DTB (foo.dtb or bar.dtb) should be included. This command will fail without an explicit check. [1]: https://lore.kernel.org/all/d2bdfbfd-3721-407f-991e-566d48392add@amd.com/ Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- arch/microblaze/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 02e6be9c5b0d..670a1690aa73 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -66,6 +66,7 @@ PHONY += linux.bin linux.bin.gz linux.bin.ub linux.bin.ub linux.bin.gz: linux.bin linux.bin: vmlinux linux.bin linux.bin.gz linux.bin.ub: + $(if $(filter simpleImage.%, $(MAKECMDGOALS)),$(error You cannot build linux.bin and simpleImage.* at the same time)) $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ @echo 'Kernel: $(boot)/$@ is ready' ' (#'$(or $(KBUILD_BUILD_VERSION),`cat .version`)')' -- 2.43.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] microblaze: remove unnecessary system.dts 2025-01-14 18:13 [PATCH 1/4] microblaze: fix 'FORCE prerequisite is missing' warning Masahiro Yamada 2025-01-14 18:13 ` [PATCH 2/4] microblaze: merge build rules for linux.bin and simpleImage.$(DTB) Masahiro Yamada 2025-01-14 18:13 ` [PATCH 3/4] microblaze: prevent linux.bin from containing a built-in DTB Masahiro Yamada @ 2025-01-14 18:13 ` Masahiro Yamada 2025-01-31 22:25 ` Rob Herring 2 siblings, 1 reply; 9+ messages in thread From: Masahiro Yamada @ 2025-01-14 18:13 UTC (permalink / raw) To: Michal Simek Cc: linux-kernel, Masahiro Yamada, Conor Dooley, Krzysztof Kozlowski, Rob Herring, devicetree The default image linux.bin does not contain any DTB, but a separate system.dtb is compiled. Michal Simek clearly explained "system.dtb is really old dtb more for demonstration purpose and nothing else and likely it is not working on any existing board." [1] The system.dts is not necessary even for demonstration purposes. There is no need to compile out-of-tree *.dts under arch/microblaze/boot/dts/ unless it is embedded into the kernel. Users can directly use dtc. [1]: https://lore.kernel.org/all/d2bdfbfd-3721-407f-991e-566d48392add@amd.com/ Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> --- arch/microblaze/boot/dts/Makefile | 3 +- arch/microblaze/boot/dts/system.dts | 353 ---------------------------- 2 files changed, 1 insertion(+), 355 deletions(-) delete mode 100644 arch/microblaze/boot/dts/system.dts diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile index 932dc7550a1b..fa0a6c0854ca 100644 --- a/arch/microblaze/boot/dts/Makefile +++ b/arch/microblaze/boot/dts/Makefile @@ -1,8 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 # -dtb-y := system.dtb - ifneq ($(DTB),) obj-y += linked_dtb.o @@ -11,6 +9,7 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb # Generate system.dtb from $(DTB).dtb ifneq ($(DTB),system) +targets += system.dtb $(obj)/system.dtb: $(obj)/$(DTB).dtb FORCE $(call if_changed,copy) endif diff --git a/arch/microblaze/boot/dts/system.dts b/arch/microblaze/boot/dts/system.dts deleted file mode 100644 index 22252451ec09..000000000000 --- a/arch/microblaze/boot/dts/system.dts +++ /dev/null @@ -1,353 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Device Tree Generator version: 1.1 - * - * (C) Copyright 2007-2008 Xilinx, Inc. - * (C) Copyright 2007-2009 Michal Simek - * - * Michal SIMEK <monstr@monstr.eu> - * - * CAUTION: This file is automatically generated by libgen. - * Version: Xilinx EDK 10.1.03 EDK_K_SP3.6 - * - * XPS project directory: Xilinx-ML505-ll_temac-sgdma-MMU-FDT-edk101 - */ - -/dts-v1/; -/ { - #address-cells = <1>; - #size-cells = <1>; - compatible = "xlnx,microblaze"; - model = "testing"; - DDR2_SDRAM: memory@90000000 { - device_type = "memory"; - reg = < 0x90000000 0x10000000 >; - } ; - aliases { - ethernet0 = &Hard_Ethernet_MAC; - serial0 = &RS232_Uart_1; - } ; - chosen { - bootargs = "console=ttyUL0,115200 highres=on"; - stdout-path = "/plb@0/serial@84000000"; - } ; - cpus { - #address-cells = <1>; - #cpus = <0x1>; - #size-cells = <0>; - microblaze_0: cpu@0 { - clock-frequency = <125000000>; - compatible = "xlnx,microblaze-7.10.d"; - d-cache-baseaddr = <0x90000000>; - d-cache-highaddr = <0x9fffffff>; - d-cache-line-size = <0x10>; - d-cache-size = <0x2000>; - device_type = "cpu"; - i-cache-baseaddr = <0x90000000>; - i-cache-highaddr = <0x9fffffff>; - i-cache-line-size = <0x10>; - i-cache-size = <0x2000>; - model = "microblaze,7.10.d"; - reg = <0>; - timebase-frequency = <125000000>; - xlnx,addr-tag-bits = <0xf>; - xlnx,allow-dcache-wr = <0x1>; - xlnx,allow-icache-wr = <0x1>; - xlnx,area-optimized = <0x0>; - xlnx,cache-byte-size = <0x2000>; - xlnx,d-lmb = <0x1>; - xlnx,d-opb = <0x0>; - xlnx,d-plb = <0x1>; - xlnx,data-size = <0x20>; - xlnx,dcache-addr-tag = <0xf>; - xlnx,dcache-always-used = <0x1>; - xlnx,dcache-byte-size = <0x2000>; - xlnx,dcache-line-len = <0x4>; - xlnx,dcache-use-fsl = <0x1>; - xlnx,debug-enabled = <0x1>; - xlnx,div-zero-exception = <0x1>; - xlnx,dopb-bus-exception = <0x0>; - xlnx,dynamic-bus-sizing = <0x1>; - xlnx,edge-is-positive = <0x1>; - xlnx,family = "virtex5"; - xlnx,endianness = <0x1>; - xlnx,fpu-exception = <0x1>; - xlnx,fsl-data-size = <0x20>; - xlnx,fsl-exception = <0x0>; - xlnx,fsl-links = <0x0>; - xlnx,i-lmb = <0x1>; - xlnx,i-opb = <0x0>; - xlnx,i-plb = <0x1>; - xlnx,icache-always-used = <0x1>; - xlnx,icache-line-len = <0x4>; - xlnx,icache-use-fsl = <0x1>; - xlnx,ill-opcode-exception = <0x1>; - xlnx,instance = "microblaze_0"; - xlnx,interconnect = <0x1>; - xlnx,interrupt-is-edge = <0x0>; - xlnx,iopb-bus-exception = <0x0>; - xlnx,mmu-dtlb-size = <0x4>; - xlnx,mmu-itlb-size = <0x2>; - xlnx,mmu-tlb-access = <0x3>; - xlnx,mmu-zones = <0x10>; - xlnx,number-of-pc-brk = <0x1>; - xlnx,number-of-rd-addr-brk = <0x0>; - xlnx,number-of-wr-addr-brk = <0x0>; - xlnx,opcode-0x0-illegal = <0x1>; - xlnx,pvr = <0x2>; - xlnx,pvr-user1 = <0x0>; - xlnx,pvr-user2 = <0x0>; - xlnx,reset-msr = <0x0>; - xlnx,sco = <0x0>; - xlnx,unaligned-exceptions = <0x1>; - xlnx,use-barrel = <0x1>; - xlnx,use-dcache = <0x1>; - xlnx,use-div = <0x1>; - xlnx,use-ext-brk = <0x1>; - xlnx,use-ext-nm-brk = <0x1>; - xlnx,use-extended-fsl-instr = <0x0>; - xlnx,use-fpu = <0x2>; - xlnx,use-hw-mul = <0x2>; - xlnx,use-icache = <0x1>; - xlnx,use-interrupt = <0x1>; - xlnx,use-mmu = <0x3>; - xlnx,use-msr-instr = <0x1>; - xlnx,use-pcmp-instr = <0x1>; - } ; - } ; - mb_plb: plb@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "xlnx,plb-v46-1.03.a", "xlnx,plb-v46-1.00.a", "simple-bus"; - ranges ; - FLASH: flash@a0000000 { - bank-width = <2>; - compatible = "xlnx,xps-mch-emc-2.00.a", "cfi-flash"; - reg = < 0xa0000000 0x2000000 >; - xlnx,family = "virtex5"; - xlnx,include-datawidth-matching-0 = <0x1>; - xlnx,include-datawidth-matching-1 = <0x0>; - xlnx,include-datawidth-matching-2 = <0x0>; - xlnx,include-datawidth-matching-3 = <0x0>; - xlnx,include-negedge-ioregs = <0x0>; - xlnx,include-plb-ipif = <0x1>; - xlnx,include-wrbuf = <0x1>; - xlnx,max-mem-width = <0x10>; - xlnx,mch-native-dwidth = <0x20>; - xlnx,mch-plb-clk-period-ps = <0x1f40>; - xlnx,mch-splb-awidth = <0x20>; - xlnx,mch0-accessbuf-depth = <0x10>; - xlnx,mch0-protocol = <0x0>; - xlnx,mch0-rddatabuf-depth = <0x10>; - xlnx,mch1-accessbuf-depth = <0x10>; - xlnx,mch1-protocol = <0x0>; - xlnx,mch1-rddatabuf-depth = <0x10>; - xlnx,mch2-accessbuf-depth = <0x10>; - xlnx,mch2-protocol = <0x0>; - xlnx,mch2-rddatabuf-depth = <0x10>; - xlnx,mch3-accessbuf-depth = <0x10>; - xlnx,mch3-protocol = <0x0>; - xlnx,mch3-rddatabuf-depth = <0x10>; - xlnx,mem0-width = <0x10>; - xlnx,mem1-width = <0x20>; - xlnx,mem2-width = <0x20>; - xlnx,mem3-width = <0x20>; - xlnx,num-banks-mem = <0x1>; - xlnx,num-channels = <0x0>; - xlnx,priority-mode = <0x0>; - xlnx,synch-mem-0 = <0x0>; - xlnx,synch-mem-1 = <0x0>; - xlnx,synch-mem-2 = <0x0>; - xlnx,synch-mem-3 = <0x0>; - xlnx,synch-pipedelay-0 = <0x2>; - xlnx,synch-pipedelay-1 = <0x2>; - xlnx,synch-pipedelay-2 = <0x2>; - xlnx,synch-pipedelay-3 = <0x2>; - xlnx,tavdv-ps-mem-0 = <0x1adb0>; - xlnx,tavdv-ps-mem-1 = <0x3a98>; - xlnx,tavdv-ps-mem-2 = <0x3a98>; - xlnx,tavdv-ps-mem-3 = <0x3a98>; - xlnx,tcedv-ps-mem-0 = <0x1adb0>; - xlnx,tcedv-ps-mem-1 = <0x3a98>; - xlnx,tcedv-ps-mem-2 = <0x3a98>; - xlnx,tcedv-ps-mem-3 = <0x3a98>; - xlnx,thzce-ps-mem-0 = <0x88b8>; - xlnx,thzce-ps-mem-1 = <0x1b58>; - xlnx,thzce-ps-mem-2 = <0x1b58>; - xlnx,thzce-ps-mem-3 = <0x1b58>; - xlnx,thzoe-ps-mem-0 = <0x1b58>; - xlnx,thzoe-ps-mem-1 = <0x1b58>; - xlnx,thzoe-ps-mem-2 = <0x1b58>; - xlnx,thzoe-ps-mem-3 = <0x1b58>; - xlnx,tlzwe-ps-mem-0 = <0x88b8>; - xlnx,tlzwe-ps-mem-1 = <0x0>; - xlnx,tlzwe-ps-mem-2 = <0x0>; - xlnx,tlzwe-ps-mem-3 = <0x0>; - xlnx,twc-ps-mem-0 = <0x2af8>; - xlnx,twc-ps-mem-1 = <0x3a98>; - xlnx,twc-ps-mem-2 = <0x3a98>; - xlnx,twc-ps-mem-3 = <0x3a98>; - xlnx,twp-ps-mem-0 = <0x11170>; - xlnx,twp-ps-mem-1 = <0x2ee0>; - xlnx,twp-ps-mem-2 = <0x2ee0>; - xlnx,twp-ps-mem-3 = <0x2ee0>; - xlnx,xcl0-linesize = <0x4>; - xlnx,xcl0-writexfer = <0x1>; - xlnx,xcl1-linesize = <0x4>; - xlnx,xcl1-writexfer = <0x1>; - xlnx,xcl2-linesize = <0x4>; - xlnx,xcl2-writexfer = <0x1>; - xlnx,xcl3-linesize = <0x4>; - xlnx,xcl3-writexfer = <0x1>; - } ; - Hard_Ethernet_MAC: xps-ll-temac@81c00000 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "xlnx,compound"; - ranges ; - ethernet@81c00000 { - compatible = "xlnx,xps-ll-temac-1.01.b", "xlnx,xps-ll-temac-1.00.a"; - interrupt-parent = <&xps_intc_0>; - interrupts = < 5 2 >; - llink-connected = <&PIM3>; - local-mac-address = [ 00 0a 35 00 00 00 ]; - reg = < 0x81c00000 0x40 >; - xlnx,bus2core-clk-ratio = <0x1>; - xlnx,phy-type = <0x1>; - xlnx,phyaddr = <0x1>; - xlnx,rxcsum = <0x0>; - xlnx,rxfifo = <0x1000>; - xlnx,temac-type = <0x0>; - xlnx,txcsum = <0x0>; - xlnx,txfifo = <0x1000>; - } ; - } ; - IIC_EEPROM: i2c@81600000 { - compatible = "xlnx,xps-iic-2.00.a"; - interrupt-parent = <&xps_intc_0>; - interrupts = < 6 2 >; - reg = < 0x81600000 0x10000 >; - xlnx,clk-freq = <0x7735940>; - xlnx,family = "virtex5"; - xlnx,gpo-width = <0x1>; - xlnx,iic-freq = <0x186a0>; - xlnx,scl-inertial-delay = <0x0>; - xlnx,sda-inertial-delay = <0x0>; - xlnx,ten-bit-adr = <0x0>; - } ; - LEDs_8Bit: gpio@81400000 { - compatible = "xlnx,xps-gpio-1.00.a"; - interrupt-parent = <&xps_intc_0>; - interrupts = < 7 2 >; - reg = < 0x81400000 0x10000 >; - xlnx,all-inputs = <0x0>; - xlnx,all-inputs-2 = <0x0>; - xlnx,dout-default = <0x0>; - xlnx,dout-default-2 = <0x0>; - xlnx,family = "virtex5"; - xlnx,gpio-width = <0x8>; - xlnx,interrupt-present = <0x1>; - xlnx,is-bidir = <0x1>; - xlnx,is-bidir-2 = <0x1>; - xlnx,is-dual = <0x0>; - xlnx,tri-default = <0xffffffff>; - xlnx,tri-default-2 = <0xffffffff>; - #gpio-cells = <2>; - gpio-controller; - } ; - - gpio-leds { - compatible = "gpio-leds"; - - heartbeat { - label = "Heartbeat"; - gpios = <&LEDs_8Bit 4 1>; - linux,default-trigger = "heartbeat"; - }; - - yellow { - label = "Yellow"; - gpios = <&LEDs_8Bit 5 1>; - }; - - red { - label = "Red"; - gpios = <&LEDs_8Bit 6 1>; - }; - - green { - label = "Green"; - gpios = <&LEDs_8Bit 7 1>; - }; - } ; - - gpio-restart { - compatible = "gpio-restart"; - /* - * FIXME: is this active low or active high? - * the current flag (1) indicates active low. - * delay measures are templates, should be adjusted - * to datasheet or trial-and-error with real hardware. - */ - gpios = <&LEDs_8Bit 2 1>; - active-delay = <100>; - inactive-delay = <10>; - wait-delay = <100>; - }; - - RS232_Uart_1: serial@84000000 { - clock-frequency = <125000000>; - compatible = "xlnx,xps-uartlite-1.00.a"; - current-speed = <115200>; - device_type = "serial"; - interrupt-parent = <&xps_intc_0>; - interrupts = < 8 0 >; - port-number = <0>; - reg = < 0x84000000 0x10000 >; - xlnx,baudrate = <0x1c200>; - xlnx,data-bits = <0x8>; - xlnx,family = "virtex5"; - xlnx,odd-parity = <0x0>; - xlnx,use-parity = <0x0>; - } ; - debug_module: debug@84400000 { - compatible = "xlnx,mdm-1.00.d"; - reg = < 0x84400000 0x10000 >; - xlnx,family = "virtex5"; - xlnx,interconnect = <0x1>; - xlnx,jtag-chain = <0x2>; - xlnx,mb-dbg-ports = <0x1>; - xlnx,uart-width = <0x8>; - xlnx,use-uart = <0x1>; - xlnx,write-fsl-ports = <0x0>; - } ; - mpmc@90000000 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "xlnx,mpmc-4.02.a"; - ranges ; - PIM3: sdma@84600180 { - compatible = "xlnx,ll-dma-1.00.a"; - interrupt-parent = <&xps_intc_0>; - interrupts = < 2 2 1 2 >; - reg = < 0x84600180 0x80 >; - } ; - } ; - xps_intc_0: interrupt-controller@81800000 { - #interrupt-cells = <0x2>; - compatible = "xlnx,xps-intc-1.00.a"; - interrupt-controller ; - reg = < 0x81800000 0x10000 >; - xlnx,kind-of-intr = <0x100>; - xlnx,num-intr-inputs = <0x9>; - } ; - xps_timer_1: timer@83c00000 { - compatible = "xlnx,xps-timer-1.00.a"; - interrupt-parent = <&xps_intc_0>; - interrupts = < 3 2 >; - reg = < 0x83c00000 0x10000 >; - xlnx,count-width = <0x20>; - xlnx,one-timer-only = <0x0>; - } ; - } ; -} ; -- 2.43.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] microblaze: remove unnecessary system.dts 2025-01-14 18:13 ` [PATCH 4/4] microblaze: remove unnecessary system.dts Masahiro Yamada @ 2025-01-31 22:25 ` Rob Herring 2025-02-01 3:42 ` Masahiro Yamada 0 siblings, 1 reply; 9+ messages in thread From: Rob Herring @ 2025-01-31 22:25 UTC (permalink / raw) To: Masahiro Yamada Cc: Michal Simek, linux-kernel, Conor Dooley, Krzysztof Kozlowski, devicetree On Tue, Jan 14, 2025 at 12:15 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > > The default image linux.bin does not contain any DTB, but a separate > system.dtb is compiled. > > Michal Simek clearly explained "system.dtb is really old dtb more for > demonstration purpose and nothing else and likely it is not working on > any existing board." [1] > > The system.dts is not necessary even for demonstration purposes. There > is no need to compile out-of-tree *.dts under arch/microblaze/boot/dts/ > unless it is embedded into the kernel. Users can directly use dtc. > > [1]: https://lore.kernel.org/all/d2bdfbfd-3721-407f-991e-566d48392add@amd.com/ > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > --- > > arch/microblaze/boot/dts/Makefile | 3 +- > arch/microblaze/boot/dts/system.dts | 353 ---------------------------- > 2 files changed, 1 insertion(+), 355 deletions(-) > delete mode 100644 arch/microblaze/boot/dts/system.dts > > diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile > index 932dc7550a1b..fa0a6c0854ca 100644 > --- a/arch/microblaze/boot/dts/Makefile > +++ b/arch/microblaze/boot/dts/Makefile > @@ -1,8 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0 > # > > -dtb-y := system.dtb > - > ifneq ($(DTB),) > obj-y += linked_dtb.o > > @@ -11,6 +9,7 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb > > # Generate system.dtb from $(DTB).dtb > ifneq ($(DTB),system) Can't this be dropped as setting DTB=system.dtb should work if there's not an in-tree system.dts anymore. > +targets += system.dtb > $(obj)/system.dtb: $(obj)/$(DTB).dtb FORCE > $(call if_changed,copy) > endif ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] microblaze: remove unnecessary system.dts 2025-01-31 22:25 ` Rob Herring @ 2025-02-01 3:42 ` Masahiro Yamada 2025-02-03 11:17 ` Michal Simek 0 siblings, 1 reply; 9+ messages in thread From: Masahiro Yamada @ 2025-02-01 3:42 UTC (permalink / raw) To: Rob Herring Cc: Michal Simek, linux-kernel, Conor Dooley, Krzysztof Kozlowski, devicetree On Sat, Feb 1, 2025 at 7:25 AM Rob Herring <robh@kernel.org> wrote: > > On Tue, Jan 14, 2025 at 12:15 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > > > > The default image linux.bin does not contain any DTB, but a separate > > system.dtb is compiled. > > > > Michal Simek clearly explained "system.dtb is really old dtb more for > > demonstration purpose and nothing else and likely it is not working on > > any existing board." [1] > > > > The system.dts is not necessary even for demonstration purposes. There > > is no need to compile out-of-tree *.dts under arch/microblaze/boot/dts/ > > unless it is embedded into the kernel. Users can directly use dtc. > > > > [1]: https://lore.kernel.org/all/d2bdfbfd-3721-407f-991e-566d48392add@amd.com/ > > > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > > --- > > > > arch/microblaze/boot/dts/Makefile | 3 +- > > arch/microblaze/boot/dts/system.dts | 353 ---------------------------- > > 2 files changed, 1 insertion(+), 355 deletions(-) > > delete mode 100644 arch/microblaze/boot/dts/system.dts > > > > diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile > > index 932dc7550a1b..fa0a6c0854ca 100644 > > --- a/arch/microblaze/boot/dts/Makefile > > +++ b/arch/microblaze/boot/dts/Makefile > > @@ -1,8 +1,6 @@ > > # SPDX-License-Identifier: GPL-2.0 > > # > > > > -dtb-y := system.dtb > > - > > ifneq ($(DTB),) > > obj-y += linked_dtb.o > > > > @@ -11,6 +9,7 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb > > > > # Generate system.dtb from $(DTB).dtb > > ifneq ($(DTB),system) > > Can't this be dropped as setting DTB=system.dtb should work if there's > not an in-tree system.dts anymore. I believe this ifneq is necessary, just in case a user adds system.dtb to arch/microblaze/boot/dts/. 'system.dtb' is a special name because arch/microblaze/boot/dts/linked_dtb.S wraps it. So, $(DTB) is copied to system.dtb, and then it is wrapped by linked_dtb.S. If $(DTB) is already 'system', we cannot copy system.dtb to itself. See the definition of cmd_copy in scripts/Makefile.lib cmd_copy = cat $< > $@ "cat system.dtb > system.dtb" would create an empty system.dtb > > > +targets += system.dtb > > $(obj)/system.dtb: $(obj)/$(DTB).dtb FORCE > > $(call if_changed,copy) > > endif -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] microblaze: remove unnecessary system.dts 2025-02-01 3:42 ` Masahiro Yamada @ 2025-02-03 11:17 ` Michal Simek 2025-05-13 4:50 ` Masahiro Yamada 0 siblings, 1 reply; 9+ messages in thread From: Michal Simek @ 2025-02-03 11:17 UTC (permalink / raw) To: Masahiro Yamada, Rob Herring, Simek, Michal Cc: linux-kernel, Conor Dooley, Krzysztof Kozlowski, devicetree On 2/1/25 04:42, Masahiro Yamada wrote: > On Sat, Feb 1, 2025 at 7:25 AM Rob Herring <robh@kernel.org> wrote: >> >> On Tue, Jan 14, 2025 at 12:15 PM Masahiro Yamada <masahiroy@kernel.org> wrote: >>> >>> The default image linux.bin does not contain any DTB, but a separate >>> system.dtb is compiled. >>> >>> Michal Simek clearly explained "system.dtb is really old dtb more for >>> demonstration purpose and nothing else and likely it is not working on >>> any existing board." [1] >>> >>> The system.dts is not necessary even for demonstration purposes. There >>> is no need to compile out-of-tree *.dts under arch/microblaze/boot/dts/ >>> unless it is embedded into the kernel. Users can directly use dtc. >>> >>> [1]: https://lore.kernel.org/all/d2bdfbfd-3721-407f-991e-566d48392add@amd.com/ >>> >>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> >>> --- >>> >>> arch/microblaze/boot/dts/Makefile | 3 +- >>> arch/microblaze/boot/dts/system.dts | 353 ---------------------------- >>> 2 files changed, 1 insertion(+), 355 deletions(-) >>> delete mode 100644 arch/microblaze/boot/dts/system.dts >>> >>> diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile >>> index 932dc7550a1b..fa0a6c0854ca 100644 >>> --- a/arch/microblaze/boot/dts/Makefile >>> +++ b/arch/microblaze/boot/dts/Makefile >>> @@ -1,8 +1,6 @@ >>> # SPDX-License-Identifier: GPL-2.0 >>> # >>> >>> -dtb-y := system.dtb >>> - >>> ifneq ($(DTB),) >>> obj-y += linked_dtb.o >>> >>> @@ -11,6 +9,7 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb >>> >>> # Generate system.dtb from $(DTB).dtb >>> ifneq ($(DTB),system) >> >> Can't this be dropped as setting DTB=system.dtb should work if there's >> not an in-tree system.dts anymore. > > I believe this ifneq is necessary, just in case > a user adds system.dtb to arch/microblaze/boot/dts/. > > 'system.dtb' is a special name because > arch/microblaze/boot/dts/linked_dtb.S wraps it. > > So, $(DTB) is copied to system.dtb, and then > it is wrapped by linked_dtb.S. > > If $(DTB) is already 'system', > we cannot copy system.dtb to itself. > > > See the definition of cmd_copy in scripts/Makefile.lib > > cmd_copy = cat $< > $@ > > > "cat system.dtb > system.dtb" > would create an empty system.dtb > I have played with this and pretty much this patch is blocking simpleImage.system build target. I have no issue with patches 1-3 and I would keep system.dts as empty and keep it in the tree because users (including me) just rewrite system.dts with proper DTS and call make simpleImage.system. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP/Versal ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal/Versal NET SoCs TF-A maintainer - Xilinx ZynqMP/Versal/Versal NET SoCs ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] microblaze: remove unnecessary system.dts 2025-02-03 11:17 ` Michal Simek @ 2025-05-13 4:50 ` Masahiro Yamada 2025-06-10 7:49 ` Michal Simek 0 siblings, 1 reply; 9+ messages in thread From: Masahiro Yamada @ 2025-05-13 4:50 UTC (permalink / raw) To: Michal Simek Cc: Rob Herring, Simek, Michal, linux-kernel, Conor Dooley, Krzysztof Kozlowski, devicetree On Mon, Feb 3, 2025 at 8:17 PM Michal Simek <monstr@monstr.eu> wrote: > > > > On 2/1/25 04:42, Masahiro Yamada wrote: > > On Sat, Feb 1, 2025 at 7:25 AM Rob Herring <robh@kernel.org> wrote: > >> > >> On Tue, Jan 14, 2025 at 12:15 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > >>> > >>> The default image linux.bin does not contain any DTB, but a separate > >>> system.dtb is compiled. > >>> > >>> Michal Simek clearly explained "system.dtb is really old dtb more for > >>> demonstration purpose and nothing else and likely it is not working on > >>> any existing board." [1] > >>> > >>> The system.dts is not necessary even for demonstration purposes. There > >>> is no need to compile out-of-tree *.dts under arch/microblaze/boot/dts/ > >>> unless it is embedded into the kernel. Users can directly use dtc. > >>> > >>> [1]: https://lore.kernel.org/all/d2bdfbfd-3721-407f-991e-566d48392add@amd.com/ > >>> > >>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > >>> --- > >>> > >>> arch/microblaze/boot/dts/Makefile | 3 +- > >>> arch/microblaze/boot/dts/system.dts | 353 ---------------------------- > >>> 2 files changed, 1 insertion(+), 355 deletions(-) > >>> delete mode 100644 arch/microblaze/boot/dts/system.dts > >>> > >>> diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile > >>> index 932dc7550a1b..fa0a6c0854ca 100644 > >>> --- a/arch/microblaze/boot/dts/Makefile > >>> +++ b/arch/microblaze/boot/dts/Makefile > >>> @@ -1,8 +1,6 @@ > >>> # SPDX-License-Identifier: GPL-2.0 > >>> # > >>> > >>> -dtb-y := system.dtb > >>> - > >>> ifneq ($(DTB),) > >>> obj-y += linked_dtb.o > >>> > >>> @@ -11,6 +9,7 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb > >>> > >>> # Generate system.dtb from $(DTB).dtb > >>> ifneq ($(DTB),system) > >> > >> Can't this be dropped as setting DTB=system.dtb should work if there's > >> not an in-tree system.dts anymore. > > > > I believe this ifneq is necessary, just in case > > a user adds system.dtb to arch/microblaze/boot/dts/. > > > > 'system.dtb' is a special name because > > arch/microblaze/boot/dts/linked_dtb.S wraps it. > > > > So, $(DTB) is copied to system.dtb, and then > > it is wrapped by linked_dtb.S. > > > > If $(DTB) is already 'system', > > we cannot copy system.dtb to itself. > > > > > > See the definition of cmd_copy in scripts/Makefile.lib > > > > cmd_copy = cat $< > $@ > > > > > > "cat system.dtb > system.dtb" > > would create an empty system.dtb > > > > I have played with this and pretty much this patch is blocking > simpleImage.system build target. > > I have no issue with patches 1-3 and I would keep system.dts as empty and keep > it in the tree because users (including me) just rewrite system.dts with proper > DTS and call make simpleImage.system. Why is "system" so special? You hard-code this line: dtb-y := system.dtb "make simpleImage.system" compiles system.dts to system.dtb However, "make simpleImage.foo" does not compile foo.dts to foo.dtb since "dtb-y := foo.dtb" is missing. This works only if you drop-in a pre-compiled foo.dtb "make simpleImage.<name>" works only when <name> is "system". Is this what you mean? -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] microblaze: remove unnecessary system.dts 2025-05-13 4:50 ` Masahiro Yamada @ 2025-06-10 7:49 ` Michal Simek 0 siblings, 0 replies; 9+ messages in thread From: Michal Simek @ 2025-06-10 7:49 UTC (permalink / raw) To: Masahiro Yamada, Michal Simek Cc: Rob Herring, linux-kernel, Conor Dooley, Krzysztof Kozlowski, devicetree On 5/13/25 06:50, Masahiro Yamada wrote: > On Mon, Feb 3, 2025 at 8:17 PM Michal Simek <monstr@monstr.eu> wrote: >> >> >> >> On 2/1/25 04:42, Masahiro Yamada wrote: >>> On Sat, Feb 1, 2025 at 7:25 AM Rob Herring <robh@kernel.org> wrote: >>>> >>>> On Tue, Jan 14, 2025 at 12:15 PM Masahiro Yamada <masahiroy@kernel.org> wrote: >>>>> >>>>> The default image linux.bin does not contain any DTB, but a separate >>>>> system.dtb is compiled. >>>>> >>>>> Michal Simek clearly explained "system.dtb is really old dtb more for >>>>> demonstration purpose and nothing else and likely it is not working on >>>>> any existing board." [1] >>>>> >>>>> The system.dts is not necessary even for demonstration purposes. There >>>>> is no need to compile out-of-tree *.dts under arch/microblaze/boot/dts/ >>>>> unless it is embedded into the kernel. Users can directly use dtc. >>>>> >>>>> [1]: https://lore.kernel.org/all/d2bdfbfd-3721-407f-991e-566d48392add@amd.com/ >>>>> >>>>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> >>>>> --- >>>>> >>>>> arch/microblaze/boot/dts/Makefile | 3 +- >>>>> arch/microblaze/boot/dts/system.dts | 353 ---------------------------- >>>>> 2 files changed, 1 insertion(+), 355 deletions(-) >>>>> delete mode 100644 arch/microblaze/boot/dts/system.dts >>>>> >>>>> diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile >>>>> index 932dc7550a1b..fa0a6c0854ca 100644 >>>>> --- a/arch/microblaze/boot/dts/Makefile >>>>> +++ b/arch/microblaze/boot/dts/Makefile >>>>> @@ -1,8 +1,6 @@ >>>>> # SPDX-License-Identifier: GPL-2.0 >>>>> # >>>>> >>>>> -dtb-y := system.dtb >>>>> - >>>>> ifneq ($(DTB),) >>>>> obj-y += linked_dtb.o >>>>> >>>>> @@ -11,6 +9,7 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb >>>>> >>>>> # Generate system.dtb from $(DTB).dtb >>>>> ifneq ($(DTB),system) >>>> >>>> Can't this be dropped as setting DTB=system.dtb should work if there's >>>> not an in-tree system.dts anymore. >>> >>> I believe this ifneq is necessary, just in case >>> a user adds system.dtb to arch/microblaze/boot/dts/. >>> >>> 'system.dtb' is a special name because >>> arch/microblaze/boot/dts/linked_dtb.S wraps it. >>> >>> So, $(DTB) is copied to system.dtb, and then >>> it is wrapped by linked_dtb.S. >>> >>> If $(DTB) is already 'system', >>> we cannot copy system.dtb to itself. >>> >>> >>> See the definition of cmd_copy in scripts/Makefile.lib >>> >>> cmd_copy = cat $< > $@ >>> >>> >>> "cat system.dtb > system.dtb" >>> would create an empty system.dtb >>> >> >> I have played with this and pretty much this patch is blocking >> simpleImage.system build target. >> >> I have no issue with patches 1-3 and I would keep system.dts as empty and keep >> it in the tree because users (including me) just rewrite system.dts with proper >> DTS and call make simpleImage.system. > > Why is "system" so special? > > You hard-code this line: > dtb-y := system.dtb > > > "make simpleImage.system" compiles system.dts to system.dtb yes. > However, > > "make simpleImage.foo" does not compile foo.dts to foo.dtb > since "dtb-y := foo.dtb" is missing. Correct but foo.dts is not in the source code too. Downstream repos can add multiple dtses to source code based on configurations which are supporting and then they add dtb-y += foo.dtb there. > This works only if you drop-in a pre-compiled foo.dtb as above. It is up to users to decide how they want to do it. If they add dts to source they have to also add a rule. If they want to just use DTB then can just copy it there to get it work. Another option is also just overwrite system.dts by custom dts file. > "make simpleImage.<name>" works only when <name> is "system". With upstream repo yes. And the reason is that system.dts is just example. In Microblaze systems you can have unlimited amount of configurations that's why make no sense to start to push DTSes to the kernel because it is only supporting one particular configuration on one board. Thanks, Michal ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-06-10 7:49 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-01-14 18:13 [PATCH 1/4] microblaze: fix 'FORCE prerequisite is missing' warning Masahiro Yamada 2025-01-14 18:13 ` [PATCH 2/4] microblaze: merge build rules for linux.bin and simpleImage.$(DTB) Masahiro Yamada 2025-01-14 18:13 ` [PATCH 3/4] microblaze: prevent linux.bin from containing a built-in DTB Masahiro Yamada 2025-01-14 18:13 ` [PATCH 4/4] microblaze: remove unnecessary system.dts Masahiro Yamada 2025-01-31 22:25 ` Rob Herring 2025-02-01 3:42 ` Masahiro Yamada 2025-02-03 11:17 ` Michal Simek 2025-05-13 4:50 ` Masahiro Yamada 2025-06-10 7:49 ` Michal Simek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).