[PATCH] nvmem: airoha: add ARM64 dependency
From: Arnd Bergmann
Date: Thu Jun 11 2026 - 09:03:31 EST
From: Arnd Bergmann <arnd@xxxxxxxx>
The driver already depends on HAVE_ARM_SMCCC and ARCH_AIROHA, but both
are available for 32-bit and 64-bit targets. However, the smccc invocation
fails on thumb2 builds with clang:
drivers/nvmem/airoha-smc-efuses.c:38:2: error: write to reserved register 'R7'
38 | arm_smccc_1_1_invoke(AIROHA_SMC_EFUSE_FID,
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/arm/include/asm/opcodes.h:215:2: note: expanded from macro '__inst_arm_thumb32'
215 | __inst_thumb32(thumb_opcode)
| ^
Since the driver is only used on the 64-bit an7581 soc, avoid this
problem with a stricter dependency.
Fixes: 25e001fcc1e6 ("nvmem: airoha: Add support for SMC eFUSE")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/nvmem/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index e10f7ff725ff..f33ee18930ae 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -30,6 +30,7 @@ source "drivers/nvmem/layouts/Kconfig"
config NVMEM_AIROHA_SMC_EFUSES
tristate "Airoha SMC eFuse support"
+ depends on ARM64
depends on ARCH_AIROHA || COMPILE_TEST
depends on HAVE_ARM_SMCCC
default ARCH_AIROHA
--
2.39.5