[PATCH RFC v2 01/23] rockchip: RK3328: Read the reset cause from clock reset unit for RK3328 SoC

Kever Yang kever.yang at rock-chips.com
Tue Jul 16 04:28:24 CEST 2024


Hi Anand,

On 2024/5/31 22:18, Anand Moon wrote:
> From: Anand Moon<anand at edgeble.ai>
>
> Read the reset cause from clock reset unit for RK3328 SoC.
>
> Cc: Jagan Teki<jagan at edgeble.ai>
> Signed-off-by: Anand Moon<anand at edgeble.ai>
> Signed-off-by: Anand Moon<linux.amoon at gmail.com>
I thing one signature is enough for you, right?
> ---
>   arch/arm/include/asm/arch-rockchip/cru.h | 2 ++
>   arch/arm/mach-rockchip/cpu-info.c        | 4 +++-
>   2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/arch-rockchip/cru.h b/arch/arm/include/asm/arch-rockchip/cru.h
> index 9778790f34..a1499e9652 100644
> --- a/arch/arm/include/asm/arch-rockchip/cru.h
> +++ b/arch/arm/include/asm/arch-rockchip/cru.h
> @@ -13,6 +13,8 @@
>   
>   #if defined(CONFIG_ROCKCHIP_RK3288)
>   # include <asm/arch-rockchip/cru_rk3288.h>
> +#elif defined(CONFIG_ROCKCHIP_RK3328)
> +#include <asm/arch-rockchip/cru_rk3328.h>
>   #elif defined(CONFIG_ROCKCHIP_RK3399)
>   # include <asm/arch-rockchip/cru_rk3399.h>
>   #elif defined(CONFIG_ROCKCHIP_RK3568)
> diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c
> index a62ff53c6a..86b0c02970 100644
> --- a/arch/arm/mach-rockchip/cpu-info.c
> +++ b/arch/arm/mach-rockchip/cpu-info.c
> @@ -14,7 +14,9 @@
>   
>   char *get_reset_cause(void)
>   {
> -	struct rockchip_cru *cru = rockchip_get_cru();
> +#if IS_ENABLED(CONFIG_ROCKCHIP_RK3328)
> +	struct rk3328_cru *cru = rockchip_get_cru();
> +#endif

I think we can use "rockchip_cru" for all the SoC with below define in 
cru_rk3568.h?

#define rockchip_cru rk3328_cru


Thanks,
- Kever
>   	char *cause = NULL;
>   
>   	if (IS_ERR(cru))


More information about the U-Boot mailing list