All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: inside-secure - do not parse the dma mask from dt
@ 2017-06-23 14:05 Antoine Tenart
  2017-06-23 14:29 ` Arnd Bergmann
  2017-07-18 10:35 ` Herbert Xu
  0 siblings, 2 replies; 4+ messages in thread
From: Antoine Tenart @ 2017-06-23 14:05 UTC (permalink / raw)
  To: herbert, davem
  Cc: Antoine Tenart, thomas.petazzoni, gregory.clement, oferh, igall,
	nadavh, arnd, linux-crypto

Remove the dma mask parsing from dt as this should not be encoded into
the engine device tree node. Keep the fallback value for now, which
should work for the boards already supported upstream.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
---

Hi Herbert,

As pointed our by Arnd (ic Cc) parsing the dma mask from the dt node of
the engine is broken. This property will be removed from the device
trees having an inside-secure safexcel engine node. While the
inside-secure won't fail because of this (as it will fallback to a
64 bits mask), the code handling the dma-mask property is dead. This
patch removes it.

Thanks!
Antoine

 drivers/crypto/inside-secure/safexcel.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
index e7f87ac12685..1fabd4aee81b 100644
--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -773,7 +773,6 @@ static int safexcel_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct resource *res;
 	struct safexcel_crypto_priv *priv;
-	u64 dma_mask;
 	int i, ret;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -802,9 +801,7 @@ static int safexcel_probe(struct platform_device *pdev)
 			return -EPROBE_DEFER;
 	}
 
-	if (of_property_read_u64(dev->of_node, "dma-mask", &dma_mask))
-		dma_mask = DMA_BIT_MASK(64);
-	ret = dma_set_mask_and_coherent(dev, dma_mask);
+	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
 	if (ret)
 		goto err_clk;
 
-- 
2.9.4

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

* Re: [PATCH] crypto: inside-secure - do not parse the dma mask from dt
  2017-06-23 14:05 [PATCH] crypto: inside-secure - do not parse the dma mask from dt Antoine Tenart
@ 2017-06-23 14:29 ` Arnd Bergmann
  2017-06-23 14:35   ` Antoine Tenart
  2017-07-18 10:35 ` Herbert Xu
  1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2017-06-23 14:29 UTC (permalink / raw)
  To: Antoine Tenart
  Cc: Herbert Xu, David Miller, Thomas Petazzoni, Gregory CLEMENT,
	oferh, igall, nadavh, linux-crypto

On Fri, Jun 23, 2017 at 4:05 PM, Antoine Tenart
<antoine.tenart@free-electrons.com> wrote:
> Remove the dma mask parsing from dt as this should not be encoded into
> the engine device tree node. Keep the fallback value for now, which
> should work for the boards already supported upstream.
>
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>

Acked-by: Arnd Bergmann <arnd@arndb.de>

> ---
>
> Hi Herbert,
>
> As pointed our by Arnd (ic Cc) parsing the dma mask from the dt node of
> the engine is broken. This property will be removed from the device
> trees having an inside-secure safexcel engine node. While the
> inside-secure won't fail because of this (as it will fallback to a
> 64 bits mask), the code handling the dma-mask property is dead. This
> patch removes it.

Do we also need a patch to update the DT binding?

       Arnd

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

* Re: [PATCH] crypto: inside-secure - do not parse the dma mask from dt
  2017-06-23 14:29 ` Arnd Bergmann
@ 2017-06-23 14:35   ` Antoine Tenart
  0 siblings, 0 replies; 4+ messages in thread
From: Antoine Tenart @ 2017-06-23 14:35 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Antoine Tenart, Herbert Xu, David Miller, Thomas Petazzoni,
	Gregory CLEMENT, oferh, igall, nadavh, linux-crypto

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

Hi Arnd,

On Fri, Jun 23, 2017 at 04:29:58PM +0200, Arnd Bergmann wrote:
> On Fri, Jun 23, 2017 at 4:05 PM, Antoine Tenart
> <antoine.tenart@free-electrons.com> wrote:
> >
> > As pointed our by Arnd (ic Cc) parsing the dma mask from the dt node of
> > the engine is broken. This property will be removed from the device
> > trees having an inside-secure safexcel engine node. While the
> > inside-secure won't fail because of this (as it will fallback to a
> > 64 bits mask), the code handling the dma-mask property is dead. This
> > patch removes it.
> 
> Do we also need a patch to update the DT binding?

You're right, we need to update the bindings documentation. I'll send a
patch for this as well.

Thanks!
Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] crypto: inside-secure - do not parse the dma mask from dt
  2017-06-23 14:05 [PATCH] crypto: inside-secure - do not parse the dma mask from dt Antoine Tenart
  2017-06-23 14:29 ` Arnd Bergmann
@ 2017-07-18 10:35 ` Herbert Xu
  1 sibling, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2017-07-18 10:35 UTC (permalink / raw)
  To: Antoine Tenart
  Cc: davem, thomas.petazzoni, gregory.clement, oferh, igall, nadavh,
	arnd, linux-crypto

On Fri, Jun 23, 2017 at 04:05:25PM +0200, Antoine Tenart wrote:
> Remove the dma mask parsing from dt as this should not be encoded into
> the engine device tree node. Keep the fallback value for now, which
> should work for the boards already supported upstream.
> 
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>

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] 4+ messages in thread

end of thread, other threads:[~2017-07-18 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 14:05 [PATCH] crypto: inside-secure - do not parse the dma mask from dt Antoine Tenart
2017-06-23 14:29 ` Arnd Bergmann
2017-06-23 14:35   ` Antoine Tenart
2017-07-18 10:35 ` Herbert Xu

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.