[U-Boot] [PATCH 1/1] ARM: Move SYS_CACHELINE_SIZE over to Kconfig
Masahiro Yamada
yamada.masahiro at socionext.com
Sun Aug 21 17:28:19 CEST 2016
Hi Tom,
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index aef901c..15cd66a 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -79,6 +79,11 @@ config SYS_ARM_ARCH
> default 4 if CPU_SA1100
> default 8 if ARM64
>
> +config SYS_CACHELINE_SIZE
> + int
> + default 64 if CPU_V7 || ARM64
> + default 32
> +
I do not like this very much.
Next, I would need to change it to
config SYS_CACHELINE_SIZE
int
+ default 128 if CACHE_UNIPHIER
default 64 if CPU_V7 || ARM64
default 32
but I do not want to dirty the common place
with my SoC-specific stuff.
Instead, can we have this part look like as follows?
config CACHE_SHIFT_7
bool
config CACHE_SHIFT_6
bool
config SYS_CACHELINE_SIZE
int
default 128 if CACHE_SHIFT_7
default 64 if CACHE_SHIFT_6
default 32
Then, my config option can select 'CACHE_SHIFT_7'.
config CACHE_UNIPHIER
bool "Enable the UniPhier L2 cache controller"
depends on ARCH_UNIPHIER_32BIT
+ select CACHE_SHIFT_7
default y
This idea was borrowed from Linux.
(you can grep "_L1_CACHE_SHIFT" in Linux Kconfig files.)
BTW, was it difficult to move the option for all architectures?
--
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list