diff mbox series

[RFC,v2,10/23] rockchip: PX30: Read the reset cause from clock reset unit for PX30 SoC

Message ID 20240531141837.13189-11-linux.amoon@gmail.com
State RFC
Delegated to: Kever Yang
Headers show
Series Enable display cpuinfo to get the reset cause | expand

Commit Message

Anand Moon May 31, 2024, 2:18 p.m. UTC
From: Anand Moon <anand@edgeble.ai>

Read the reset cause from clock reset unit for PX30 SoC.

Cc: Jagan Teki <jagan@edgeble.ai>
Signed-off-by: Anand Moon <anand@edgeble.ai>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 arch/arm/include/asm/arch-rockchip/cru.h | 2 ++
 arch/arm/mach-rockchip/cpu-info.c        | 2 ++
 2 files changed, 4 insertions(+)

Comments

Dragan Simic May 31, 2024, 9:48 p.m. UTC | #1
Hello Anand,

On 2024-05-31 16:18, Anand Moon wrote:
> From: Anand Moon <anand@edgeble.ai>
> 
> Read the reset cause from clock reset unit for PX30 SoC.
> 
> Cc: Jagan Teki <jagan@edgeble.ai>
> Signed-off-by: Anand Moon <anand@edgeble.ai>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
>  arch/arm/include/asm/arch-rockchip/cru.h | 2 ++
>  arch/arm/mach-rockchip/cpu-info.c        | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/include/asm/arch-rockchip/cru.h
> b/arch/arm/include/asm/arch-rockchip/cru.h
> index 19bd2b405b..7a69a839e6 100644
> --- a/arch/arm/include/asm/arch-rockchip/cru.h
> +++ b/arch/arm/include/asm/arch-rockchip/cru.h
> @@ -21,6 +21,8 @@
>  #include <asm/arch-rockchip/cru_rk3568.h>

Although not related to this patch directly, a single space character
should be added between "#" and "include", for consistency.

>  #elif defined(CONFIG_ROCKCHIP_RK3588)
>  #include <asm/arch-rockchip/cru_rk3588.h>

The same comment as above.

> +#elif defined(CONFIG_ROCKCHIP_PX30)
> +#include <asm/arch-rockchip/cru_px30.h>

The same comment as above, bit this time related to this patch.

>  #endif
> 
>  /* CRU_GLB_RST_ST */
> diff --git a/arch/arm/mach-rockchip/cpu-info.c
> b/arch/arm/mach-rockchip/cpu-info.c
> index 113a03acdf..9be28754fd 100644
> --- a/arch/arm/mach-rockchip/cpu-info.c
> +++ b/arch/arm/mach-rockchip/cpu-info.c
> @@ -22,6 +22,8 @@ char *get_reset_cause(void)
>  	struct rk3568_cru *cru = rockchip_get_cru();
>  #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3588)
>  	struct rk3588_cru *cru = rockchip_get_cru();
> +#elif IS_ENABLED(CONFIG_ROCKCHIP_PX30)
> +	struct px30_cru *cru = rockchip_get_cru();
>  #endif
>  	char *cause = NULL;
diff mbox series

Patch

diff --git a/arch/arm/include/asm/arch-rockchip/cru.h b/arch/arm/include/asm/arch-rockchip/cru.h
index 19bd2b405b..7a69a839e6 100644
--- a/arch/arm/include/asm/arch-rockchip/cru.h
+++ b/arch/arm/include/asm/arch-rockchip/cru.h
@@ -21,6 +21,8 @@ 
 #include <asm/arch-rockchip/cru_rk3568.h>
 #elif defined(CONFIG_ROCKCHIP_RK3588)
 #include <asm/arch-rockchip/cru_rk3588.h>
+#elif defined(CONFIG_ROCKCHIP_PX30)
+#include <asm/arch-rockchip/cru_px30.h>
 #endif
 
 /* CRU_GLB_RST_ST */
diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c
index 113a03acdf..9be28754fd 100644
--- a/arch/arm/mach-rockchip/cpu-info.c
+++ b/arch/arm/mach-rockchip/cpu-info.c
@@ -22,6 +22,8 @@  char *get_reset_cause(void)
 	struct rk3568_cru *cru = rockchip_get_cru();
 #elif IS_ENABLED(CONFIG_ROCKCHIP_RK3588)
 	struct rk3588_cru *cru = rockchip_get_cru();
+#elif IS_ENABLED(CONFIG_ROCKCHIP_PX30)
+	struct px30_cru *cru = rockchip_get_cru();
 #endif
 	char *cause = NULL;