diff mbox

[13/14] arm64: dts: marvell: armada-cp110: update the crypto engine compatible

Message ID 20180628151544.22134-14-antoine.tenart@bootlin.com (mailing list archive)
State Not Applicable
Delegated to: Herbert Xu
Headers show

Commit Message

Antoine Tenart June 28, 2018, 3:15 p.m. UTC
New compatibles are now supported by the Inside Secure SafeXcel driver.
As they are more specific than the old ones, they should be used
whenever possible. This patch updates the Marvell cp110 device tree
accordingly.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---
 arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gregory CLEMENT July 13, 2018, 11:44 a.m. UTC | #1
Hi Antoine,
 
 On jeu., juin 28 2018, Antoine Tenart <antoine.tenart@bootlin.com> wrote:

> New compatibles are now supported by the Inside Secure SafeXcel driver.
> As they are more specific than the old ones, they should be used
> whenever possible. This patch updates the Marvell cp110 device tree
> accordingly.
>
> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> index 2bf083272a87..bb2914f90048 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> @@ -427,7 +427,7 @@
>  		};
>  
>  		CP110_LABEL(crypto): crypto@800000 {
> -			compatible = "inside-secure,safexcel-eip197";
> +			compatible = "inside-secure,safexcel-eip197b";
>  			reg = <0x800000 0x200000>;
>  			interrupts = <ICU_GRP_NSR 87 IRQ_TYPE_LEVEL_HIGH>,
>  				<ICU_GRP_NSR 88 IRQ_TYPE_LEVEL_HIGH>,
> -- 
> 2.17.1
>
Olof Johansson July 21, 2018, 9:35 p.m. UTC | #2
Hi,

On Thu, Jun 28, 2018 at 8:15 AM, Antoine Tenart
<antoine.tenart@bootlin.com> wrote:
> New compatibles are now supported by the Inside Secure SafeXcel driver.
> As they are more specific than the old ones, they should be used
> whenever possible. This patch updates the Marvell cp110 device tree
> accordingly.
>
> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
> ---
>  arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> index 2bf083272a87..bb2914f90048 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> @@ -427,7 +427,7 @@
>                 };
>
>                 CP110_LABEL(crypto): crypto@800000 {
> -                       compatible = "inside-secure,safexcel-eip197";
> +                       compatible = "inside-secure,safexcel-eip197b";

So the device is still compatible with the less-specific binding,
right? If so, it should probably have both compatible properties in
there, not just the more specific one.

(Same for another patch in this series).



-Olof
Antoine Tenart July 23, 2018, 7:21 a.m. UTC | #3
Hi Olof,

On Sat, Jul 21, 2018 at 02:35:01PM -0700, Olof Johansson wrote:
> On Thu, Jun 28, 2018 at 8:15 AM, Antoine Tenart
> <antoine.tenart@bootlin.com> wrote:
> > New compatibles are now supported by the Inside Secure SafeXcel driver.
> > As they are more specific than the old ones, they should be used
> > whenever possible. This patch updates the Marvell cp110 device tree
> > accordingly.
> >
> > Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
> > ---
> >  arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> > index 2bf083272a87..bb2914f90048 100644
> > --- a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> > +++ b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
> > @@ -427,7 +427,7 @@
> >                 };
> >
> >                 CP110_LABEL(crypto): crypto@800000 {
> > -                       compatible = "inside-secure,safexcel-eip197";
> > +                       compatible = "inside-secure,safexcel-eip197b";
> 
> So the device is still compatible with the less-specific binding,
> right? If so, it should probably have both compatible properties in
> there, not just the more specific one.

Using "safexcel-eip197" as a compatible was a mistake as there's no such
thing as an eip197, they all have minor versions (such as 'b').

I've thought about using the compatible for a less specific binding, but
this isn't true for the other patch, using the compatible ending in
"-eip97". The engine it supports is the most specific one (i.e. with the
largest number of algorithms supported). So it would simply not work,
and as we only have a few device trees supporting the engine as of now,
I thought fixing this by removing the wrong compatible was a better
solution (of course the driver is backward compatible, and using the old
compatibles will still work).

Thanks,
Antoine
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
index 2bf083272a87..bb2914f90048 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110.dtsi
@@ -427,7 +427,7 @@ 
 		};
 
 		CP110_LABEL(crypto): crypto@800000 {
-			compatible = "inside-secure,safexcel-eip197";
+			compatible = "inside-secure,safexcel-eip197b";
 			reg = <0x800000 0x200000>;
 			interrupts = <ICU_GRP_NSR 87 IRQ_TYPE_LEVEL_HIGH>,
 				<ICU_GRP_NSR 88 IRQ_TYPE_LEVEL_HIGH>,