All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwrng: imx-rngc: improve dependencies
@ 2020-02-05 14:00 Uwe Kleine-König
  2020-02-12 19:51 ` Horia Geanta
  2020-02-22  1:41 ` Herbert Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2020-02-05 14:00 UTC (permalink / raw)
  To: Matt Mackall, Herbert Xu, Arnd Bergmann, Greg Kroah-Hartman
  Cc: kernel, NXP Linux Team, linux-crypto

The imx-rngc driver binds to devices that are compatible to
"fsl,imx25-rngb". Grepping through the device tree sources suggests this
only exists on i.MX25. So restrict dependencies to configs that have
this SoC enabled, but allow compile testing. For the latter additional
dependencies for clk and readl/writel are necessary.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/char/hw_random/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index 8486c29d8324..17fe954fccde 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -244,7 +244,8 @@ config HW_RANDOM_MXC_RNGA
 
 config HW_RANDOM_IMX_RNGC
 	tristate "Freescale i.MX RNGC Random Number Generator"
-	depends on ARCH_MXC
+	depends on HAS_IOMEM && HAVE_CLK
+	depends on SOC_IMX25 || COMPILE_TEST
 	default HW_RANDOM
 	---help---
 	  This driver provides kernel-side support for the Random Number
-- 
2.24.0


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

* Re: [PATCH] hwrng: imx-rngc: improve dependencies
  2020-02-05 14:00 [PATCH] hwrng: imx-rngc: improve dependencies Uwe Kleine-König
@ 2020-02-12 19:51 ` Horia Geanta
  2020-02-12 20:45   ` Uwe Kleine-König
  2020-02-22  1:41 ` Herbert Xu
  1 sibling, 1 reply; 5+ messages in thread
From: Horia Geanta @ 2020-02-12 19:51 UTC (permalink / raw)
  To: Uwe Kleine-König, Matt Mackall, Herbert Xu, Arnd Bergmann,
	Greg Kroah-Hartman
  Cc: kernel, dl-linux-imx, linux-crypto

On 2/5/2020 4:00 PM, Uwe Kleine-König wrote:
> The imx-rngc driver binds to devices that are compatible to
> "fsl,imx25-rngb". Grepping through the device tree sources suggests this
> only exists on i.MX25. So restrict dependencies to configs that have
The driver could also be used by some i.MX6 SoCs (SL, SLL),
that have a compatible rngb.

Actually i.MX6SL has a rngb node in the DT, but unfortunately it lacks
a compatible string.

I am planning to address this short term.

> this SoC enabled, but allow compile testing. For the latter additional
> dependencies for clk and readl/writel are necessary.
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/char/hw_random/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
> index 8486c29d8324..17fe954fccde 100644
> --- a/drivers/char/hw_random/Kconfig
> +++ b/drivers/char/hw_random/Kconfig
> @@ -244,7 +244,8 @@ config HW_RANDOM_MXC_RNGA
>  
>  config HW_RANDOM_IMX_RNGC
>  	tristate "Freescale i.MX RNGC Random Number Generator"
> -	depends on ARCH_MXC
> +	depends on HAS_IOMEM && HAVE_CLK
> +	depends on SOC_IMX25 || COMPILE_TEST
I guess SOC_IMX6SL and SOC_IMX6SLL will have to be added.
Does this sound good?

Thanks,
Horia

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

* Re: [PATCH] hwrng: imx-rngc: improve dependencies
  2020-02-12 19:51 ` Horia Geanta
