Skip to contentSkip to conversation

PowerPC: Update dependencies on *SYS_MPC85XX_NO_RESETVEC

PATCH In review Tom Rini 2 participants 3 messages Dec 29, 2022 PowerPC

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 PowerPC: Update dependencies on *SYS_MPC85XX_NO_RESETVEC

In 96699f097a02 ("powerpc: mpc85xx: Use binman to embed dtb inside U-Boot") we introduce CONFIG_MPC85XX_HAVE_RESET_VECTOR and do so via Kconfig. However, much later in de47ff536363 ("Convert CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig") I converted the symbol that is the inverse of this to Kconfig. This should have included a dependency on the first symbol as they are logically opposite.

The dependency being missing lead to some platforms being broken at runtime due to discarding the require reset vector.

Fixes de47ff536363 ("Convert CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig")
---
 arch/powerpc/cpu/mpc85xx/Kconfig        | 6 +++---
 configs/P1010RDB-PA_36BIT_NOR_defconfig | 1 -
 configs/P1010RDB-PA_NOR_defconfig       | 1 -
 configs/P1010RDB-PB_36BIT_NOR_defconfig | 1 -
 configs/P1010RDB-PB_NOR_defconfig       | 1 -
 configs/P1020RDB-PC_36BIT_defconfig     | 1 -
 configs/P1020RDB-PC_defconfig           | 1 -
 configs/P1020RDB-PD_defconfig           | 1 -
 configs/P2020RDB-PC_36BIT_defconfig     | 1 -
 configs/P2020RDB-PC_defconfig           | 1 -
 10 files changed, 3 insertions(+), 12 deletions(-)
arch/powerpc/cpu/mpc85xx/Kconfig +3 -3
index 24d3f1f20c25..9d12bf168d95 100644
@@ -1459,14 +1459,14 @@ config SYS_FSL_USB_DUAL_PHY_ENABLE
 
 config SYS_MPC85XX_NO_RESETVEC
 	bool "Discard resetvec section and move bootpg section up"
-	depends on MPC85xx
+	depends on MPC85xx && !MPC85XX_HAVE_RESET_VECTOR
 	help
 	  If this variable is specified, the section .resetvec is not kept and
 	  the section .bootpg is placed in the previous 4k of the .text section.
 
 config SPL_SYS_MPC85XX_NO_RESETVEC
 	bool "Discard resetvec section and move bootpg section up, in SPL"
-	depends on MPC85xx && SPL
+	depends on MPC85xx && SPL && !MPC85XX_HAVE_RESET_VECTOR
 	help
 	  If this variable is specified, the section .resetvec is not kept and
 	  the section .bootpg is placed in the previous 4k of the .text section,
@@ -1474,7 +1474,7 @@ config SPL_SYS_MPC85XX_NO_RESETVEC
 
 config TPL_SYS_MPC85XX_NO_RESETVEC
 	bool "Discard resetvec section and move bootpg section up, in TPL"
-	depends on MPC85xx && TPL
+	depends on MPC85xx && TPL && !MPC85XX_HAVE_RESET_VECTOR
 	help
 	  If this variable is specified, the section .resetvec is not kept and
 	  the section .bootpg is placed in the previous 4k of the .text section,
configs/P1010RDB-PA_36BIT_NOR_defconfig +0 -1
index dcf74f5d6af5..42f736350a40 100644
@@ -10,7 +10,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1010RDB_PA=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_PHYS_64BIT=y
configs/P1010RDB-PA_NOR_defconfig +0 -1
index 537d8bf576b0..587defcc79d8 100644
@@ -10,7 +10,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1010RDB_PA=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
configs/P1010RDB-PB_36BIT_NOR_defconfig +0 -1
index 92a7e0966936..b772edf305b0 100644
@@ -10,7 +10,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1010RDB_PB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_PHYS_64BIT=y
configs/P1010RDB-PB_NOR_defconfig +0 -1
index 3e16470608e5..10ab2c04d660 100644
@@ -10,7 +10,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1010RDB_PB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
configs/P1020RDB-PC_36BIT_defconfig +0 -1
index ce0ba0e37574..368fc79d50c5 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1020RDB_PC=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_PHYS_64BIT=y
configs/P1020RDB-PC_defconfig +0 -1
index aae886b75c4e..764ff06a47ca 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1020RDB_PC=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
configs/P1020RDB-PD_defconfig +0 -1
index 5fecb6684735..b3547d74e647 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1020RDB_PD=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
configs/P2020RDB-PC_36BIT_defconfig +0 -1
index b1dbca6e7ea3..a6b74636b9f1 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P2020RDB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_PHYS_64BIT=y
configs/P2020RDB-PC_defconfig +0 -1
index 1ee46f9fbe9f..3362532782f0 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P2020RDB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
Signature · 1 line
2.25.1
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · On Thursday 29 December 2022 09:50:03 Tom Rini wrote:

In 96699f097a02 ("powerpc: mpc85xx: Use binman to embed dtb inside U-Boot") we introduce CONFIG_MPC85XX_HAVE_RESET_VECTOR and do so via Kconfig. However, much later in de47ff536363 ("Convert CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig") I converted the symbol that is the inverse of this to Kconfig. This should have included a dependency on the first symbol as they are logically opposite.

Quoted 6 lines

The dependency being missing lead to some platforms being broken at runtime due to discarding the require reset vector.

Fixes de47ff536363 ("Convert CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig")

