mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: Rockchip: let boards depend on 32/64bit
@ 2023-03-22 14:07 Sascha Hauer
  2023-03-23 19:59 ` Masahiro YAMADA
  0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2023-03-22 14:07 UTC (permalink / raw)
  To: Barebox List

So far we can enable support for 32bit and 64bit SoCs at the same time
which results in an unbuildable barebox. This is annoying, let the board
visibility depend on the selected code model.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/Kconfig               | 2 ++
 arch/arm/mach-rockchip/Kconfig | 9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index abe649de49..2c1783d8e9 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -248,6 +248,8 @@ config ARCH_ROCKCHIP
 	select OFTREE
 	select HAVE_PBL_MULTI_IMAGES
 	select HAS_DEBUG_LL
+	select CPU_SUPPORTS_32BIT_KERNEL
+	select CPU_SUPPORTS_64BIT_KERNEL
 
 config ARCH_STM32MP
 	bool "STMicroelectronics STM32MP"
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 4ac75ab947..9b4913d5da 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -30,7 +30,6 @@ config ARCH_RK3288
 config ARCH_ROCKCHIP_V8
 	bool
 	select CPU_V8
-	select CPU_SUPPORTS_64BIT_KERNEL
 	select ARM_ATF
 	select RELOCATABLE
 
@@ -49,6 +48,8 @@ config ARCH_RK3568
 
 comment "select Rockchip boards:"
 
+if 32BIT
+
 config MACH_RADXA_ROCK
 	select ARCH_RK3188
 	select I2C
@@ -62,6 +63,10 @@ config MACH_PHYTEC_SOM_RK3288
 	help
 	  Say Y here if you are using a RK3288 based Phytecs SOM
 
+endif
+
+if 64BIT
+
 config MACH_RK3568_EVB
 	select ARCH_RK3568
 	bool "RK3568 EVB"
@@ -86,6 +91,8 @@ config MACH_RADXA_ROCK3
        help
 	  Say Y here if you are using a Radxa ROCK3
 
+endif
+
 comment "select board features:"
 
 config ARCH_ROCKCHIP_ATF
-- 
2.30.2




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: Rockchip: let boards depend on 32/64bit
  2023-03-22 14:07 [PATCH] ARM: Rockchip: let boards depend on 32/64bit Sascha Hauer
@ 2023-03-23 19:59 ` Masahiro YAMADA
  2023-03-24 10:45   ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Masahiro YAMADA @ 2023-03-23 19:59 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: Barebox List

On Wed, Mar 22, 2023 at 11:09 PM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> So far we can enable support for 32bit and 64bit SoCs at the same time
> which results in an unbuildable barebox. This is annoying, let the board
> visibility depend on the selected code model.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>


What is weird in the current approach is,
none of "make ARCH=arm64 allnoconfig"
"make ARCH=arm64 allyesconfig" sets CONFIG_64BIT.




I think CONFIG_64BIT should be the highest level option,
which is not selected by anyone, and does not depend on
any other CONFIG option.




config 64BIT
      bool "64bit" if "$(ARCH)" != "arm64"
      default "$(ARCH)" = "arm64"


Then, 32bit-only platforms depend on !64BIT.
and 64bit-only platforms depend on 64BIT.


config ARCH_ZYNQ
       bool "zynq (32bit)"
       depends on !64BIT

config ARCH_ZYNQMP
       bool "zynq (64bit)"
       depends on 64BIT















> ---
>  arch/arm/Kconfig               | 2 ++
>  arch/arm/mach-rockchip/Kconfig | 9 ++++++++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index abe649de49..2c1783d8e9 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -248,6 +248,8 @@ config ARCH_ROCKCHIP
>         select OFTREE
>         select HAVE_PBL_MULTI_IMAGES
>         select HAS_DEBUG_LL
> +       select CPU_SUPPORTS_32BIT_KERNEL
> +       select CPU_SUPPORTS_64BIT_KERNEL
>
>  config ARCH_STM32MP
>         bool "STMicroelectronics STM32MP"
> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
> index 4ac75ab947..9b4913d5da 100644
> --- a/arch/arm/mach-rockchip/Kconfig
> +++ b/arch/arm/mach-rockchip/Kconfig
> @@ -30,7 +30,6 @@ config ARCH_RK3288
>  config ARCH_ROCKCHIP_V8
>         bool
>         select CPU_V8
> -       select CPU_SUPPORTS_64BIT_KERNEL
>         select ARM_ATF
>         select RELOCATABLE
>
> @@ -49,6 +48,8 @@ config ARCH_RK3568
>
>  comment "select Rockchip boards:"
>
> +if 32BIT
> +
>  config MACH_RADXA_ROCK
>         select ARCH_RK3188
>         select I2C
> @@ -62,6 +63,10 @@ config MACH_PHYTEC_SOM_RK3288
>         help
>           Say Y here if you are using a RK3288 based Phytecs SOM
>
> +endif
> +
> +if 64BIT
> +
>  config MACH_RK3568_EVB
>         select ARCH_RK3568
>         bool "RK3568 EVB"
> @@ -86,6 +91,8 @@ config MACH_RADXA_ROCK3
>         help
>           Say Y here if you are using a Radxa ROCK3
>
> +endif
> +
>  comment "select board features:"
>
>  config ARCH_ROCKCHIP_ATF
> --
> 2.30.2
>
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: Rockchip: let boards depend on 32/64bit
  2023-03-23 19:59 ` Masahiro YAMADA
@ 2023-03-24 10:45   ` Sascha Hauer
  0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2023-03-24 10:45 UTC (permalink / raw)
  To: Masahiro YAMADA; +Cc: Barebox List

On Fri, Mar 24, 2023 at 04:59:56AM +0900, Masahiro YAMADA wrote:
> On Wed, Mar 22, 2023 at 11:09 PM Sascha Hauer <s.hauer@pengutronix.de> wrote:
> >
> > So far we can enable support for 32bit and 64bit SoCs at the same time
> > which results in an unbuildable barebox. This is annoying, let the board
> > visibility depend on the selected code model.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> 
> 
> What is weird in the current approach is,
> none of "make ARCH=arm64 allnoconfig"
> "make ARCH=arm64 allyesconfig" sets CONFIG_64BIT.
> 
> 
> 
> 
> I think CONFIG_64BIT should be the highest level option,
> which is not selected by anyone, and does not depend on
> any other CONFIG option.

Yes, I've also already realized there's something fishy with the way
32bit vs. 64bit is handled in our Kconfig options, I just didn't know
what to do about it.

Making CONFIG_64BIT the highest level option really seems to solve it
well. I'll send a patch for it shortly.

Thanks for noting and motivating ;)

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-24 10:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-22 14:07 [PATCH] ARM: Rockchip: let boards depend on 32/64bit Sascha Hauer
2023-03-23 19:59 ` Masahiro YAMADA
2023-03-24 10:45   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox