Correct behavior of OF_OMIT_DTB
Subsystems (7)
cover Correct behavior of OF_OMIT_DTB
Hey all,
I've had this series kicking around locally since January, and I'm finally posting it now.
This series corrects how we handle OF_OMIT_DTB so that we can in turn not have an empty or fake dts file in the tree, when we are building for the case where we would be omitting building the final part of the dtb for use anyhow. This ends up taking a few steps. The first of which is that when we have mandatory passage enabled, we don't allow the fdt address to still be overriden. This goes along with reworking how the vexpress64 and mandatory passage support works. The overall effect here is the same, but the logic around it is now clearer. With these changes done, we can then correct the Kconfig logic around OF_OMIT_DTB and DEFAULT_DEVICE_TREE so that when we're omitting the device tree binary we don't try and build one anyhow. Finally, we can remove all of the empty / fake device tree sources we have, or in some cases have but never used.
Signature · 1 line
Tom
PATCH 1/7 lib/fdtdec.c: Disallow overriding the fdt address with mandatory passage
When we have CONFIG_BLOBLIST_PASSAGE_MANDATORY don't allow the device tree address to be overridden. The device tree we're given is the one that must be used.
---
Cc: Ilias Apalodimas <[email protected]>
Cc: Raymond Mao <[email protected]>
--- lib/fdtdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/fdtdec.c +2 -1
@@ -1856,7 +1856,8 @@ int fdtdec_setup(void) }/* Allow the board to override the fdt address. */ -if (IS_ENABLED (CONFIG_OF_BOARD )) { +if (IS_ENABLED (CONFIG_OF_BOARD ) && + !IS_ENABLED (CONFIG_BLOBLIST_PASSAGE_MANDATORY )) {void *blob; blob = (void *)gd->fdt_blob;
Signature · 1 line
2.43.0
Re: [PATCH 1/7] lib/fdtdec.c: Disallow overriding the fdt address with mandatory passage
Hi Tom,
Quoted 5 lines · Tom Rini
When we have
CONFIG_BLOBLIST_PASSAGE_MANDATORYdon't allow the device tree address to be overridden. The device tree we're given is the one that must be used.
The commit message does not explicitly mention this is only for OF_BOARD. So I think we need to add "!IS_ENABLED(CONFIG_BLOBLIST_PASSAGE_MANDATORY)" to the next check as well:
/* Allow the early environment to override the fdt address */
- if (!IS_ENABLED(CONFIG_XPL_BUILD)) {
+ if (!IS_ENABLED(CONFIG_XPL_BUILD) &&
+ !IS_ENABLED(CONFIG_BLOBLIST_PASSAGE_MANDATORY)) {
ulong addr;Or, state in the commit message that it is for OF_BOARD only.
Regards,
Raymond
Quoted 25 lines
Signed-off-by Tom Rini <[email protected]>---
Cc: Ilias Apalodimas <[email protected]>
Cc: Raymond Mao <[email protected]>--- lib/fdtdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)lib/fdtdec.c +2
-2@@ -1856,7 +1856,8 @@ int fdtdec_setup(void) }/* Allow the board to override the fdt address. */ -if (IS_ENABLED (CONFIG_OF_BOARD )) { +if (IS_ENABLED (CONFIG_OF_BOARD ) && + !IS_ENABLED (CONFIG_BLOBLIST_PASSAGE_MANDATORY )) {void *blob; blob = (void *)gd->fdt_blob; --2.43.0
Re: [PATCH 1/7] lib/fdtdec.c: Disallow overriding the fdt address with mandatory passage
Quoted 41 lines · Raymond Mao
Hi Tom,
Quoted 5 lines · Tom Rini
When we have
CONFIG_BLOBLIST_PASSAGE_MANDATORYdon't allow the device tree address to be overridden. The device tree we're given is the one that must be used.The commit message does not explicitly mention this is only for
OF_BOARD. So I think we need to add "!IS_ENABLED(CONFIG_BLOBLIST_PASSAGE_MANDATORY)" to the next check as well:/* Allow the early environment to override the fdt address */ - if (!IS_ENABLED(CONFIG_XPL_BUILD)) { + if (!IS_ENABLED(CONFIG_XPL_BUILD) && + !IS_ENABLED(CONFIG_BLOBLIST_PASSAGE_MANDATORY)) { ulong addr;Or, state in the commit message that it is for
OF_BOARDonly.Regards,
RaymondQuoted 15 lines
Signed-off-by Tom Rini <[email protected]>---
Cc: Ilias Apalodimas <[email protected]>
Cc: Raymond Mao <[email protected]>--- lib/fdtdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)lib/fdtdec.c +0
-0@@ -1856,7 +1856,8 @@ int fdtdec_setup(void) }
Quoted 7 lines
lib/fdtdec.c int fdtdec_setup(void) · line 1863
Quoted 7 lines
lib/fdtdec.c +2
-1/* Allow the board to override the fdt address. */ -if (IS_ENABLED (CONFIG_OF_BOARD )) { +if (IS_ENABLED (CONFIG_OF_BOARD ) && + !IS_ENABLED (CONFIG_BLOBLIST_PASSAGE_MANDATORY )) {void *blob; blob = (void *)gd->fdt_blob;
I might have to jump back to what the code looked like in January or so, to figure this out again. We never set OF_BOARD and BLOBLIST_PASSAGE_MANDATORY so this change here never matters. It might have been because I was doing this on top of the (now merged) rework of bloblist_init and bloblist_maybe_init. I'll look harder at this and post a v2, thanks!
Signature · 1 line
Tom
Re: [PATCH 1/7] lib/fdtdec.c: Disallow overriding the fdt address with mandatory passage
Quoted 48 lines · Tom Rini
Quoted 47 lines · Raymond Mao
Hi Tom,
Quoted 5 lines · Tom Rini
When we have
CONFIG_BLOBLIST_PASSAGE_MANDATORYdon't allow the device tree address to be overridden. The device tree we're given is the one that must be used.The commit message does not explicitly mention this is only for
OF_BOARD. So I think we need to add "!IS_ENABLED(CONFIG_BLOBLIST_PASSAGE_MANDATORY)" to the next check as well:/* Allow the early environment to override the fdt address */ - if (!IS_ENABLED(CONFIG_XPL_BUILD)) { + if (!IS_ENABLED(CONFIG_XPL_BUILD) && + !IS_ENABLED(CONFIG_BLOBLIST_PASSAGE_MANDATORY)) { ulong addr;Or, state in the commit message that it is for
OF_BOARDonly.Regards,
RaymondQuoted 21 lines
Signed-off-by Tom Rini <[email protected]>---
Cc: Ilias Apalodimas <[email protected]>
Cc: Raymond Mao <[email protected]>--- lib/fdtdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)lib/fdtdec.c +2
-1@@ -1856,7 +1856,8 @@ int fdtdec_setup(void) }/* Allow the board to override the fdt address. */ -if (IS_ENABLED (CONFIG_OF_BOARD )) { +if (IS_ENABLED (CONFIG_OF_BOARD ) && + !IS_ENABLED (CONFIG_BLOBLIST_PASSAGE_MANDATORY )) {void *blob;
Quoted 8 lines
Quoted 1 line
lib/fdtdec.c int fdtdec_setup(void) · line 1863
Quoted 1 line
lib/fdtdec.c +0
-0blob = (void *)gd->fdt_blob;I might have to jump back to what the code looked like in January or so, to figure this out again. We never set
OF_BOARDandBLOBLIST_PASSAGE_MANDATORYso this change here never matters. It might have been because I was doing this on top of the (now merged) rework ofbloblist_initandbloblist_maybe_init. I'll look harder at this and post a v2, thanks!
I see now why I did this, and because vexpress64_fvp_bloblist fails to build because it does enable OF_BOARD. So, there's two distinct problems here. One of which is that CONFIG_BLOBLIST_PASSAGE_MANDATORY can be, well, not mandatory in a few cases, and that's not intentional. With that fixed, we can then do what the rest of this series does, and fix OF_OMIT_DTB behavior. And then patch #2 that cleans up vexpress64 is also standalone.
Signature · 1 line
Tom
PATCH 2/7 vexpress64: Correct CONFIG symbol logic around device tree passage
In reply to Tom RiniWhen we don't have BLOBLIST_PASSAGE_MANDATORY enabled, then we're being passed the device tree in some other manner, via OF_HAS_PRIOR_STAGE. Correct our logic around which symbols are used to guard what is generated / used and when.
---
Cc: David Feng <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Peter Hoyes <[email protected]>
Cc: Raymond Mao <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
--- board/armltd/vexpress64/Kconfig | 2 +- board/armltd/vexpress64/Makefile | 2 ++ board/armltd/vexpress64/vexpress64.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-)
board/armltd/vexpress64/Kconfig +1 -1
@@ -31,7 +31,7 @@ choice config TARGET_VEXPRESS64_BASE_FVP bool "Support Versatile Express ARMv8a FVP BASE model" select VEXPRESS64_BASE_MODEL - imply OF_HAS_PRIOR_STAGE if !BLOBLIST + imply OF_HAS_PRIOR_STAGE config TARGET_VEXPRESS64_BASER_FVP bool "Support Versatile Express ARMv8r64 FVP BASE model"
board/armltd/vexpress64/Makefile +2 -0
@@ -5,6 +5,8 @@ obj-y := vexpress64.o +ifeq ($(CONFIG_BLOBLIST_PASSAGE_MANDATORY),) obj-$(CONFIG_OF_HAS_PRIOR_STAGE) += lowlevel_init.o +endif obj-$(CONFIG_TARGET_VEXPRESS64_JUNO) += pcie.o
board/armltd/vexpress64/vexpress64.c +2 -2
@@ -97,7 +97,7 @@ int dram_init_banksize(void)* Push the variable into the .data section so that it * does not get cleared later. */ -#ifdef CONFIG_OF_HAS_PRIOR_STAGE +#ifndef CONFIG_BLOBLIST_PASSAGE_MANDATORY unsigned long __section(".data") prior_stage_fdt_address[2];#endif
@@ -150,7 +150,7 @@ static phys_addr_t find_dtb_in_nor_flash(const char *partname) }#endif -#ifdef CONFIG_OF_HAS_PRIOR_STAGE +#ifndef CONFIG_BLOBLIST_PASSAGE_MANDATORY /* * Filter for a valid DTB, as TF-A happens to provide a pointer to some * data structure using the DTB format, which we cannot use.
Signature · 1 line
2.43.0
Re: [PATCH 2/7] vexpress64: Correct CONFIG symbol logic around device tree passage
Hi Tom,
Quoted 13 lines · Tom Rini
When we don't have
BLOBLIST_PASSAGE_MANDATORYenabled, then we're being passed the device tree in some other manner, viaOF_HAS_PRIOR_STAGE. Correct our logic around which symbols are used to guard what is generated / used and when.Signed-off-by Tom Rini <[email protected]>---
Cc: David Feng <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Peter Hoyes <[email protected]>
Cc: Raymond Mao <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Quoted 6 lines
--- board/armltd/vexpress64/Kconfig | 2 +- board/armltd/vexpress64/Makefile | 2 ++ board/armltd/vexpress64/vexpress64.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-)
Sounds good to me.
Regards,
Raymond
Quoted 51 lines
board/armltd/vexpress64/Kconfig +1
-1@@ -31,7 +31,7 @@ choice config TARGET_VEXPRESS64_BASE_FVP bool "Support Versatile Express ARMv8a FVP BASE model" select VEXPRESS64_BASE_MODEL - imply OF_HAS_PRIOR_STAGE if !BLOBLIST + imply OF_HAS_PRIOR_STAGE config TARGET_VEXPRESS64_BASER_FVP bool "Support Versatile Express ARMv8r64 FVP BASE model"board/armltd/vexpress64/Makefile +2
-0@@ -5,6 +5,8 @@ obj-y := vexpress64.o +ifeq ($(CONFIG_BLOBLIST_PASSAGE_MANDATORY),) obj-$(CONFIG_OF_HAS_PRIOR_STAGE) += lowlevel_init.o +endif obj-$(CONFIG_TARGET_VEXPRESS64_JUNO) += pcie.oboard/armltd/vexpress64/vexpress64.c +2
-3@@ -97,7 +97,7 @@ int dram_init_banksize(void)* Push the variable into the .data section so that it * does not get cleared later. */ -#ifdef CONFIG_OF_HAS_PRIOR_STAGE +#ifndef CONFIG_BLOBLIST_PASSAGE_MANDATORY unsigned long __section(".data") prior_stage_fdt_address[2];#endif @@ -150,7 +150,7 @@ static phys_addr_t find_dtb_in_nor_flash(const char *partname) }#endif -#ifdef CONFIG_OF_HAS_PRIOR_STAGE +#ifndef CONFIG_BLOBLIST_PASSAGE_MANDATORY /* * Filter for a valid DTB, as TF-A happens to provide a pointer to some * data structure using the DTB format, which we cannot use. -- 2.43.0
Re: [PATCH 2/7] vexpress64: Correct CONFIG symbol logic around device tree passage
In reply to Tom RiniQuoted 6 lines · Tom Rini
When we don't have
BLOBLIST_PASSAGE_MANDATORYenabled, then we're being passed the device tree in some other manner, viaOF_HAS_PRIOR_STAGE. Correct our logic around which symbols are used to guard what is generated / used and when.
Quoted 8 lines
Signed-off-by Tom Rini <[email protected]>---
Cc: David Feng <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Peter Hoyes <[email protected]>
Cc: Raymond Mao <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
---
Quoted 56 lines
board/armltd/vexpress64/Kconfig | 2 +- board/armltd/vexpress64/Makefile | 2 ++ board/armltd/vexpress64/vexpress64.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-)board/armltd/vexpress64/Kconfig +1
-1@@ -31,7 +31,7 @@ choice config TARGET_VEXPRESS64_BASE_FVP bool "Support Versatile Express ARMv8a FVP BASE model" select VEXPRESS64_BASE_MODEL - imply OF_HAS_PRIOR_STAGE if !BLOBLIST + imply OF_HAS_PRIOR_STAGE config TARGET_VEXPRESS64_BASER_FVP bool "Support Versatile Express ARMv8r64 FVP BASE model"board/armltd/vexpress64/Makefile +2
-0@@ -5,6 +5,8 @@ obj-y := vexpress64.o +ifeq ($(CONFIG_BLOBLIST_PASSAGE_MANDATORY),) obj-$(CONFIG_OF_HAS_PRIOR_STAGE) += lowlevel_init.o +endif obj-$(CONFIG_TARGET_VEXPRESS64_JUNO) += pcie.oboard/armltd/vexpress64/vexpress64.c +2
-3@@ -97,7 +97,7 @@ int dram_init_banksize(void)* Push the variable into the .data section so that it * does not get cleared later. */ -#ifdef CONFIG_OF_HAS_PRIOR_STAGE +#ifndef CONFIG_BLOBLIST_PASSAGE_MANDATORY unsigned long __section(".data") prior_stage_fdt_address[2];#endif @@ -150,7 +150,7 @@ static phys_addr_t find_dtb_in_nor_flash(const char *partname) }#endif -#ifdef CONFIG_OF_HAS_PRIOR_STAGE +#ifndef CONFIG_BLOBLIST_PASSAGE_MANDATORY /* * Filter for a valid DTB, as TF-A happens to provide a pointer to some * data structure using the DTB format, which we cannot use. -- 2.43.0
PATCH 3/7 dts: Correct behavior of OF_OMIT_DTB
In reply to Tom RiniWhen we have enabled CONFIG_OF_OMIT_DTB, we really should then be not forcing a device tree to be built. This involves two things. First, when OF_SEPARATE is set, don't say we still need to build dts/dt.dtb. Second, our init_sp_bss_offset_check check can only cover the non-dtb portion.
--- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
Makefile +9 -2
@@ -1237,7 +1237,7 @@ INPUTS-$(CONFIG_TPL) += tpl/u-boot-tpl.bin INPUTS-$(CONFIG_VPL) += vpl/u-boot-vpl.bin # Allow omitting the .dtb output if it is not normally used -INPUTS-$(CONFIG_OF_SEPARATE) += $(if $(CONFIG_OF_OMIT_DTB),dts/dt.dtb,u-boot.dtb) +INPUTS-$(CONFIG_OF_SEPARATE) += $(if $(CONFIG_OF_OMIT_DTB),,u-boot.dtb) ifeq ($(CONFIG_SPL_FRAMEWORK),y) INPUTS-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img endif
@@ -1614,12 +1614,18 @@ endif # The 1/4 margin below is somewhat arbitrary. The likely initial SP usage is # so low that the DTB could probably use 90%+ of the available space, for # current values of CONFIG_SYS_INIT_SP_BSS_OFFSET at least. However, let's be -# safe for now and tweak this later if space becomes tight. +# safe for now and tweak this later if space becomes tight. When we omit the +# DTB we simply have to have accounted for this when configuring U-Boot. # A rejected alternative would be to check that some absolute minimum stack # space was available. However, since CONFIG_SYS_INIT_SP_BSS_OFFSET is # deliberately build-specific, to take account of build-to-build stack usage # differences due to different feature sets, there is no common absolute value # to check against. +ifneq ($(CONFIG_OF_OMIT_DTB),) +init_sp_bss_offset_check: FORCE + space=$(CONFIG_SYS_INIT_SP_BSS_OFFSET) ; \ + $(subtract_sys_malloc_f_len) +else init_sp_bss_offset_check: u-boot.dtb FORCE @dtb_size=$(shell wc -c u-boot.dtb | awk '{print $$1}') ; \ space=$(CONFIG_SYS_INIT_SP_BSS_OFFSET) ; \
@@ -1631,6 +1637,7 @@ init_sp_bss_offset_check: u-boot.dtb FORCE exit 1 ; \ fi endif +endif shell_cmd = { $(call echo-cmd,$(1)) $(cmd_$(1)); }
Signature · 1 line
2.43.0
PATCH 4/7 dts: Make DEFAULT_DEVICE_TREE depend on !OF_OMIT_DTB
In reply to Tom RiniWhen we have configured the board to not omit a DTB as part of the build, we should not have to say that we still need to build a default DTB for the board.
--- dts/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
dts/Kconfig +1 -1
@@ -216,7 +216,7 @@ config OF_OMIT_DTB config DEFAULT_DEVICE_TREE string "Default Device Tree for DT control" - depends on OF_CONTROL + depends on OF_CONTROL && !OF_OMIT_DTB default "sandbox" if SANDBOX help This option specifies the default Device Tree used for DT control.
Signature · 1 line
2.43.0
PATCH 5/7 dts: Correct entry for OF_OMIT_DTB
In reply to Tom RiniWhen we omit writing a device tree file is not something that should be prompted for but rather it should be selected when needed, and the "default y if ..." conditions should be used for when this should be enabled without being selected.
--- dts/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
dts/Kconfig +1 -2
@@ -205,8 +205,7 @@ config OF_HAS_PRIOR_STAGE disabled in the board's defconfig file. config OF_OMIT_DTB - bool "Omit the device tree output when building" - default y if OF_HAS_PRIOR_STAGE && !BINMAN + def_bool y if OF_HAS_PRIOR_STAGE && !BINMAN help As a special case, avoid writing a device tree file u-boot.dtb when building. Also don't include that file in u-boot.bin
Signature · 1 line
2.43.0
PATCH 6/7 powerpc: drop qemu-ppce500 dts
In reply to Tom RiniNow that we are not building this device tree, we can drop it from the tree.
--- arch/powerpc/dts/Makefile | 1 - arch/powerpc/dts/qemu-ppce500.dts | 10 ---------- 2 files changed, 11 deletions(-) delete mode 100644 arch/powerpc/dts/qemu-ppce500.dts
arch/powerpc/dts/Makefile +0 -1
@@ -17,7 +17,6 @@ dtb-$(CONFIG_TARGET_P2020RDB) += p2020rdb-pc.dtb p2020rdb-pc_36b.dtb dtb-$(CONFIG_TARGET_P3041DS) += p3041ds.dtb dtb-$(CONFIG_TARGET_P4080DS) += p4080ds.dtb dtb-$(CONFIG_TARGET_P5040DS) += p5040ds.dtb -dtb-$(CONFIG_TARGET_QEMU_PPCE500) += qemu-ppce500.dtb dtb-$(CONFIG_TARGET_SOCRATES) += socrates.dtb dtb-$(CONFIG_TARGET_T1024RDB) += t1024rdb.dtb dtb-$(CONFIG_TARGET_T1042D4RDB) += t1042d4rdb.dtb
arch/powerpc/dts/qemu-ppce500.dts deleted +0 -10
@@ -1,10 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ OR MIT -/* - * Empty device tree for qemu-ppce400 - * - * Copyright 2021 Google LLC - */ -/dts-v1/; - -/ { -};
Signature · 1 line
2.43.0
PATCH 7/7 arm: Drop unused dts files
In reply to Tom RiniNow that we do not require device tree files to be built when OF_OMIT_DTB is set, we can remove a number of unused dts files.
--- arch/arm/dts/Makefile | 27 +- arch/arm/dts/arm_fvp.dts | 11 - arch/arm/dts/bcm2711-rpi-4-b.dts | 262 ----- arch/arm/dts/bcm2711-rpi.dtsi | 74 -- arch/arm/dts/bcm2711.dtsi | 1100 ------------------ arch/arm/dts/bcm2835-common.dtsi | 207 ---- arch/arm/dts/bcm2835-rpi-a-plus.dts | 128 -- arch/arm/dts/bcm2835-rpi-a.dts | 123 -- arch/arm/dts/bcm2835-rpi-b-plus.dts | 130 --- arch/arm/dts/bcm2835-rpi-b-rev2.dts | 123 -- arch/arm/dts/bcm2835-rpi-b.dts | 118 -- arch/arm/dts/bcm2835-rpi-cm1-io1.dts | 97 -- arch/arm/dts/bcm2835-rpi-cm1.dtsi | 39 - arch/arm/dts/bcm2835-rpi-common.dtsi | 12 - arch/arm/dts/bcm2835-rpi-zero-w.dts | 151 --- arch/arm/dts/bcm2835-rpi-zero.dts | 119 -- arch/arm/dts/bcm2835-rpi.dtsi | 81 -- arch/arm/dts/bcm2835.dtsi | 38 - arch/arm/dts/bcm2836-rpi-2-b.dts | 130 --- arch/arm/dts/bcm2836-rpi.dtsi | 6 - arch/arm/dts/bcm2836.dtsi | 92 -- arch/arm/dts/bcm2837-rpi-3-a-plus.dts | 180 --- arch/arm/dts/bcm2837-rpi-3-b-plus.dts | 183 --- arch/arm/dts/bcm2837-rpi-3-b.dts | 176 --- arch/arm/dts/bcm2837-rpi-cm3-io3.dts | 96 -- arch/arm/dts/bcm2837-rpi-cm3.dtsi | 61 - arch/arm/dts/bcm2837.dtsi | 95 -- arch/arm/dts/bcm283x-rpi-lan7515.dtsi | 41 - arch/arm/dts/bcm283x-rpi-smsc9512.dtsi | 20 - arch/arm/dts/bcm283x-rpi-smsc9514.dtsi | 19 - arch/arm/dts/bcm283x-rpi-usb-host.dtsi | 3 - arch/arm/dts/bcm283x-rpi-usb-otg.dtsi | 11 - arch/arm/dts/bcm283x-rpi-usb-peripheral.dtsi | 7 - arch/arm/dts/bcm283x-u-boot.dtsi | 29 - arch/arm/dts/bcm283x.dtsi | 501 -------- arch/arm/dts/bcm7xxx.dts | 15 - arch/arm/dts/highbank.dts | 9 - arch/arm/dts/octeontx.dts | 14 - arch/arm/dts/qemu-arm.dts | 11 - arch/arm/dts/xenguest-arm64.dts | 15 - 40 files changed, 1 insertion(+), 4553 deletions(-) delete mode 100644 arch/arm/dts/arm_fvp.dts delete mode 100644 arch/arm/dts/bcm2711-rpi-4-b.dts delete mode 100644 arch/arm/dts/bcm2711-rpi.dtsi delete mode 100644 arch/arm/dts/bcm2711.dtsi delete mode 100644 arch/arm/dts/bcm2835-common.dtsi delete mode 100644 arch/arm/dts/bcm2835-rpi-a-plus.dts delete mode 100644 arch/arm/dts/bcm2835-rpi-a.dts delete mode 100644 arch/arm/dts/bcm2835-rpi-b-plus.dts delete mode 100644 arch/arm/dts/bcm2835-rpi-b-rev2.dts delete mode 100644 arch/arm/dts/bcm2835-rpi-b.dts delete mode 100644 arch/arm/dts/bcm2835-rpi-cm1-io1.dts delete mode 100644 arch/arm/dts/bcm2835-rpi-cm1.dtsi delete mode 100644 arch/arm/dts/bcm2835-rpi-common.dtsi delete mode 100644 arch/arm/dts/bcm2835-rpi-zero-w.dts delete mode 100644 arch/arm/dts/bcm2835-rpi-zero.dts delete mode 100644 arch/arm/dts/bcm2835-rpi.dtsi delete mode 100644 arch/arm/dts/bcm2835.dtsi delete mode 100644 arch/arm/dts/bcm2836-rpi-2-b.dts delete mode 100644 arch/arm/dts/bcm2836-rpi.dtsi delete mode 100644 arch/arm/dts/bcm2836.dtsi delete mode 100644 arch/arm/dts/bcm2837-rpi-3-a-plus.dts delete mode 100644 arch/arm/dts/bcm2837-rpi-3-b-plus.dts delete mode 100644 arch/arm/dts/bcm2837-rpi-3-b.dts delete mode 100644 arch/arm/dts/bcm2837-rpi-cm3-io3.dts delete mode 100644 arch/arm/dts/bcm2837-rpi-cm3.dtsi delete mode 100644 arch/arm/dts/bcm2837.dtsi delete mode 100644 arch/arm/dts/bcm283x-rpi-lan7515.dtsi delete mode 100644 arch/arm/dts/bcm283x-rpi-smsc9512.dtsi delete mode 100644 arch/arm/dts/bcm283x-rpi-smsc9514.dtsi delete mode 100644 arch/arm/dts/bcm283x-rpi-usb-host.dtsi delete mode 100644 arch/arm/dts/bcm283x-rpi-usb-otg.dtsi delete mode 100644 arch/arm/dts/bcm283x-rpi-usb-peripheral.dtsi delete mode 100644 arch/arm/dts/bcm283x-u-boot.dtsi delete mode 100644 arch/arm/dts/bcm283x.dtsi delete mode 100644 arch/arm/dts/bcm7xxx.dts delete mode 100644 arch/arm/dts/highbank.dts delete mode 100644 arch/arm/dts/octeontx.dts delete mode 100644 arch/arm/dts/qemu-arm.dts delete mode 100644 arch/arm/dts/xenguest-arm64.dts
arch/arm/dts/Makefile +1 -26
@@ -835,8 +835,6 @@ dtb-$(CONFIG_MX7) += imx7d-sdb.dtb \ dtb-$(CONFIG_ARCH_MX7ULP) += imx7ulp-com.dtb \ imx7ulp-evk.dtb -dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb - dtb-$(CONFIG_ARCH_IMX8) += \ fsl-imx8qm-apalis.dtb \ fsl-imx8qm-mek.dtb \
@@ -963,28 +961,10 @@ dtb-$(CONFIG_TARGET_SAMA5D4_XPLAINED) += \ dtb-$(CONFIG_TARGET_VINCO) += \ at91-vinco.dtb -dtb-$(CONFIG_ARCH_BCM283X) += \ - bcm2835-rpi-a.dtb \ - bcm2835-rpi-a-plus.dtb \ - bcm2835-rpi-b.dtb \ - bcm2835-rpi-b-plus.dtb \ - bcm2835-rpi-b-rev2.dtb \ - bcm2835-rpi-cm1-io1.dtb \ - bcm2835-rpi-zero.dtb \ - bcm2835-rpi-zero-w.dtb\ - bcm2836-rpi-2-b.dtb \ - bcm2837-rpi-3-a-plus.dtb \ - bcm2837-rpi-3-b.dtb \ - bcm2837-rpi-3-b-plus.dtb \ - bcm2837-rpi-cm3-io3.dtb \ - bcm2711-rpi-4-b.dtb - dtb-$(CONFIG_TARGET_BCMNS) += ns-board.dtb dtb-$(CONFIG_TARGET_BCMNS3) += ns3-board.dtb -dtb-$(CONFIG_ARCH_BCMSTB) += bcm7xxx.dtb - dtb-$(CONFIG_BCM47622) += \ bcm947622.dtb dtb-$(CONFIG_BCM4908) += \
@@ -1099,10 +1079,6 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ dtb-$(CONFIG_ARCH_NPCM7xx) += nuvoton-npcm750-evb.dtb dtb-$(CONFIG_ARCH_NPCM8XX) += nuvoton-npcm845-evb.dtb -dtb-$(CONFIG_XEN) += xenguest-arm64.dtb - -dtb-$(CONFIG_ARCH_OCTEONTX) += octeontx.dtb -dtb-$(CONFIG_ARCH_OCTEONTX2) += octeontx.dtb dtb-$(CONFIG_TARGET_GE_BX50V3) += \ imx6q-bx50v3.dtb \
@@ -1117,7 +1093,6 @@ dtb-$(CONFIG_TARGET_MX53PPD) += imx53-ppd.dtb # Kconfig option to build all of these. See examples above. dtb-$(CONFIG_TARGET_VEXPRESS_CA9X4) += vexpress-v2p-ca9.dtb dtb-$(CONFIG_TARGET_VEXPRESS64_BASE_FVP) += fvp-base-revc.dtb -dtb-$(CONFIG_TARGET_VEXPRESS64_BASER_FVP) += arm_fvp.dtb dtb-$(CONFIG_TARGET_VEXPRESS64_JUNO) += juno-r2.dtb dtb-$(CONFIG_TARGET_TOTAL_COMPUTE) += total_compute.dtb
@@ -1163,7 +1138,7 @@ endif dtb-$(CONFIG_TARGET_EA_LPC3250DEVKITV2) += lpc3250-ea3250.dtb -dtb-$(CONFIG_ARCH_QEMU) += qemu-arm.dtb qemu-arm64.dtb +dtb-$(CONFIG_TARGET_QEMU_ARM_64BIT) += qemu-arm64.dtb dtb-$(CONFIG_TARGET_CORSTONE1000) += corstone1000-mps3.dtb \ corstone1000-fvp.dtb
arch/arm/dts/arm_fvp.dts deleted +0 -11
@@ -1,11 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ OR MIT -/* - * Empty device tree for the Arm Ltd FVP platform model - - * Copyright 2022 Arm Ltd. - */ - -/dts-v1/; - -/ { -};
arch/arm/dts/bcm2711-rpi-4-b.dts deleted +0 -262
262 lines not on this page · raw message
arch/arm/dts/bcm2711-rpi.dtsi deleted +0 -74
74 lines not on this page · raw message
arch/arm/dts/bcm2711.dtsi deleted +0 -1100
1,100 lines not on this page · raw message
arch/arm/dts/bcm2835-common.dtsi deleted +0 -207
207 lines not on this page · raw message
arch/arm/dts/bcm2835-rpi-a-plus.dts deleted +0 -128
128 lines not on this page · raw message
arch/arm/dts/bcm2835-rpi-a.dts deleted +0 -123
123 lines not on this page · raw message
arch/arm/dts/bcm2835-rpi-b-plus.dts deleted +0 -130
130 lines not on this page · raw message
arch/arm/dts/bcm2835-rpi-b-rev2.dts deleted +0 -123
123 lines not on this page · raw message
arch/arm/dts/bcm2835-rpi-b.dts deleted +0 -118
118 lines not on this page · raw message
arch/arm/dts/bcm2835-rpi-cm1-io1.dts deleted +0 -97
97 lines not on this page · raw message
arch/arm/dts/bcm2835-rpi-cm1.dtsi deleted +0 -39
@@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/dts-v1/; -#include "bcm2835.dtsi" -#include "bcm2835-rpi.dtsi" - -/ { - leds { - led-act { - gpios = <&gpio 47 GPIO_ACTIVE_LOW>; - }; - }; - - memory@0 { - device_type = "memory"; - reg = <0 0x20000000>; - }; - - reg_3v3: fixed-regulator { - compatible = "regulator-fixed"; - regulator-name = "3V3"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - - reg_1v8: fixed-regulator { - compatible = "regulator-fixed"; - regulator-name = "1V8"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - }; -}; - -&sdhost { - non-removable; - vmmc-supply = <®_3v3>; - vqmmc-supply = <®_1v8>; -};
arch/arm/dts/bcm2835-rpi-common.dtsi deleted +0 -12
@@ -1,12 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * This include file covers the common peripherals and configuration between - * bcm2835, bcm2836 and bcm2837 implementations that interact with RPi's - * firmware interface. - */ - -#include <dt-bindings/power/raspberrypi-power.h> - -&v3d { - power-domains = <&power RPI_POWER_DOMAIN_V3D>; -};
arch/arm/dts/bcm2835-rpi-zero-w.dts deleted +0 -151
151 lines not on this page · raw message
arch/arm/dts/bcm2835-rpi-zero.dts deleted +0 -119
119 lines not on this page · raw message
arch/arm/dts/bcm2835-rpi.dtsi deleted +0 -81
81 lines not on this page · raw message
arch/arm/dts/bcm2835.dtsi deleted +0 -38
@@ -1,38 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -#include "bcm283x.dtsi" -#include "bcm2835-common.dtsi" -#include "bcm2835-rpi-common.dtsi" - -/ { - compatible = "brcm,bcm2835"; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - compatible = "arm,arm1176jzf-s"; - reg = <0x0>; - }; - }; - - soc { - ranges = <0x7e000000 0x20000000 0x02000000>; - dma-ranges = <0x40000000 0x00000000 0x20000000>; - }; - - arm-pmu { - compatible = "arm,arm1176-pmu"; - }; -}; - -&cpu_thermal { - coefficients = <(-538) 407000>; -}; - -/* enable thermal sensor with the correct compatible property set */ -&thermal { - compatible = "brcm,bcm2835-thermal"; - status = "okay"; -};
arch/arm/dts/bcm2836-rpi-2-b.dts deleted +0 -130
126 lines not on this page · raw message
arch/arm/dts/bcm2836.dtsi deleted +0 -92
92 lines not on this page · raw message
arch/arm/dts/bcm2837-rpi-3-a-plus.dts deleted +0 -180
180 lines not on this page · raw message
arch/arm/dts/bcm2837-rpi-3-b-plus.dts deleted +0 -183
183 lines not on this page · raw message
arch/arm/dts/bcm2837-rpi-3-b.dts deleted +0 -176
176 lines not on this page · raw message
arch/arm/dts/bcm2837-rpi-cm3-io3.dts deleted +0 -96
96 lines not on this page · raw message
arch/arm/dts/bcm2837-rpi-cm3.dtsi deleted +0 -61
61 lines not on this page · raw message
arch/arm/dts/bcm2837.dtsi deleted +0 -95
95 lines not on this page · raw message
arch/arm/dts/bcm283x-rpi-lan7515.dtsi deleted +0 -41
41 lines not on this page · raw message
arch/arm/dts/bcm283x-rpi-smsc9512.dtsi deleted +0 -20
Lines of this file are not shown. View the raw message.
arch/arm/dts/bcm283x-rpi-smsc9514.dtsi deleted +0 -19
Lines of this file are not shown. View the raw message.
arch/arm/dts/bcm283x-rpi-usb-host.dtsi deleted +0 -3
Lines of this file are not shown. View the raw message.
arch/arm/dts/bcm283x-rpi-usb-otg.dtsi deleted +0 -11
Lines of this file are not shown. View the raw message.
arch/arm/dts/bcm283x-rpi-usb-peripheral.dtsi deleted +0 -7
Lines of this file are not shown. View the raw message.
arch/arm/dts/bcm283x-u-boot.dtsi deleted +0 -29
Lines of this file are not shown. View the raw message.
arch/arm/dts/bcm283x.dtsi deleted +0 -501
501 lines not on this page · raw message
arch/arm/dts/xenguest-arm64.dts deleted +0 -15
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.43.0
Part of the diff is not shown here. View the raw message.
v2 cover Correct behavior of BLOBLIST_PASSAGE_MANDATORY
In reply to Tom RiniHey all,
This is v2 of
https://lore.kernel.org/u-boot/[email protected]/
which I've also split in to two series, with the second depending on this.
When we have mandatory passage enabled, we don't allow the fdt address to still be overriden. This is mostly working today but there are corner cases where it could still be overriden. Correct that by enforcing that if we don't find the device tree in the bloblist (when BLOBLIST_PASSAGE_MANDATORY is enabled) we error out. With that done, we can rework how the vexpress64 and mandatory passage support works as it wasn't using the correct symbols either for this case.
Signature · 1 line
Tom
PATCH v2 1/2 lib/fdtdec.c: Disallow overriding BLOBLIST_PASSAGE_MANDATORY
When we have CONFIG_BLOBLIST_PASSAGE_MANDATORY enabled, we don't allow the device tree address to be overridden. However, in fdtdec_setup() we had been allowing for various cases of not having found the device tree in the bloblist, or overriding it, to be possible. Add a check after the bloblist check such that if we have enabled BLOBLIST_PASSAGE_MANDATORY we return an error at that point.
---
Changes in v2:
- Based on Raymond's feedback to v1, look harder at this code again and introduce a single check earlier on to cause fdtdec_setup to bail out in the case of BLOBLIST_PASSAGE_MANDATORY and not found.
--- lib/fdtdec.c | 7 +++++++ 1 file changed, 7 insertions(+)
lib/fdtdec.c +7 -0
@@ -1845,6 +1845,13 @@ int fdtdec_setup(void) } } +/* +* If we have bloblist being required to pass the FDT and we reach this +* point, we have a problem and must exit. +*/ +if (IS_ENABLED (CONFIG_BLOBLIST_PASSAGE_MANDATORY )) +return ret; +/* Otherwise, the devicetree is typically appended to U-Boot */ if (ret) {if (IS_ENABLED (CONFIG_OF_SEPARATE )) {
Signature · 1 line
2.43.0
Re: [PATCH v2 1/2] lib/fdtdec.c: Disallow overriding BLOBLIST_PASSAGE_MANDATORY
Hi Tom,
Quoted 15 lines · Tom Rini
When we have
CONFIG_BLOBLIST_PASSAGE_MANDATORYenabled, we don't allow the device tree address to be overridden. However, infdtdec_setup()we had been allowing for various cases of not having found the device tree in the bloblist, or overriding it, to be possible. Add a check after the bloblist check such that if we have enabledBLOBLIST_PASSAGE_MANDATORYwe return an error at that point.Signed-off-by Tom Rini <[email protected]>---
Changes in v2:
- Based on Raymond's feedback to v1, look harder at this code again and introduce a single check earlier on to causefdtdec_setupto bail out in the case ofBLOBLIST_PASSAGE_MANDATORYand not found.
Quoted 6 lines
Cc Ilias Apalodimas <[email protected]>Cc Raymond Mao <[email protected]>--- lib/fdtdec.c | 7 +++++++ 1 file changed, 7 insertions(+)
Regards,
Raymond
Quoted 21 lines
lib/fdtdec.c +7
-1@@ -1845,6 +1845,13 @@ int fdtdec_setup(void) } } +/* +* If we have bloblist being required to pass the FDT and we reach this +* point, we have a problem and must exit. +*/ +if (IS_ENABLED (CONFIG_BLOBLIST_PASSAGE_MANDATORY )) +return ret; +/* Otherwise, the devicetree is typically appended to U-Boot */ if (ret) {if (IS_ENABLED (CONFIG_OF_SEPARATE )) { --2.43.0
PATCH v2 2/2 vexpress64: Correct CONFIG symbol logic around device tree passage
In reply to Tom RiniWhen we don't have BLOBLIST_PASSAGE_MANDATORY enabled, then we're being passed the device tree in some other manner, via OF_HAS_PRIOR_STAGE. Correct our logic around which symbols are used to guard what is generated / used and when.
---
Changes in v2:
- Add Ilias and Raymond's tags
--- board/armltd/vexpress64/Kconfig | 2 +- board/armltd/vexpress64/Makefile | 2 ++ board/armltd/vexpress64/vexpress64.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-)
board/armltd/vexpress64/Kconfig +1 -1
@@ -31,7 +31,7 @@ choice config TARGET_VEXPRESS64_BASE_FVP bool "Support Versatile Express ARMv8a FVP BASE model" select VEXPRESS64_BASE_MODEL - imply OF_HAS_PRIOR_STAGE if !BLOBLIST + imply OF_HAS_PRIOR_STAGE config TARGET_VEXPRESS64_BASER_FVP bool "Support Versatile Express ARMv8r64 FVP BASE model"
board/armltd/vexpress64/Makefile +2 -0
@@ -5,6 +5,8 @@ obj-y := vexpress64.o +ifeq ($(CONFIG_BLOBLIST_PASSAGE_MANDATORY),) obj-$(CONFIG_OF_HAS_PRIOR_STAGE) += lowlevel_init.o +endif obj-$(CONFIG_TARGET_VEXPRESS64_JUNO) += pcie.o
board/armltd/vexpress64/vexpress64.c +2 -2
@@ -97,7 +97,7 @@ int dram_init_banksize(void)* Push the variable into the .data section so that it * does not get cleared later. */ -#ifdef CONFIG_OF_HAS_PRIOR_STAGE +#ifndef CONFIG_BLOBLIST_PASSAGE_MANDATORY unsigned long __section(".data") prior_stage_fdt_address[2];#endif
@@ -150,7 +150,7 @@ static phys_addr_t find_dtb_in_nor_flash(const char *partname) }#endif -#ifdef CONFIG_OF_HAS_PRIOR_STAGE +#ifndef CONFIG_BLOBLIST_PASSAGE_MANDATORY /* * Filter for a valid DTB, as TF-A happens to provide a pointer to some * data structure using the DTB format, which we cannot use.
Signature · 1 line
2.43.0
Re: [PATCH v2 2/2] vexpress64: Correct CONFIG symbol logic around device tree passage
Quoted 8 lines · Tom Rini
When we don't have
BLOBLIST_PASSAGE_MANDATORYenabled, then we're being passed the device tree in some other manner, viaOF_HAS_PRIOR_STAGE. Correct our logic around which symbols are used to guard what is generated / used and when.Signed-off-by Tom Rini <[email protected]>Reviewed-by Raymond Mao <[email protected]>Acked-by Ilias Apalodimas <[email protected]>
Yours,
Linus Walleij
Re: [PATCH v2 0/2] Correct behavior of BLOBLIST_PASSAGE_MANDATORY
In reply to Tom RiniQuoted 8 lines · Tom Rini
Hey all,
This is v2 of
https://lore.kernel.org/u-boot/[email protected]/
which I've also split in to two series, with the second depending on this.[...]
Applied to u-boot/next, thanks!
[1/2] lib/fdtdec.c: Disallow overriding BLOBLIST_PASSAGE_MANDATORY
commit: 179010694b30eaf3f048db66e43d10c7d9c4f994
[2/2] vexpress64: Correct CONFIG symbol logic around device tree passage
commit: 2457d1d0fc871e25e32629a8bf4b4f54ff5793d7Signature · 1 line
Tom