Skip to contentSkip to conversation

Correct behavior of OF_OMIT_DTB

PATCH Superseded Tom Rini 4 participants 19 messages Jul 8 – Sep 4

Subsystems (7)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

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
author
#1 lore raw

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
index b91e067106dd..ecb22a58b964 100644
@@ -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
#2 lore raw

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_MANDATORY don'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

---
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
index b91e067106dd..ecb22a58b964 100644
@@ -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

author
#3 lore raw

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_MANDATORY don'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 15 lines

---
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
index b91e067106dd..ecb22a58b964 100644
@@ -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
author
#4 lore raw

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_MANDATORY don'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 21 lines

---
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
index b91e067106dd..ecb22a58b964 100644
@@ -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 -0
                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!

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
author
#5 lore raw

PATCH 2/7 vexpress64: Correct CONFIG symbol logic around device tree passage

In reply to Tom Rini

When 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
index 49c7fda0b83a..a988c7198498 100644
@@ -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
index b0dd1d0af879..5f9dc2af930a 100644
@@ -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
index d68da0e3d650..8b6b96d757d5 100644
@@ -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
Reviewed-by on v1 2/7
#6 lore raw

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_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]>

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
index 49c7fda0b83a..a988c7198498 100644
@@ -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
index b0dd1d0af879..5f9dc2af930a 100644
@@ -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 -3
index d68da0e3d650..8b6b96d757d5 100644
@@ -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

Acked-by on v1 2/7
#7 lore raw

Re: [PATCH 2/7] vexpress64: Correct CONFIG symbol logic around device tree passage

In reply to Tom Rini
Quoted 6 lines · Tom Rini

When 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.

Quoted 8 lines

---
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
index 49c7fda0b83a..a988c7198498 100644
@@ -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
index b0dd1d0af879..5f9dc2af930a 100644
@@ -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 -3
index d68da0e3d650..8b6b96d757d5 100644
@@ -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

author
#8 lore raw

PATCH 3/7 dts: Correct behavior of OF_OMIT_DTB

In reply to Tom Rini

When 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
index 56f59c24cf89..bca5a718f2aa 100644
@@ -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
author
#9 lore raw

PATCH 4/7 dts: Make DEFAULT_DEVICE_TREE depend on !OF_OMIT_DTB

In reply to Tom Rini

When 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
index dcabe33c1c1a..2eb48223de2b 100644
@@ -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
author
#10 lore raw

PATCH 5/7 dts: Correct entry for OF_OMIT_DTB

In reply to Tom Rini

When 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
index 2eb48223de2b..7457e0a5bb2e 100644
@@ -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
author
#11 lore raw

PATCH 6/7 powerpc: drop qemu-ppce500 dts

In reply to Tom Rini

Now 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
index 4fd3478ac2fa..a9075c16fefc 100644
@@ -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
deleted file mode 100644
index e88e09e17961..000000000000
@@ -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
author
#12 lore raw

PATCH 7/7 arm: Drop unused dts files

In reply to Tom Rini

Now 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
index 25234697e6ae..78095e9b1922 100644
@@ -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
deleted file mode 100644
index 3a4ad5d18012..000000000000
@@ -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
deleted file mode 100644
index e4e6b6abbfc1..000000000000
@@ -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 = <&reg_3v3>;
-	vqmmc-supply = <&reg_1v8>;
-};
arch/arm/dts/bcm2835-rpi-common.dtsi deleted +0 -12
deleted file mode 100644
index 8a55b6cded59..000000000000
@@ -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
deleted file mode 100644
index 0549686134ea..000000000000
@@ -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-rpi.dtsi deleted +0 -6
deleted file mode 100644
index c4c858b984c6..000000000000

Lines of this file are not shown. View the 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
deleted file mode 100644
index 967e081cb9c2..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/dts/bcm283x-rpi-smsc9514.dtsi deleted +0 -19
deleted file mode 100644
index dc7ae776db5f..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/dts/bcm283x-rpi-usb-host.dtsi deleted +0 -3
deleted file mode 100644
index 73f4ece8dcd0..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/dts/bcm283x-rpi-usb-otg.dtsi deleted +0 -11
deleted file mode 100644
index e2fd9610e125..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/dts/bcm283x-rpi-usb-peripheral.dtsi deleted +0 -7
deleted file mode 100644
index 0ff0e9e25327..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/dts/bcm283x-u-boot.dtsi deleted +0 -29
deleted file mode 100644
index ec0f93dd8507..000000000000

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/bcm7xxx.dts deleted +0 -15
deleted file mode 100644
index 786ce3ff9597..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/dts/highbank.dts deleted +0 -9
deleted file mode 100644
index 1480bad91040..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/dts/octeontx.dts deleted +0 -14
deleted file mode 100644
index 60a15f5df23f..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/dts/qemu-arm.dts deleted +0 -11
deleted file mode 100644
index 230c630f04fd..000000000000

Lines of this file are not shown. View the raw message.

arch/arm/dts/xenguest-arm64.dts deleted +0 -15
deleted file mode 100644
index d8734433763c..000000000000

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.

author
#13 lore raw

v2 cover Correct behavior of BLOBLIST_PASSAGE_MANDATORY

In reply to 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.

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
author
#14 lore raw

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.

Cc Ilias Apalodimas <[email protected]>
Cc Raymond Mao <[email protected]>
---
 lib/fdtdec.c | 7 +++++++
 1 file changed, 7 insertions(+)
lib/fdtdec.c +7 -0
index b91e067106dd..d25535bf36cf 100644
@@ -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
Acked-by on v2 1/2
#15 lore raw

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_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.

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
index b91e067106dd..d25535bf36cf 100644
@@ -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

author
#16 lore raw

PATCH v2 2/2 vexpress64: Correct CONFIG symbol logic around device tree passage

In reply to Tom Rini

When 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

Cc David Feng <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Peter Hoyes <[email protected]>
Cc Raymond Mao <[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
index 49c7fda0b83a..a988c7198498 100644
@@ -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
index b0dd1d0af879..5f9dc2af930a 100644
@@ -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
index d68da0e3d650..8b6b96d757d5 100644
@@ -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
Acked-by on v2 2/2
#17 lore raw

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_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.

Yours,
Linus Walleij

author
#18 lore raw

Re: [PATCH v2 0/2] Correct behavior of BLOBLIST_PASSAGE_MANDATORY

In reply to Tom Rini
Quoted 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: 2457d1d0fc871e25e32629a8bf4b4f54ff5793d7
Signature · 1 line
Tom