Linux SOC development
 help / color / mirror / Atom feed
* [PATCH] platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency
@ 2024-09-09 11:04 Arnd Bergmann
  2024-09-10 10:09 ` Marek Behún
  2024-09-11  9:00 ` patchwork-bot+linux-soc
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-09-09 11:04 UTC (permalink / raw)
  To: soc, Marek Behún
  Cc: Arnd Bergmann, Bartosz Golaszewski, Andy Shevchenko,
	Guenter Roeck, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

There is still a build failure when the rwrng support is in a loadable
module but the mcu driver is built-in:

arm-linux-gnueabi-ld: drivers/platform/cznic/turris-omnia-mcu-trng.o: in function `omnia_mcu_register_trng':
turris-omnia-mcu-trng.c:(.text.omnia_mcu_register_trng+0x11c): undefined reference to `devm_hwrng_register'

Change the dependency to explicitly disallow the broken
configuration.

Fixes: 41bb142a4028 ("platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/platform/cznic/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/cznic/Kconfig b/drivers/platform/cznic/Kconfig
index a111eca8ff57..49c383eb6785 100644
--- a/drivers/platform/cznic/Kconfig
+++ b/drivers/platform/cznic/Kconfig
@@ -70,7 +70,7 @@ config TURRIS_OMNIA_MCU_TRNG
 	bool "Turris Omnia MCU true random number generator"
 	default y
 	depends on TURRIS_OMNIA_MCU_GPIO
-	depends on HW_RANDOM
+	depends on HW_RANDOM=y || HW_RANDOM=TURRIS_OMNIA_MCU
 	help
 	  Say Y here to add support for the true random number generator
 	  provided by CZ.NIC's Turris Omnia MCU.
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency
  2024-09-09 11:04 [PATCH] platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency Arnd Bergmann
@ 2024-09-10 10:09 ` Marek Behún
  2024-09-11  9:00 ` patchwork-bot+linux-soc
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Behún @ 2024-09-10 10:09 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: soc, Marek Behún, Arnd Bergmann, Bartosz Golaszewski,
	Andy Shevchenko, Guenter Roeck, linux-kernel

Reviewed-by: Marek Behún <kabel@kernel.org>

On Mon, Sep 09, 2024 at 11:04:09AM +0000, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> There is still a build failure when the rwrng support is in a loadable
> module but the mcu driver is built-in:
> 
> arm-linux-gnueabi-ld: drivers/platform/cznic/turris-omnia-mcu-trng.o: in function `omnia_mcu_register_trng':
> turris-omnia-mcu-trng.c:(.text.omnia_mcu_register_trng+0x11c): undefined reference to `devm_hwrng_register'
> 
> Change the dependency to explicitly disallow the broken
> configuration.
> 
> Fixes: 41bb142a4028 ("platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/platform/cznic/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/cznic/Kconfig b/drivers/platform/cznic/Kconfig
> index a111eca8ff57..49c383eb6785 100644
> --- a/drivers/platform/cznic/Kconfig
> +++ b/drivers/platform/cznic/Kconfig
> @@ -70,7 +70,7 @@ config TURRIS_OMNIA_MCU_TRNG
>  	bool "Turris Omnia MCU true random number generator"
>  	default y
>  	depends on TURRIS_OMNIA_MCU_GPIO
> -	depends on HW_RANDOM
> +	depends on HW_RANDOM=y || HW_RANDOM=TURRIS_OMNIA_MCU
>  	help
>  	  Say Y here to add support for the true random number generator
>  	  provided by CZ.NIC's Turris Omnia MCU.
> -- 
> 2.39.2
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency
  2024-09-09 11:04 [PATCH] platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency Arnd Bergmann
  2024-09-10 10:09 ` Marek Behún
@ 2024-09-11  9:00 ` patchwork-bot+linux-soc
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-soc @ 2024-09-11  9:00 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: soc

Hello:

This patch was applied to soc/soc.git (arm/fixes)
by Arnd Bergmann <arnd@arndb.de>:

On Mon,  9 Sep 2024 11:04:09 +0000 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> There is still a build failure when the rwrng support is in a loadable
> module but the mcu driver is built-in:
> 
> arm-linux-gnueabi-ld: drivers/platform/cznic/turris-omnia-mcu-trng.o: in function `omnia_mcu_register_trng':
> turris-omnia-mcu-trng.c:(.text.omnia_mcu_register_trng+0x11c): undefined reference to `devm_hwrng_register'
> 
> [...]

Here is the summary with links:
  - platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency
    https://git.kernel.org/soc/soc/c/b97acde6f984

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-11  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09 11:04 [PATCH] platform: cznic: turris-omnia-mcu: fix HW_RANDOM dependency Arnd Bergmann
2024-09-10 10:09 ` Marek Behún
2024-09-11  9:00 ` patchwork-bot+linux-soc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox