[PATCH v1 01/14] mfd: hgs-efi: do not claim the name of the EFI loader's device

Johannes Schneider johannes.schneider at leica-geosystems.com
Sat Oct 3 18:19:34 PDT 2026


The coprocessor device registers as "efi", the name the EFI loader gives
its own device. With CONFIG_EFI_LOADER on a GS05, whichever registers
second fails, and the EFI loader then panics during late init:

  register_device: already registered efi
  initcall efi_init_params+0x0/0x7c failed: Invalid argument
  PANIC: unable to handle paging request at address 0xffffffffffffffe0

Name the device "hgs-efi", after its driver, and look it up by that
name in the GS05 board code and in hgs_notify_pp4() to sidestep this
naming conflict.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Johannes Schneider <johannes.schneider at leica-geosystems.com>
---
 arch/arm/boards/hgs-gs05/board.c | 2 +-
 common/boards/hgs/common.c       | 2 +-
 drivers/mfd/hgs-efi.c            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boards/hgs-gs05/board.c b/arch/arm/boards/hgs-gs05/board.c
index 40dbecae08..f24a764e6c 100644
--- a/arch/arm/boards/hgs-gs05/board.c
+++ b/arch/arm/boards/hgs-gs05/board.c
@@ -123,7 +123,7 @@ hgs_gs05_set_efi_poll_intervall(struct device *efid, u64 new_polling_interval)
 static struct hgs_machine *hgs_gs05_get_board(struct device *dev)
 {
 	u8 buf[HGS_GS05_SERIAL_NUMBER_CHARS] = { };
-	struct device *efi_dev = get_device_by_name("efi");
+	struct device *efi_dev = get_device_by_name("hgs-efi");
 	struct hgs_efi *efi = dev_get_priv(efi_dev->parent);
 	struct hgs_sep_cmd cmd = {
 		.type = HGS_SEP_MSG_TYPE_COMMAND,
diff --git a/common/boards/hgs/common.c b/common/boards/hgs/common.c
index c4a31a2797..0f95bf7bd7 100644
--- a/common/boards/hgs/common.c
+++ b/common/boards/hgs/common.c
@@ -582,7 +582,7 @@ static int hgs_notify_pp4(void)
 	struct device *efi;
 	int ret;
 
-	efi = get_device_by_name("efi");
+	efi = get_device_by_name("hgs-efi");
 	ret = dev_set_param(efi, "cpu_rdy", "1");
 	if (ret)
 		return ret;
diff --git a/drivers/mfd/hgs-efi.c b/drivers/mfd/hgs-efi.c
index 51c0b7ffc9..eb7c267753 100644
--- a/drivers/mfd/hgs-efi.c
+++ b/drivers/mfd/hgs-efi.c
@@ -414,7 +414,7 @@ static int hgs_efi_register_dev(struct hgs_efi *efi)
 	int ret;
 
 	dev->parent = efi->serdev->dev;
-	dev_set_name(dev, "efi");
+	dev_set_name(dev, "hgs-efi");
 	dev->id = DEVICE_ID_SINGLE;
 
 	ret = register_device(dev);
-- 
2.43.0




More information about the barebox mailing list