diff mbox series

[v1,5/9] arm: rockchip: Enable display cpuinfo to be build with SPL_BUILD

Message ID 20240516090031.2373-6-anand@edgeble.ai
State New
Delegated to: Kever Yang
Headers show
Series [v1,1/9] rockchip: RK3328: Read the reset cause from clock reset unit for RK3328 SoC | expand

Commit Message

Anand Moon May 16, 2024, 8:59 a.m. UTC
Changes help enable CONFIG_DISPLAY_CPUINFO to build with SPL_BUILD for
SoC RK356x and RK3588.

Cc: Jagan Teki <jagan@edgeble.ai>
Signed-off-by: Anand Moon <anand@edgeble.ai>
---
 arch/arm/mach-rockchip/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Quentin Schulz May 16, 2024, 1:45 p.m. UTC | #1
Hi Anand,

On 5/16/24 10:59 AM, Anand Moon wrote:
> Changes help enable CONFIG_DISPLAY_CPUINFO to build with SPL_BUILD for
> SoC RK356x and RK3588.
>  > Cc: Jagan Teki <jagan@edgeble.ai>
> Signed-off-by: Anand Moon <anand@edgeble.ai>
> ---
>   arch/arm/mach-rockchip/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
> index c07bdaee4c..6722e7c9ea 100644
> --- a/arch/arm/mach-rockchip/Makefile
> +++ b/arch/arm/mach-rockchip/Makefile
> @@ -25,7 +25,7 @@ obj-y += boot_mode.o
>   obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
>   endif
>   
> -ifeq ($(CONFIG_TPL_BUILD),)
> +ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)

If I'm not mistaken, this is a way for disabling building cpu-info.o if 
either in TPL or SPL build mode (therefore only compiling for proper 
build mode).

I think it'd make more sense to convert CONFIG_DISPLAY_CPUINFO into 
three symbols, e.g. CONFIG_TPL_DISPLAY_CPUINFO, CONFIG_SPL_DISPLAY_INFO 
and then use

"""
obj-$(CONFIG_$(TPL_SPL_)DISPLAY_CPUINFO) += cpu-info.o
"""

Also... considering the mail I sent to your first patch in this patch 
series, if we migrate to using sysreset driver to print the reset 
reason, we wouldn't need this file anymore so we could remove it and not 
have to care about this.

Cheers,
Quentin
Jonas Karlman May 16, 2024, 2:03 p.m. UTC | #2
Hi Anand,

On 2024-05-16 10:59, Anand Moon wrote:
> Changes help enable CONFIG_DISPLAY_CPUINFO to build with SPL_BUILD for
> SoC RK356x and RK3588.
> 
> Cc: Jagan Teki <jagan@edgeble.ai>
> Signed-off-by: Anand Moon <anand@edgeble.ai>
> ---
>  arch/arm/mach-rockchip/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
> index c07bdaee4c..6722e7c9ea 100644
> --- a/arch/arm/mach-rockchip/Makefile
> +++ b/arch/arm/mach-rockchip/Makefile
> @@ -25,7 +25,7 @@ obj-y += boot_mode.o
>  obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
>  endif
>  
> -ifeq ($(CONFIG_TPL_BUILD),)
> +ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)

Suggest you move the cpu-info.o line inside the ifeq/endif block above.

Regards,
Jonas

>  obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o
>  endif
>
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
index c07bdaee4c..6722e7c9ea 100644
--- a/arch/arm/mach-rockchip/Makefile
+++ b/arch/arm/mach-rockchip/Makefile
@@ -25,7 +25,7 @@  obj-y += boot_mode.o
 obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o
 endif
 
-ifeq ($(CONFIG_TPL_BUILD),)
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
 obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o
 endif