[PATCH] rpi: Switch to OF_HAS_PRIOR_STAGE by default

Tom Rini trini at konsulko.com
Fri Dec 24 17:57:04 CET 2021


On all Raspberry Pi platforms, we're loaded by a prior stage firmware
that has assembled and passed on a device tree binary for us to use.
Switch to using this tree by default.

Cc: Matthias Brugger <mbrugger at suse.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: François Ozog <francois.ozog at linaro.org>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
To be clear, this is on top of current -next where I've applied v8 of
Simon's series that introduces OF_HAS_PRIOR_STAGE.

I've only been able to test this on my Raspberry Pi 3 boards but this
should work everywhere.  What may, or may not, be a problem is that
arch/arm/dts/bcm283x-u-boot.dtsi is never used now.  On the other hand,
I believe this should stop the problems we have where changes made to
the device tree via config.txt or similar aren't reflected when booting
U-Boot or Linux since we will be using that tree for certain now.
---
 arch/arm/Kconfig               | 1 +
 arch/arm/mach-bcm283x/Kconfig  | 3 ---
 configs/rpi_0_w_defconfig      | 1 -
 configs/rpi_2_defconfig        | 1 -
 configs/rpi_3_32b_defconfig    | 1 -
 configs/rpi_3_b_plus_defconfig | 1 -
 configs/rpi_3_defconfig        | 1 -
 configs/rpi_defconfig          | 1 -
 8 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 85c964b7a182..36a42cf3dc75 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -609,6 +609,7 @@ config ARCH_BCM283X
 	select SERIAL_SEARCH_ALL
 	imply CMD_DM
 	imply FAT_WRITE
+	imply OF_HAS_PRIOR_STAGE
 
 config ARCH_BCM63158
 	bool "Broadcom BCM63158 family"
diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
index 6ce278c6d296..b3287ce8bcea 100644
--- a/arch/arm/mach-bcm283x/Kconfig
+++ b/arch/arm/mach-bcm283x/Kconfig
@@ -163,7 +163,6 @@ config TARGET_RPI_4_32B
 
 	  This option creates a build targeting the ARMv7/AArch32 ISA.
 	select BCM2711_32B
-	imply OF_HAS_PRIOR_STAGE
 
 config TARGET_RPI_4
 	bool "Raspberry Pi 4 64-bit build"
@@ -189,7 +188,6 @@ config TARGET_RPI_4
 
 	  This option creates a build targeting the ARMv8/AArch64 ISA.
 	select BCM2711_64B
-	imply OF_HAS_PRIOR_STAGE
 
 config TARGET_RPI_ARM64
 	bool "Raspberry Pi one binary 64-bit build"
@@ -197,7 +195,6 @@ config TARGET_RPI_ARM64
 	  Support for all armv8 based Raspberry Pi variants, such as
 	  the RPi 4 model B, in AArch64 (64-bit) mode.
 	select ARM64
-	imply OF_HAS_PRIOR_STAGE
 
 endchoice
 
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index 195541c6e765..f056e5783045 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -19,7 +19,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index eb63fbdd8d9c..45cad3003aba 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -20,7 +20,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index 46102899f037..71de806fdde3 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -21,7 +21,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig
index 91b63b62721c..947d4ebdf1a8 100644
--- a/configs/rpi_3_b_plus_defconfig
+++ b/configs/rpi_3_b_plus_defconfig
@@ -20,7 +20,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index 528b12ea5b55..82b38a2da332 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -20,7 +20,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index 0baef3b6abfa..f9da96c77567 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -19,7 +19,6 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_FS_UUID=y
-CONFIG_OF_EMBED=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
-- 
2.25.1



More information about the U-Boot mailing list