[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250731024842.351-1-luochunsheng@ustc.edu>
Date: Thu, 31 Jul 2025 10:48:42 +0800
From: Chunsheng Luo <luochunsheng@...c.edu>
To: Olivia Mackall <olivia@...enic.com>,
Herbert Xu <herbert@...dor.apana.org.au>
Cc: Alessandro Rubini <rubini@...pv.it>,
Andrea Gallo <andrea.gallo@...ricsson.com>,
Matt Mackall <mpm@...enic.com>,
linux-kernel@...r.kernel.org,
Chunsheng Luo <luochunsheng@...c.edu>
Subject: [PATCH] hw_random: nomadik: add missing dependency on ARM_AMBA
Compiling without CONFIG_ARM_AMBA causes undefined reference errors:
ld: vmlinux.o: in function `nmk_rng_remove':
nomadik-rng.c:(.text+0x6f64917): undefined reference to `amba_release_regions'
ld: vmlinux.o: in function `nmk_rng_probe':
nomadik-rng.c:(.text+0x6f649ee): undefined reference to `amba_request_regions'
nomadik-rng.c:(.text+0x6f64aba): undefined reference to `amba_release_regions'
nomadik-rng.c:(.text+0x6f64ae0): undefined reference to `amba_release_regions'
The Nomadik RNG driver uses AMBA bus interfaces (amba_request_regions/amba_release_regions)
which are only available when CONFIG_ARM_AMBA is enabled. The existing dependency
on ARCH_NOMADIK implicitly selects ARM_AMBA, but when building with COMPILE_TEST
on non-ARM platforms, this dependency breaks.
Fix by explicitly adding dependency on ARM_AMBA to Kconfig, ensuring the driver
only compiles when AMBA support is available.
Signed-off-by: Chunsheng Luo <luochunsheng@...c.edu>
---
drivers/char/hw_random/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index c85827843447..09abd1acb99f 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -311,7 +311,7 @@ config HW_RANDOM_INGENIC_TRNG
config HW_RANDOM_NOMADIK
tristate "ST-Ericsson Nomadik Random Number Generator support"
- depends on ARCH_NOMADIK || COMPILE_TEST
+ depends on ARM_AMBA && (ARCH_NOMADIK || COMPILE_TEST)
default HW_RANDOM
help
This driver provides kernel-side support for the Random Number
--
2.43.0
Powered by blists - more mailing lists