Skip to contentSkip to conversation

Kconfig: Convert SYS_EARLY_PCI_INIT to Kconfig

PATCH Superseded Fabio Estevam 3 participants 6 messages Aug 14, 2025 – Aug 15, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Kconfig: Convert SYS_EARLY_PCI_INIT to Kconfig

The CONFIG_SYS_EARLY_PCI_INIT symbol is currently not supported by Kconfig.

Make it a Kconfig symbol so that users could select it via defconfig.

---
 common/Kconfig | 7 +++++++
 1 file changed, 7 insertions(+)
common/Kconfig +7 -0
index a2f653f7e722..cb17f0561537 100644
@@ -833,6 +833,13 @@ config PCI_INIT_R
 	  case of DM PCI-based Ethernet devices, which will not be detected
 	  without having the enumeration performed earlier.
 
+config SYS_EARLY_PCI_INIT
+	bool "Enumerate PCI buses early during init"
+	depends on PCI
+	help
+	  Do early PCI configuration before the eMMC gets initialised,
+	  because PCI resources are crucial for eMMC access on some boards.
+
 config RESET_PHY_R
 	bool "Reset ethernet PHY during init"
 	help
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 qemu_arm: Select CONFIG_SYS_EARLY_PCI_INIT

Select CONFIG_SYS_EARLY_PCI_INIT so that eMMC emulation can work.

---
 configs/qemu_arm_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/qemu_arm_defconfig +1 -0
index d5890bf87fb3..db60f7de6da9 100644
@@ -28,6 +28,7 @@ CONFIG_USE_PREBOOT=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 # CONFIG_BOARD_INIT is not set
+CONFIG_SYS_EARLY_PCI_INIT=y
 CONFIG_PCI_INIT_R=y
 CONFIG_CMD_BOOTEFI_SELFTEST=y
 CONFIG_CMD_NVEDIT_EFI=y
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 2/2] qemu_arm: Select CONFIG_SYS_EARLY_PCI_INIT

Quoted 13 lines · Fabio Estevam

Select CONFIG_SYS_EARLY_PCI_INIT so that eMMC emulation can work.

---
 configs/qemu_arm_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/qemu_arm_defconfig +0 -0
index d5890bf87fb3..db60f7de6da9 100644

configs/qemu_arm_defconfig CONFIG_USE_PREBOOT=y · line 34

Quoted 7 lines
configs/qemu_arm_defconfig +1 -0
@@ -28,6 +28,7 @@ CONFIG_USE_PREBOOT=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 # CONFIG_BOARD_INIT is not set
+CONFIG_SYS_EARLY_PCI_INIT=y
 CONFIG_PCI_INIT_R=y
 CONFIG_CMD_BOOTEFI_SELFTEST=y
 CONFIG_CMD_NVEDIT_EFI=y

I thought Jan was doing this on arm64? But we should probably imply it under BOARD_SPECIFIC_OPTIONS in board/emulation/qemu-arm/Kconfig.

Signature · 1 line
Tom
#3 lore raw

Re: [PATCH 2/2] qemu_arm: Select CONFIG_SYS_EARLY_PCI_INIT

Quoted 10 lines · Tom Rini
Quoted 8 lines · Fabio Estevam

Select CONFIG_SYS_EARLY_PCI_INIT so that eMMC emulation can work.

---
 configs/qemu_arm_defconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines

configs/qemu_arm_defconfig CONFIG_USE_PREBOOT=y · line 34

Quoted 12 lines
configs/qemu_arm_defconfig +1 -0
index d5890bf87fb3..db60f7de6da9 100644
@@ -28,6 +28,7 @@ CONFIG_USE_PREBOOT=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 # CONFIG_BOARD_INIT is not set
+CONFIG_SYS_EARLY_PCI_INIT=y
 CONFIG_PCI_INIT_R=y
 CONFIG_CMD_BOOTEFI_SELFTEST=y
 CONFIG_CMD_NVEDIT_EFI=y

I thought Jan was doing this on arm64? But we should probably imply it under BOARD_SPECIFIC_OPTIONS in board/emulation/qemu-arm/Kconfig.

I'm currently doing that for qemu-arm64, but qemu-arm will be just the same and is planned as well. Actually, riscv64 should work as well.

Jan

Signature · 2 lines
Siemens AG, Foundational Technologies
Linux Expert Center
#4 lore raw

Re: [PATCH 2/2] qemu_arm: Select CONFIG_SYS_EARLY_PCI_INIT

Quoted 28 lines · Jan Kiszka
Quoted 10 lines · Tom Rini
Quoted 8 lines · Fabio Estevam

Select CONFIG_SYS_EARLY_PCI_INIT so that eMMC emulation can work.

---
 configs/qemu_arm_defconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines

configs/qemu_arm_defconfig CONFIG_USE_PREBOOT=y · line 34

Quoted 12 lines
configs/qemu_arm_defconfig +1 -0
index d5890bf87fb3..db60f7de6da9 100644
@@ -28,6 +28,7 @@ CONFIG_USE_PREBOOT=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 # CONFIG_BOARD_INIT is not set
+CONFIG_SYS_EARLY_PCI_INIT=y
 CONFIG_PCI_INIT_R=y
 CONFIG_CMD_BOOTEFI_SELFTEST=y
 CONFIG_CMD_NVEDIT_EFI=y

I thought Jan was doing this on arm64? But we should probably imply it under BOARD_SPECIFIC_OPTIONS in board/emulation/qemu-arm/Kconfig.

Quoted 2 lines

I'm currently doing that for qemu-arm64, but qemu-arm will be just the same and is planned as well. Actually, riscv64 should work as well.

This stanza will catch both qemu-arm options. We don't have a good common file for all QEMU so when you've got RISC-V going it'll have to go in that Kconfig file.

Signature · 1 line
Tom