@ 2020-02-12 20:45   ` Uwe Kleine-König
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2020-02-12 20:45 UTC (permalink / raw)
  To: Horia Geanta
  Cc: Matt Mackall, Herbert Xu, Arnd Bergmann, Greg Kroah-Hartman,
	kernel, dl-linux-imx, linux-crypto

On Wed, Feb 12, 2020 at 07:51:46PM +0000, Horia Geanta wrote:
> On 2/5/2020 4:00 PM, Uwe Kleine-König wrote:
> > The imx-rngc driver binds to devices that are compatible to
> > "fsl,imx25-rngb". Grepping through the device tree sources suggests this
> > only exists on i.MX25. So restrict dependencies to configs that have
> The driver could also be used by some i.MX6 SoCs (SL, SLL),
> that have a compatible rngb.
> 
> Actually i.MX6SL has a rngb node in the DT, but unfortunately it lacks
> a compatible string.

Also the i.MX6ULL might have a compatible device?

> I am planning to address this short term.
> 
> > this SoC enabled, but allow compile testing. For the latter additional
> > dependencies for clk and readl/writel are necessary.
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> >  drivers/char/hw_random/Kconfig | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
> > index 8486c29d8324..17fe954fccde 100644
> > --- a/drivers/char/hw_random/Kconfig
> > +++ b/drivers/char/hw_random/Kconfig
> > @@ -244,7 +244,8 @@ config HW_RANDOM_MXC_RNGA
> >  
> >  config HW_RANDOM_IMX_RNGC
> >  	tristate "Freescale i.MX RNGC Random Number Generator"
> > -	depends on ARCH_MXC
> > +	depends on HAS_IOMEM && HAVE_CLK
> > +	depends on SOC_IMX25 || COMPILE_TEST
> I guess SOC_IMX6SL and SOC_IMX6SLL will have to be added.
> Does this sound good?

I'd say currently the patch is right and once the device trees for the
imx6 variants were expanded to include these, the list here can be
expanded.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

* Re: [PATCH] hwrng: imx-rngc: improve dependencies
  2020-02-05 14:00 [PATCH] hwrng: imx-rngc: improve dependencies Uwe Kleine-König
  2020-02-12 19:51 ` Horia Geanta
@ 2020-02-22  1:41 ` Herbert Xu
  1 sibling, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2020-02-22  1:41 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Matt Mackall, Arnd Bergmann, Greg Kroah-Hartman, kernel,
	NXP Linux Team, linux-crypto

On Wed, Feb 05, 2020 at 03:00:02PM +0100, Uwe Kleine-König wrote:
> The imx-rngc driver binds to devices that are compatible to
> "fsl,imx25-rngb". Grepping through the device tree sources suggests this
> only exists on i.MX25. So restrict dependencies to configs that have
> this SoC enabled, but allow compile testing. For the latter additional
> dependencies for clk and readl/writel are necessary.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/char/hw_random/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
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] 5+ messages in thread

* Re: [PATCH] hwrng: imx-rngc: improve dependencies
@ 2020-02-15 17:16 Martin Kaiser
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Kaiser @ 2020-02-15 17:16 UTC (permalink / raw)
  To: linux-crypto

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1927 bytes --]

Thus wrote Uwe Kleine-König (u.kleine-koenigpengutronix!de):

> On Wed, Feb 12, 2020 at 07:51:46PM +0000, Horia Geanta wrote:
> > On 2/5/2020 4:00 PM, Uwe Kleine-König wrote:
> > > The imx-rngc driver binds to devices that are compatible to
> > > "fsl,imx25-rngb". Grepping through the device tree sources suggests this
> > > only exists on i.MX25. So restrict dependencies to configs that have
> > The driver could also be used by some i.MX6 SoCs (SL, SLL),
> > that have a compatible rngb.

> > Actually i.MX6SL has a rngb node in the DT, but unfortunately it lacks
> > a compatible string.

> Also the i.MX6ULL might have a compatible device?

AFAICS imx35 chips have an rngc which is compatible to this driver as
well. I don't have any hardware to test this, though.

> > I am planning to address this short term.

> > > this SoC enabled, but allow compile testing. For the latter additional
> > > dependencies for clk and readl/writel are necessary.
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > ---
> > >  drivers/char/hw_random/Kconfig | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)

> > > diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
> > > index 8486c29d8324..17fe954fccde 100644
> > > --- a/drivers/char/hw_random/Kconfig
> > > +++ b/drivers/char/hw_random/Kconfig
> > > @@ -244,7 +244,8 @@ config HW_RANDOM_MXC_RNGA

> > >  config HW_RANDOM_IMX_RNGC
> > >  	tristate "Freescale i.MX RNGC Random Number Generator"
> > > -	depends on ARCH_MXC
> > > +	depends on HAS_IOMEM && HAVE_CLK
> > > +	depends on SOC_IMX25 || COMPILE_TEST
> > I guess SOC_IMX6SL and SOC_IMX6SLL will have to be added.
> > Does this sound good?

> I'd say currently the patch is right and once the device trees for the
> imx6 variants were expanded to include these, the list here can be
> expanded.

Makes sense to me.

Reviewed-by: Martin Kaiser <martin@kaiser.cx>

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

end of thread, other threads:[~2020-02-22  1:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 14:00 [PATCH] hwrng: imx-rngc: improve dependencies Uwe Kleine-König
2020-02-12 19:51 ` Horia Geanta
2020-02-12 20:45   ` Uwe Kleine-König
2020-02-22  1:41 ` Herbert Xu
2020-02-15 17:16 Martin Kaiser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.