diff mbox series

[v2,10/12] arm: mach-k3: Move sdelay() and wait_on_value() declaration

Message ID 20230405181337.19211-11-afd@ti.com
State Superseded
Delegated to: Tom Rini
Headers show
Series Remove K3 misc sys_proto.h header | expand

Commit Message

Andrew Davis April 5, 2023, 6:13 p.m. UTC
These probably should be in some system wide header given their use.
Until then move them out of K3 sys_proto.h so we can finish cleaning
that header out.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm/mach-k3/include/mach/sys_proto.h | 4 ----
 drivers/ram/k3-am654-ddrss.c              | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Christian Gmeiner April 6, 2023, 9:20 a.m. UTC | #1
>
> These probably should be in some system wide header given their use.
> Until then move them out of K3 sys_proto.h so we can finish cleaning
> that header out.
>

If I grep for wait_on_value there are other sys_proto.h files like the one from
arch-omap3, arch-omap4, arch-am33xx,.. that have this declaration in
sys_proto.k.

Do we really want that change? What is the plan for other arch's?

Do not take this a strong no as I am only doing some drive-by
comments. With that sayed you
can add my Rb.

> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>  arch/arm/mach-k3/include/mach/sys_proto.h | 4 ----
>  drivers/ram/k3-am654-ddrss.c              | 4 ++++
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h
> index bbe57718e1a..4b4e2a5be39 100644
> --- a/arch/arm/mach-k3/include/mach/sys_proto.h
> +++ b/arch/arm/mach-k3/include/mach/sys_proto.h
> @@ -7,10 +7,6 @@
>  #ifndef _SYS_PROTO_H_
>  #define _SYS_PROTO_H_
>
> -void sdelay(unsigned long loops);
> -u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr,
> -                 u32 bound);
> -
>  void k3_spl_init(void);
>  void k3_mem_init(void);
>  bool check_rom_loaded_sysfw(void);
> diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
> index 4453c247b29..adac14f9464 100644
> --- a/drivers/ram/k3-am654-ddrss.c
> +++ b/drivers/ram/k3-am654-ddrss.c
> @@ -18,6 +18,10 @@
>  #include <power/regulator.h>
>  #include "k3-am654-ddrss.h"
>
> +void sdelay(unsigned long loops);
> +u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr,
> +                 u32 bound);
> +
>  #define LDELAY 10000
>
>  /* DDRSS PHY configuration register fixed values */
> --
> 2.39.2
>
Andrew Davis April 6, 2023, 1:59 p.m. UTC | #2
On 4/6/23 4:20 AM, Christian Gmeiner wrote:
>>
>> These probably should be in some system wide header given their use.
>> Until then move them out of K3 sys_proto.h so we can finish cleaning
>> that header out.
>>
> 
> If I grep for wait_on_value there are other sys_proto.h files like the one from
> arch-omap3, arch-omap4, arch-am33xx,.. that have this declaration in
> sys_proto.k.
> 
> Do we really want that change? What is the plan for other arch's?
> 

sdelay() and wait_on_value() should get their own header file. Like you say
they are used in a lot of places and folks just end up putting their declarations
in their own mach-x/ dirs' miscellaneous header file.

Collecting all the declarations into one header is a different problem for
a different series, this series just moves them out of mach-k3/ for now.

Andrew

> Do not take this a strong no as I am only doing some drive-by
> comments. With that sayed you
> can add my Rb.
> 
>> Signed-off-by: Andrew Davis <afd@ti.com>
>> ---
>>   arch/arm/mach-k3/include/mach/sys_proto.h | 4 ----
>>   drivers/ram/k3-am654-ddrss.c              | 4 ++++
>>   2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h
>> index bbe57718e1a..4b4e2a5be39 100644
>> --- a/arch/arm/mach-k3/include/mach/sys_proto.h
>> +++ b/arch/arm/mach-k3/include/mach/sys_proto.h
>> @@ -7,10 +7,6 @@
>>   #ifndef _SYS_PROTO_H_
>>   #define _SYS_PROTO_H_
>>
>> -void sdelay(unsigned long loops);
>> -u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr,
>> -                 u32 bound);
>> -
>>   void k3_spl_init(void);
>>   void k3_mem_init(void);
>>   bool check_rom_loaded_sysfw(void);
>> diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
>> index 4453c247b29..adac14f9464 100644
>> --- a/drivers/ram/k3-am654-ddrss.c
>> +++ b/drivers/ram/k3-am654-ddrss.c
>> @@ -18,6 +18,10 @@
>>   #include <power/regulator.h>
>>   #include "k3-am654-ddrss.h"
>>
>> +void sdelay(unsigned long loops);
>> +u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr,
>> +                 u32 bound);
>> +
>>   #define LDELAY 10000
>>
>>   /* DDRSS PHY configuration register fixed values */
>> --
>> 2.39.2
>>
> 
>
diff mbox series

Patch

diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h
index bbe57718e1a..4b4e2a5be39 100644
--- a/arch/arm/mach-k3/include/mach/sys_proto.h
+++ b/arch/arm/mach-k3/include/mach/sys_proto.h
@@ -7,10 +7,6 @@ 
 #ifndef _SYS_PROTO_H_
 #define _SYS_PROTO_H_
 
-void sdelay(unsigned long loops);
-u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr,
-		  u32 bound);
-
 void k3_spl_init(void);
 void k3_mem_init(void);
 bool check_rom_loaded_sysfw(void);
diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
index 4453c247b29..adac14f9464 100644
--- a/drivers/ram/k3-am654-ddrss.c
+++ b/drivers/ram/k3-am654-ddrss.c
@@ -18,6 +18,10 @@ 
 #include <power/regulator.h>
 #include "k3-am654-ddrss.h"
 
+void sdelay(unsigned long loops);
+u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr,
+		  u32 bound);
+
 #define LDELAY 10000
 
 /* DDRSS PHY configuration register fixed values */