Skip to contentSkip to conversation

Kconfig: Convert SYS_EARLY_PCI_INIT to Kconfig

PATCH In review Fabio Estevam 3 participants 5 messages Aug 14, 2025 – Aug 21, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 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.

---
Changes since v1:
- Only collected Tom's RB tag.

 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 v2 2/2 qemu_arm: Select CONFIG_SYS_EARLY_PCI_INIT

Select CONFIG_SYS_EARLY_PCI_INIT so that eMMC emulation can work.

---
Changes since v1:
- Select via imply in board/emulation/qemu-arm/Kconfig. (Tom)

 board/emulation/qemu-arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
board/emulation/qemu-arm/Kconfig +1 -0
index 80ab9d8e1c3f..447061b25cd8 100644
@@ -8,6 +8,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
 	select HAS_CUSTOM_SYS_INIT_SP_ADDR
 	select QFW if ACPI
 	select QFW_MMIO if CMD_QFW
+	imply SYS_EARLY_PCI_INIT
 	imply VIRTIO_MMIO
 	imply VIRTIO_PCI
 	imply VIRTIO_NET
Signature · 1 line
2.34.1
Tested-by on v2 2/2
#3 lore raw

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

In reply to Fabio Estevam
Quoted 16 lines · Fabio Estevam

Select CONFIG_SYS_EARLY_PCI_INIT so that eMMC emulation can work.

---
Changes since v1:
- Select via imply in board/emulation/qemu-arm/Kconfig. (Tom)

 board/emulation/qemu-arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
board/emulation/qemu-arm/Kconfig +0 -0
index 80ab9d8e1c3f..447061b25cd8 100644

board/emulation/qemu-arm/Kconfig config BOARD_SPECIFIC_OPTIONS # dummy · line 14

Quoted 7 lines
board/emulation/qemu-arm/Kconfig +1 -0
@@ -8,6 +8,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
 	select HAS_CUSTOM_SYS_INIT_SP_ADDR
 	select QFW if ACPI
 	select QFW_MMIO if CMD_QFW
+	imply SYS_EARLY_PCI_INIT
 	imply VIRTIO_MMIO
 	imply VIRTIO_PCI
 	imply VIRTIO_NET

For both:

Thanks!
Jan

Signature · 2 lines
Siemens AG, Foundational Technologies
Linux Expert Center
#4 lore raw
In reply to Fabio Estevam
Quoted 6 lines · Fabio Estevam

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.

Applied to u-boot/next, thanks!

[1/2] Kconfig: Convert SYS_EARLY_PCI_INIT to Kconfig

      commit: 0b0641470b3037e7e212b40c7101c1269653f86e
[2/2] qemu_arm: Select CONFIG_SYS_EARLY_PCI_INIT
      commit: 51214ffcc543dde83ad687c35cb2de61a34e0602
Signature · 1 line
Tom