* [PATCH v2] crypto: atmel: fix bogus select
@ 2015-02-19 15:38 Arnd Bergmann
2015-02-20 9:13 ` Ludovic Desroches
2015-03-02 10:25 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2015-02-19 15:38 UTC (permalink / raw)
To: linux-arm-kernel
The Atmel at91 crypto driver unconditionally selects AT_HDMAC,
which results in a Kconfig warning if that driver is not enabled:
warning: (CRYPTO_DEV_ATMEL_AES) selects AT_HDMAC which has unmet direct dependencies (DMADEVICES && ARCH_AT91)
The crypty driver itself does not actually have a dependency
on a particular dma engine, other than this being the one that
is used in at91.
Removing the 'select' gets rid of the warning, but can cause
the driver to be unusable if the HDMAC is not enabled at the
same time. To work around that, this patch clarifies the runtime
dependency to be '(ARCH_AT91 && AT_XDMAC)', but adds an alternative
for COMPILE_TEST, which lets the driver get build on all systems.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: as a result of the discussion with Ludovic, clarify the
dependency.
Please apply for 3.21 if there are no further comments.
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 2fb0fdfc87df..562125183690 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -342,13 +342,12 @@ config CRYPTO_DEV_BFIN_CRC
config CRYPTO_DEV_ATMEL_AES
tristate "Support for Atmel AES hw accelerator"
- depends on ARCH_AT91
+ depends on (ARCH_AT91 && AT_XDMAC) || COMPILE_TEST
select CRYPTO_CBC
select CRYPTO_ECB
select CRYPTO_AES
select CRYPTO_ALGAPI
select CRYPTO_BLKCIPHER
- select AT_HDMAC
help
Some Atmel processors have AES hw accelerator.
Select this if you want to use the Atmel module for
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] crypto: atmel: fix bogus select
2015-02-19 15:38 [PATCH v2] crypto: atmel: fix bogus select Arnd Bergmann
@ 2015-02-20 9:13 ` Ludovic Desroches
2015-03-02 10:25 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Desroches @ 2015-02-20 9:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
On Thu, Feb 19, 2015 at 04:38:19PM +0100, Arnd Bergmann wrote:
> The Atmel at91 crypto driver unconditionally selects AT_HDMAC,
> which results in a Kconfig warning if that driver is not enabled:
>
> warning: (CRYPTO_DEV_ATMEL_AES) selects AT_HDMAC which has unmet direct dependencies (DMADEVICES && ARCH_AT91)
>
> The crypty driver itself does not actually have a dependency
> on a particular dma engine, other than this being the one that
> is used in at91.
>
> Removing the 'select' gets rid of the warning, but can cause
> the driver to be unusable if the HDMAC is not enabled at the
> same time. To work around that, this patch clarifies the runtime
> dependency to be '(ARCH_AT91 && AT_XDMAC)', but adds an alternative
> for COMPILE_TEST, which lets the driver get build on all systems.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: as a result of the discussion with Ludovic, clarify the
> dependency.
>
> Please apply for 3.21 if there are no further comments.
>
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index 2fb0fdfc87df..562125183690 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -342,13 +342,12 @@ config CRYPTO_DEV_BFIN_CRC
>
> config CRYPTO_DEV_ATMEL_AES
> tristate "Support for Atmel AES hw accelerator"
> - depends on ARCH_AT91
> + depends on (ARCH_AT91 && AT_XDMAC) || COMPILE_TEST
Sorry maybe my explanation was not clear. When I said add AT_XDMAC it
was not to replace AT_HDMAC but to have something like:
ARCH_AT91 && (AT_HDMAC || AT_XDMAC)
> select CRYPTO_CBC
> select CRYPTO_ECB
> select CRYPTO_AES
> select CRYPTO_ALGAPI
> select CRYPTO_BLKCIPHER
> - select AT_HDMAC
> help
> Some Atmel processors have AES hw accelerator.
> Select this if you want to use the Atmel module for
>
Regards
Ludovic
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] crypto: atmel: fix bogus select
2015-02-19 15:38 [PATCH v2] crypto: atmel: fix bogus select Arnd Bergmann
2015-02-20 9:13 ` Ludovic Desroches
@ 2015-03-02 10:25 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2015-03-02 10:25 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Feb 19, 2015 at 04:38:19PM +0100, Arnd Bergmann wrote:
> The Atmel at91 crypto driver unconditionally selects AT_HDMAC,
> which results in a Kconfig warning if that driver is not enabled:
>
> warning: (CRYPTO_DEV_ATMEL_AES) selects AT_HDMAC which has unmet direct dependencies (DMADEVICES && ARCH_AT91)
>
> The crypty driver itself does not actually have a dependency
> on a particular dma engine, other than this being the one that
> is used in at91.
>
> Removing the 'select' gets rid of the warning, but can cause
> the driver to be unusable if the HDMAC is not enabled at the
> same time. To work around that, this patch clarifies the runtime
> dependency to be '(ARCH_AT91 && AT_XDMAC)', but adds an alternative
> for COMPILE_TEST, which lets the driver get build on all systems.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
If this is meant to go through the crypto tree it needs to cc
linux-crypto at vger.kernel.org. Otherwise please carry on :)
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-02 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-19 15:38 [PATCH v2] crypto: atmel: fix bogus select Arnd Bergmann
2015-02-20 9:13 ` Ludovic Desroches
2015-03-02 10:25 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox