[U-Boot] [PATCH 1/7] s5p: cpu_info: use defined CPU name if available

Simon Glass sjg at chromium.org
Tue Sep 1 02:33:14 CEST 2015


Hi Przemyslaw,

On 28 August 2015 at 07:59, Przemyslaw Marczak <p.marczak at samsung.com> wrote:
> The CPU name for Exynos was concatenated with cpu id,
> but for new Exynos platforms, like Chromebook Peach Pi
> based on Exynos5800, the name of SoC variant does not
> include the real SoC cpu id (0x5422).
>
> For such case, the CPU name should be defined by the
> config file.
>
> This commit introduces new config:
> - CONFIG_CPU_NAME - with cpu name string
>
> If defined, then the cpu id is not printed.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
> ---
>  arch/arm/cpu/armv7/s5p-common/cpu_info.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
> index 154d674..9b125a3 100644
> --- a/arch/arm/cpu/armv7/s5p-common/cpu_info.c
> +++ b/arch/arm/cpu/armv7/s5p-common/cpu_info.c
> @@ -30,7 +30,12 @@ u32 get_device_type(void)
>  #ifdef CONFIG_DISPLAY_CPUINFO
>  int print_cpuinfo(void)
>  {
> +/* For SoC with no real CPU ID in naming convention. */
> +#ifdef CONFIG_CPU_NAME
> +       printf("CPU:   %s @ ", CONFIG_CPU_NAME);
> +#else
>         printf("CPU:   %s%X @ ", s5p_get_cpu_name(), s5p_cpu_id);
> +#endif

This adds a new CONFIG option - we should be trying to keep the code
common. Does it print 5422 instead of 5800?

I'd suggest, either:

a) we don't care, 5422 is fine
b) we grab it from the device tree model or compatible string

>         print_freq(get_arm_clk(), "\n");
>
>         return 0;
> --
> 1.9.1
>

Regards,
Simon


More information about the U-Boot mailing list