diff mbox series

crypto: starfive - Depend on AMBA_PL08X instead of selecting it

Message ID ZGwmAp5RPqAjVMCg@gondor.apana.org.au
State Accepted
Commit 48e7fbf6623137b35b19677caa096945a0ef3497
Headers show
Series crypto: starfive - Depend on AMBA_PL08X instead of selecting it | expand

Commit Message

Herbert Xu May 23, 2023, 2:33 a.m. UTC
On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote:
> 
> That did not fix it :-(

OK, this patch should fix it:

---8<---
A platform option like AMBA should never be selected by a driver.
Use a dependency instead.

Also remove the depenency on DMADEVICES because the driver builds
just fine without it.  Instead add a dependency on HAS_DMA for dma
mapping support.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Conor Dooley <conor.dooley@microchip.com> 
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Comments

Stephen Rothwell May 25, 2023, 1:25 a.m. UTC | #1
Hi Herbert,

On Tue, 23 May 2023 10:33:38 +0800 Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote:
> > 
> > That did not fix it :-(  
> 
> OK, this patch should fix it:

That seems to have fixed it, thanks.
Geert Uytterhoeven June 6, 2023, 9:12 a.m. UTC | #2
Hi Herbert,

On Tue, May 23, 2023 at 4:40 AM Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Tue, May 23, 2023 at 10:36:37AM +1000, Stephen Rothwell wrote:
> > That did not fix it :-(
>
> OK, this patch should fix it:
>
> ---8<---
> A platform option like AMBA should never be selected by a driver.
> Use a dependency instead.

FTR:

arch/arm/mach-s3c/Kconfig.s3c64xx=config S3C64XX_PL080
arch/arm/mach-s3c/Kconfig.s3c64xx-      def_bool DMADEVICES
arch/arm/mach-s3c/Kconfig.s3c64xx:      select AMBA_PL08X

>
> Also remove the depenency on DMADEVICES because the driver builds
> just fine without it.  Instead add a dependency on HAS_DMA for dma
> mapping support.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Reported-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig
> index 908c162ba79a..59002abcc0ad 100644
> --- a/drivers/crypto/starfive/Kconfig
> +++ b/drivers/crypto/starfive/Kconfig
> @@ -4,14 +4,13 @@
>
>  config CRYPTO_DEV_JH7110
>         tristate "StarFive JH7110 cryptographic engine driver"
> -       depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES
> +       depends on SOC_STARFIVE || AMBA_PL08X || COMPILE_TEST
> +       depends on HAS_DMA
>         select CRYPTO_ENGINE
>         select CRYPTO_HMAC
>         select CRYPTO_SHA256
>         select CRYPTO_SHA512
>         select CRYPTO_SM3_GENERIC
> -       select ARM_AMBA
> -       select AMBA_PL08X
>         help
>           Support for StarFive JH7110 crypto hardware acceleration engine.
>           This module provides acceleration for public key algo,

Gr{oetje,eeting}s,

                        Geert
Herbert Xu June 6, 2023, 9:31 a.m. UTC | #3
On Tue, Jun 06, 2023 at 11:12:05AM +0200, Geert Uytterhoeven wrote:
>
> > ---8<---
> > A platform option like AMBA should never be selected by a driver.
> > Use a dependency instead.
> 
> FTR:
> 
> arch/arm/mach-s3c/Kconfig.s3c64xx=config S3C64XX_PL080
> arch/arm/mach-s3c/Kconfig.s3c64xx-      def_bool DMADEVICES
> arch/arm/mach-s3c/Kconfig.s3c64xx:      select AMBA_PL08X

Well that isn't a driver I think so it might be OK?

Cheers,
Geert Uytterhoeven June 6, 2023, 9:34 a.m. UTC | #4
Hi Herbert,

On Tue, Jun 6, 2023 at 11:31 AM Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Tue, Jun 06, 2023 at 11:12:05AM +0200, Geert Uytterhoeven wrote:
> >
> > > ---8<---
> > > A platform option like AMBA should never be selected by a driver.
> > > Use a dependency instead.
> >
> > FTR:
> >
> > arch/arm/mach-s3c/Kconfig.s3c64xx=config S3C64XX_PL080
> > arch/arm/mach-s3c/Kconfig.s3c64xx-      def_bool DMADEVICES
> > arch/arm/mach-s3c/Kconfig.s3c64xx:      select AMBA_PL08X
>
> Well that isn't a driver I think so it might be OK?

Thanks, please ignore ;-)

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/crypto/starfive/Kconfig b/drivers/crypto/starfive/Kconfig
index 908c162ba79a..59002abcc0ad 100644
--- a/drivers/crypto/starfive/Kconfig
+++ b/drivers/crypto/starfive/Kconfig
@@ -4,14 +4,13 @@ 
 
 config CRYPTO_DEV_JH7110
 	tristate "StarFive JH7110 cryptographic engine driver"
-	depends on (SOC_STARFIVE || COMPILE_TEST) && DMADEVICES
+	depends on SOC_STARFIVE || AMBA_PL08X || COMPILE_TEST
+	depends on HAS_DMA
 	select CRYPTO_ENGINE
 	select CRYPTO_HMAC
 	select CRYPTO_SHA256
 	select CRYPTO_SHA512
 	select CRYPTO_SM3_GENERIC
-	select ARM_AMBA
-	select AMBA_PL08X
 	help
 	  Support for StarFive JH7110 crypto hardware acceleration engine.
 	  This module provides acceleration for public key algo,