diff mbox series

[v3,17/26] clk: rk3399: use proper crypto0 name

Message ID 20220321200739.3572792-18-clabbe@baylibre.com (mailing list archive)
State Superseded
Delegated to: Herbert Xu
Headers show
Series crypto: rockchip: permit to pass self-tests | expand

Commit Message

Corentin LABBE March 21, 2022, 8:07 p.m. UTC
rk3399 has 2 crypto instance, reset for crypto1 is correctly named, but
crypto0 not.
Add a 0 to be consistent.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 include/dt-bindings/clock/rk3399-cru.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Stephen Boyd March 25, 2022, 12:41 a.m. UTC | #1
Quoting Corentin Labbe (2022-03-21 13:07:30)
> rk3399 has 2 crypto instance, reset for crypto1 is correctly named, but
> crypto0 not.
> Add a 0 to be consistent.

This is OK because nothing is using the define today?

> 
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
>  include/dt-bindings/clock/rk3399-cru.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/dt-bindings/clock/rk3399-cru.h b/include/dt-bindings/clock/rk3399-cru.h
> index 44e0a319f077..39169d94a44e 100644
> --- a/include/dt-bindings/clock/rk3399-cru.h
> +++ b/include/dt-bindings/clock/rk3399-cru.h
> @@ -547,8 +547,8 @@
>  #define SRST_H_PERILP0                 171
>  #define SRST_H_PERILP0_NOC             172
>  #define SRST_ROM                       173
> -#define SRST_CRYPTO_S                  174
> -#define SRST_CRYPTO_M                  175
> +#define SRST_CRYPTO0_S                 174
> +#define SRST_CRYPTO0_M                 175
>  
>  /* cru_softrst_con11 */
>  #define SRST_P_DCF                     176
> @@ -556,7 +556,7 @@
>  #define SRST_CM0S                      178
>  #define SRST_CM0S_DBG                  179
>  #define SRST_CM0S_PO                   180
> -#define SRST_CRYPTO                    181
> +#define SRST_CRYPTO0                   181

$ git grep SRST_CRYPTO
Documentation/devicetree/bindings/crypto/rockchip-crypto.txt:           resets = <&cru SRST_CRYPTO>;
arch/arm/boot/dts/rk3288.dtsi:          resets = <&cru SRST_CRYPTO>;

Uh oh. Just don't change it and think about something else when it
starts to feel inconsistent.
Corentin LABBE March 25, 2022, 7:40 a.m. UTC | #2
Le Thu, Mar 24, 2022 at 05:41:23PM -0700, Stephen Boyd a écrit :
> Quoting Corentin Labbe (2022-03-21 13:07:30)
> > rk3399 has 2 crypto instance, reset for crypto1 is correctly named, but
> > crypto0 not.
> > Add a 0 to be consistent.
> 
> This is OK because nothing is using the define today?

Yes, nothing use this rk3399 define.

> 
> > 
> > Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> > ---
> >  include/dt-bindings/clock/rk3399-cru.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/dt-bindings/clock/rk3399-cru.h b/include/dt-bindings/clock/rk3399-cru.h
> > index 44e0a319f077..39169d94a44e 100644
> > --- a/include/dt-bindings/clock/rk3399-cru.h
> > +++ b/include/dt-bindings/clock/rk3399-cru.h
> > @@ -547,8 +547,8 @@
> >  #define SRST_H_PERILP0                 171
> >  #define SRST_H_PERILP0_NOC             172
> >  #define SRST_ROM                       173
> > -#define SRST_CRYPTO_S                  174
> > -#define SRST_CRYPTO_M                  175
> > +#define SRST_CRYPTO0_S                 174
> > +#define SRST_CRYPTO0_M                 175
> >  
> >  /* cru_softrst_con11 */
> >  #define SRST_P_DCF                     176
> > @@ -556,7 +556,7 @@
> >  #define SRST_CM0S                      178
> >  #define SRST_CM0S_DBG                  179
> >  #define SRST_CM0S_PO                   180
> > -#define SRST_CRYPTO                    181
> > +#define SRST_CRYPTO0                   181
> 
> $ git grep SRST_CRYPTO
> Documentation/devicetree/bindings/crypto/rockchip-crypto.txt:           resets = <&cru SRST_CRYPTO>;
> arch/arm/boot/dts/rk3288.dtsi:          resets = <&cru SRST_CRYPTO>;
> 
> Uh oh. Just don't change it and think about something else when it
> starts to feel inconsistent.

This is on rk3288, so not related to rk3399.
Even on the RK3399 TRM, all crypto clocks are called either crypto0 or crypto1 (neither just crypto)

Regards
Stephen Boyd March 25, 2022, 4:52 p.m. UTC | #3
Quoting LABBE Corentin (2022-03-25 00:40:22)
> Le Thu, Mar 24, 2022 at 05:41:23PM -0700, Stephen Boyd a écrit :
> > Quoting Corentin Labbe (2022-03-21 13:07:30)
> > 
> > $ git grep SRST_CRYPTO
> > Documentation/devicetree/bindings/crypto/rockchip-crypto.txt:           resets = <&cru SRST_CRYPTO>;
> > arch/arm/boot/dts/rk3288.dtsi:          resets = <&cru SRST_CRYPTO>;
> > 
> > Uh oh. Just don't change it and think about something else when it
> > starts to feel inconsistent.
> 
> This is on rk3288, so not related to rk3399.
> Even on the RK3399 TRM, all crypto clocks are called either crypto0 or crypto1 (neither just crypto)
> 

Ok. Please add a note in the commit text why it's OK to change the
define names.
diff mbox series

Patch

diff --git a/include/dt-bindings/clock/rk3399-cru.h b/include/dt-bindings/clock/rk3399-cru.h
index 44e0a319f077..39169d94a44e 100644
--- a/include/dt-bindings/clock/rk3399-cru.h
+++ b/include/dt-bindings/clock/rk3399-cru.h
@@ -547,8 +547,8 @@ 
 #define SRST_H_PERILP0			171
 #define SRST_H_PERILP0_NOC		172
 #define SRST_ROM			173
-#define SRST_CRYPTO_S			174
-#define SRST_CRYPTO_M			175
+#define SRST_CRYPTO0_S			174
+#define SRST_CRYPTO0_M			175
 
 /* cru_softrst_con11 */
 #define SRST_P_DCF			176
@@ -556,7 +556,7 @@ 
 #define SRST_CM0S			178
 #define SRST_CM0S_DBG			179
 #define SRST_CM0S_PO			180
-#define SRST_CRYPTO			181
+#define SRST_CRYPTO0			181
 #define SRST_P_PERILP1_SGRF		182
 #define SRST_P_PERILP1_GRF		183
 #define SRST_CRYPTO1_S			184