Together with "PowerPC: Rework PBL location choice" patch, U-Boot can be booted on P2020 based board from FLASH NOR (P2020RDB-PC_defconfig) and also from SD card (P2020RDB-PC_SDCARD_defconfig).

Thanks for this patch!!

Quoted 154 lines
---
 arch/powerpc/cpu/mpc85xx/Kconfig        | 6 +++---
 configs/P1010RDB-PA_36BIT_NOR_defconfig | 1 -
 configs/P1010RDB-PA_NOR_defconfig       | 1 -
 configs/P1010RDB-PB_36BIT_NOR_defconfig | 1 -
 configs/P1010RDB-PB_NOR_defconfig       | 1 -
 configs/P1020RDB-PC_36BIT_defconfig     | 1 -
 configs/P1020RDB-PC_defconfig           | 1 -
 configs/P1020RDB-PD_defconfig           | 1 -
 configs/P2020RDB-PC_36BIT_defconfig     | 1 -
 configs/P2020RDB-PC_defconfig           | 1 -
 10 files changed, 3 insertions(+), 12 deletions(-)
arch/powerpc/cpu/mpc85xx/Kconfig +3 -3
index 24d3f1f20c25..9d12bf168d95 100644
@@ -1459,14 +1459,14 @@ config SYS_FSL_USB_DUAL_PHY_ENABLE
 
 config SYS_MPC85XX_NO_RESETVEC
 	bool "Discard resetvec section and move bootpg section up"
-	depends on MPC85xx
+	depends on MPC85xx && !MPC85XX_HAVE_RESET_VECTOR
 	help
 	  If this variable is specified, the section .resetvec is not kept and
 	  the section .bootpg is placed in the previous 4k of the .text section.
 
 config SPL_SYS_MPC85XX_NO_RESETVEC
 	bool "Discard resetvec section and move bootpg section up, in SPL"
-	depends on MPC85xx && SPL
+	depends on MPC85xx && SPL && !MPC85XX_HAVE_RESET_VECTOR
 	help
 	  If this variable is specified, the section .resetvec is not kept and
 	  the section .bootpg is placed in the previous 4k of the .text section,
@@ -1474,7 +1474,7 @@ config SPL_SYS_MPC85XX_NO_RESETVEC
 
 config TPL_SYS_MPC85XX_NO_RESETVEC
 	bool "Discard resetvec section and move bootpg section up, in TPL"
-	depends on MPC85xx && TPL
+	depends on MPC85xx && TPL && !MPC85XX_HAVE_RESET_VECTOR
 	help
 	  If this variable is specified, the section .resetvec is not kept and
 	  the section .bootpg is placed in the previous 4k of the .text section,
configs/P1010RDB-PA_36BIT_NOR_defconfig +0 -1
index dcf74f5d6af5..42f736350a40 100644
@@ -10,7 +10,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1010RDB_PA=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_PHYS_64BIT=y
configs/P1010RDB-PA_NOR_defconfig +0 -1
index 537d8bf576b0..587defcc79d8 100644
@@ -10,7 +10,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1010RDB_PA=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
configs/P1010RDB-PB_36BIT_NOR_defconfig +0 -1
index 92a7e0966936..b772edf305b0 100644
@@ -10,7 +10,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1010RDB_PB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_PHYS_64BIT=y
configs/P1010RDB-PB_NOR_defconfig +0 -1
index 3e16470608e5..10ab2c04d660 100644
@@ -10,7 +10,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1010RDB_PB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
configs/P1020RDB-PC_36BIT_defconfig +0 -1
index ce0ba0e37574..368fc79d50c5 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1020RDB_PC=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_PHYS_64BIT=y
configs/P1020RDB-PC_defconfig +0 -1
index aae886b75c4e..764ff06a47ca 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1020RDB_PC=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
configs/P1020RDB-PD_defconfig +0 -1
index 5fecb6684735..b3547d74e647 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P1020RDB_PD=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
configs/P2020RDB-PC_36BIT_defconfig +0 -1
index b1dbca6e7ea3..a6b74636b9f1 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P2020RDB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_PHYS_64BIT=y
configs/P2020RDB-PC_defconfig +0 -1
index 1ee46f9fbe9f..3362532782f0 100644
@@ -11,7 +11,6 @@ CONFIG_SYS_INIT_RAM_LOCK=y
 CONFIG_TARGET_P2020RDB=y
 CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
 CONFIG_ENABLE_36BIT_PHYS=y
-CONFIG_SYS_MPC85XX_NO_RESETVEC=y
 CONFIG_PCIE1=y
 CONFIG_PCIE2=y
 CONFIG_SYS_MONITOR_LEN=786432
Signature · 1 line
2.25.1
author
#2 lore raw
In reply to Tom Rini
Quoted 7 lines · Tom Rini

In 96699f097a02 ("powerpc: mpc85xx: Use binman to embed dtb inside U-Boot") we introduce CONFIG_MPC85XX_HAVE_RESET_VECTOR and do so via Kconfig. However, much later in de47ff536363 ("Convert CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig") I converted the symbol that is the inverse of this to Kconfig. This should have included a dependency on the first symbol as they are logically opposite.

Quoted 7 lines

The dependency being missing lead to some platforms being broken at runtime due to discarding the require reset vector.

Fixes de47ff536363 ("Convert CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig")

Applied to u-boot/master, thanks!

Signature · 1 line
Tom