lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 17 Mar 2021 09:46:32 +0530
From:   Vaibhav Gupta <vaibhavgupta40@...il.com>
To:     Rob Herring <robh@...nel.org>
Cc:     Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Kishon Vijay Abraham <kishon@...com>,
        Sekhar Nori <nsekhar@...com>,
        Lokesh Vutla <lokeshvutla@...com>,
        Praneeth Bajjuri <praneeth@...com>,
        Gowtham Tammana <g-tammana@...com>,
        linux-crypto@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Peter Ujfalusi <peter.ujfalusi@...com>,
        Vaibhav Gupta <v_gupta@...com>
Subject: Re: [PATCH v1 1/3] dt-bindings: crypto: ti,sa2ul: Add new compatible
 for AM64

On Tue, Mar 16, 2021 at 04:05:58PM -0600, Rob Herring wrote:
> On Tue, Mar 09, 2021 at 01:50:03AM +0530, Vaibhav Gupta wrote:
> > From: Peter Ujfalusi <peter.ujfalusi@...com>
> > 
> > Add the AM64 version of sa2ul to the compatible list.
> > 
> > [v_gupta@...com: Conditional dma-coherent requirement, clocks]
> > Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
> > Signed-off-by: Vaibhav Gupta <v_gupta@...com>
> > ---
> >  .../devicetree/bindings/crypto/ti,sa2ul.yaml  | 40 +++++++++++++++----
> >  1 file changed, 33 insertions(+), 7 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
> > index 1d48ac712b23..6eb9acd564c2 100644
> > --- a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
> > +++ b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
> > @@ -14,6 +14,7 @@ properties:
> >      enum:
> >        - ti,j721e-sa2ul
> >        - ti,am654-sa2ul
> > +      - ti,am64-sa2ul
> >  
> >    reg:
> >      maxItems: 1
> > @@ -45,19 +46,44 @@ properties:
> >      description:
> >        Address translation for the possible RNG child node for SA2UL
> >  
> > +  clocks:
> > +    items:
> > +      - description: Clock used by PKA
> > +      - description: Main Input Clock
> > +      - description: Clock used by rng
> > +
> > +  clock-names:
> > +    items:
> > +      - const: pka_in_clk
> > +      - const: x1_clk
> > +      - const: x2_clk
> > +
> >  patternProperties:
> >    "^rng@[a-f0-9]+$":
> >      type: object
> >      description:
> >        Child RNG node for SA2UL
> >  
> > -required:
> > -  - compatible
> > -  - reg
> > -  - power-domains
> > -  - dmas
> > -  - dma-names
> > -  - dma-coherent
> > +if:
> > +  properties:
> > +    compatible:
> > +      const: ti,am64-sa2ul
> > +then:
> > +  required:
> > +    - compatible
> > +    - reg
> > +    - power-domains
> > +    - dmas
> > +    - dma-names
> > +
> > +else:
> > +  required:
> > +    - compatible
> > +    - reg
> > +    - power-domains
> > +    - dmas
> > +    - dma-names
> > +    - dma-coherent
> 
> The only difference is 'dma-coherent'. You can simplify the if/then to 
> just that.
Hello Rob,

I agree with your point. But with that case we will have to modify/append the
'required' list. Something like:

	if !(properties.compatible == 'ti,am64-sa2ul')
		required += dma-coherent

I even tried to use anchors but that didn't help. I didn't find it even in
examples. Any hint how to achieve that?

Thanks,
Vaibhav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