Skip to contentSkip to conversation

misc: qcom_geni: gate late firmware loading behind Kconfig option

PATCH In review Aswin Murugan 3 participants 3 messages Sep 18 – Sep 22

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: qcom_geni: gate late firmware loading behind Kconfig option

GENI QUP firmware loading is normally expected to be completed by a previous boot stage and is not required in production U-Boot builds. Add CONFIG_QCOM_GENI_FW_LOAD to make the late firmware loading path optional and disable it by default.

The option can be enabled for engineering and bring-up builds where loading GENI firmware from U-Boot is required.

---
 configs/qcom_defconfig   | 1 +
 drivers/misc/Kconfig     | 9 +++++++++
 drivers/misc/qcom_geni.c | 2 ++
 3 files changed, 12 insertions(+)
configs/qcom_defconfig +1 -0
index c52f619850d..9498583b97c 100644
@@ -99,6 +99,7 @@ CONFIG_QCOM_HYP_SMMU=y
 CONFIG_MISC=y
 CONFIG_NVMEM=y
 CONFIG_QCOM_GENI=y
+# CONFIG_QCOM_GENI_FW_LOAD is not set
 CONFIG_I2C_EEPROM=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ADMA=y
drivers/misc/Kconfig +9 -0
index 44415f24ae1..8320fbe28e0 100644
@@ -93,6 +93,15 @@ config QCOM_GENI
 	  for providing a common interface for various peripherals like UART, I2C, SPI,
 	  etc.
 
+config QCOM_GENI_FW_LOAD
+	bool "Load Qualcomm GENI peripheral firmware at late init"
+	depends on QCOM_GENI
+	default y
+	help
+	  Load firmware for GENI peripherals from the firmware partition
+	  at late init. Disable if no GENI peripheral needs firmware
+	  loading.
+
 config ROCKCHIP_EFUSE
 	bool "Rockchip e-fuse support"
 	depends on MISC
drivers/misc/qcom_geni.c +2 -0
index a62ae6a2478..b5c2a511ae7 100644
@@ -563,7 +563,9 @@ static int qcom_geni_fw_initialise(void)
 	return 0;
 }
 
+#if IS_ENABLED(CONFIG_QCOM_GENI_FW_LOAD)
 EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, qcom_geni_fw_initialise);
+#endif
 
 static const struct udevice_id geni_ids[] = {
 	{ .compatible = "qcom,geni-se-qup" },
Signature · 1 line
2.34.1
#1 lore raw

Hi,

Quoted 7 lines · Aswin Murugan

GENI QUP firmware loading is normally expected to be completed by a previous boot stage and is not required in production U-Boot builds. Add CONFIG_QCOM_GENI_FW_LOAD to make the late firmware loading path optional and disable it by default.

The option can be enabled for engineering and bring-up builds where loading GENI firmware from U-Boot is required.

This feature is enabled by default on Linux, why would it be disabled by default on U-Boot ?

Neil

Quoted 54 lines
---
  configs/qcom_defconfig   | 1 +
  drivers/misc/Kconfig     | 9 +++++++++
  drivers/misc/qcom_geni.c | 2 ++
  3 files changed, 12 insertions(+)
configs/qcom_defconfig +1 -0
index c52f619850d..9498583b97c 100644
@@ -99,6 +99,7 @@ CONFIG_QCOM_HYP_SMMU=y
  CONFIG_MISC=y
  CONFIG_NVMEM=y
  CONFIG_QCOM_GENI=y
+# CONFIG_QCOM_GENI_FW_LOAD is not set
  CONFIG_I2C_EEPROM=y
  CONFIG_MMC_SDHCI=y
  CONFIG_MMC_SDHCI_ADMA=y
drivers/misc/Kconfig +9 -0
index 44415f24ae1..8320fbe28e0 100644
@@ -93,6 +93,15 @@ config QCOM_GENI
  	  for providing a common interface for various peripherals like UART, I2C, SPI,
  	  etc.
 
+config QCOM_GENI_FW_LOAD
+	bool "Load Qualcomm GENI peripheral firmware at late init"
+	depends on QCOM_GENI
+	default y
+	help
+	  Load firmware for GENI peripherals from the firmware partition
+	  at late init. Disable if no GENI peripheral needs firmware
+	  loading.
+
  config ROCKCHIP_EFUSE
  	bool "Rockchip e-fuse support"
  	depends on MISC
drivers/misc/qcom_geni.c +2 -0
index a62ae6a2478..b5c2a511ae7 100644
@@ -563,7 +563,9 @@ static int qcom_geni_fw_initialise(void)
  	return 0;
  }
 
+#if IS_ENABLED(CONFIG_QCOM_GENI_FW_LOAD)
  EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, qcom_geni_fw_initialise);
+#endif
 
  static const struct udevice_id geni_ids[] = {
  	{ .compatible = "qcom,geni-se-qup" },
#2 lore raw
Quoted 8 lines · On 18/09/2026 14:16, [email protected] wrote:

Hi,

Quoted 5 lines · Aswin Murugan

GENI QUP firmware loading is normally expected to be completed by a previous boot stage and is not required in production U-Boot builds. Add CONFIG_QCOM_GENI_FW_LOAD to make the late firmware loading path optional and disable it by default.

Quoted 5 lines
Quoted 2 lines

The option can be enabled for engineering and bring-up builds where loading GENI firmware from U-Boot is required.

This feature is enabled by default on Linux, why would it be disabled by default on U-Boot ?

not only that it's required for a variety of upstream and production usecases already.

I assume this change is motivated to improve speed, the patch should really describe the motivation here since it's not a bug fix. A fast path could totally be done here but it would have to be a bit smarter I think.

Thanks,>

Quoted 55 lines

Neil

Quoted 52 lines

---
  configs/qcom_defconfig   | 1 +
  drivers/misc/Kconfig     | 9 +++++++++
  drivers/misc/qcom_geni.c | 2 ++

  3 files changed, 12 insertions(+)
configs/qcom_defconfig +0 -0
index c52f619850d..9498583b97c 100644
@@ -99,6 +99,7 @@ CONFIG_QCOM_HYP_SMMU=y

  CONFIG_MISC=y
  CONFIG_NVMEM=y
  CONFIG_QCOM_GENI=y
+# CONFIG_QCOM_GENI_FW_LOAD is not set
  CONFIG_I2C_EEPROM=y
  CONFIG_MMC_SDHCI=y
  CONFIG_MMC_SDHCI_ADMA=y

drivers/misc/Kconfig +0 -0
index 44415f24ae1..8320fbe28e0 100644
@@ -93,6 +93,15 @@ config QCOM_GENI

        for providing a common interface for various peripherals like UART, I2C, SPI,
        etc.
  +config QCOM_GENI_FW_LOAD
+    bool "Load Qualcomm GENI peripheral firmware at late init" +    depends on QCOM_GENI
+    default y
+    help
+      Load firmware for GENI peripherals from the firmware partition +      at late init. Disable if no GENI peripheral needs firmware +      loading.
+
  config ROCKCHIP_EFUSE
      bool "Rockchip e-fuse support"
      depends on MISC

drivers/misc/qcom_geni.c +1 -0
index a62ae6a2478..b5c2a511ae7 100644
@@ -563,7 +563,9 @@ static int qcom_geni_fw_initialise(void)
       return 0;
   }
   +#if IS_ENABLED(CONFIG_QCOM_GENI_FW_LOAD)
   EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, qcom_geni_fw_initialise);
+#endif
     static const struct udevice_id geni_ids[] = {
       { .compatible = "qcom,geni-se-qup" },
Signature · 1 line
// Casey (she/her)