Skip to contentSkip to conversation

crypto: atmel: fix bogus select

PATCH Superseded Arnd Bergmann 3 participants 3 messages Feb 19, 2015 – Mar 2, 2015 Crypto API

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 crypto: atmel: fix bogus select

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.

---
v2: as a result of the discussion with Ludovic, clarify the dependency.

Please apply for 3.21 if there are no further comments.

drivers/crypto/Kconfig +1 -2
index 2fb0fdfc87df..562125183690 100644
@@ -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
#1 lore raw

PATCH v2 1/1 crypto: atmel: fix bogus select

Hi Arnd,

Quoted 27 lines · Arnd Bergmann

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.

---
v2: as a result of the discussion with Ludovic, clarify the dependency.

Please apply for 3.21 if there are no further comments.

drivers/crypto/Kconfig +0 -0
index 2fb0fdfc87df..562125183690 100644

drivers/crypto/Kconfig config CRYPTO_DEV_BFIN_CRC · line 345

Quoted 5 lines
drivers/crypto/Kconfig +1 -1
@@ -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)

drivers/crypto/Kconfig config CRYPTO_DEV_BFIN_CRC · line 353

Quoted 10 lines
drivers/crypto/Kconfig +0 -1
 	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

maintainer
#2 lore raw

PATCH v2 1/1 crypto: atmel: fix bogus select

In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

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.

Quoted 7 lines

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.

If this is meant to go through the crypto tree it needs to cc linux-crypto at vger.kernel.org. Otherwise please carry on :)

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt