Message ID | 1440770374-11501-2-git-send-email-p.marczak@samsung.com |
---|---|
State | Changes Requested |
Delegated to: | Minkyu Kang |
Headers | show |
Hi Przemyslaw, On 28 August 2015 at 07:59, Przemyslaw Marczak <p.marczak@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@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
Hello Simon, On 09/01/2015 02:33 AM, Simon Glass wrote: > Hi Przemyslaw, > > On 28 August 2015 at 07:59, Przemyslaw Marczak <p.marczak@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@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? Yes, it does. > > I'd suggest, either: > > a) we don't care, 5422 is fine > b) we grab it from the device tree model or compatible string > Ok, the second one seem to be good. >> print_freq(get_arm_clk(), "\n"); >> >> return 0; >> -- >> 1.9.1 >> > > Regards, > Simon > Best regards,
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 print_freq(get_arm_clk(), "\n"); return 0;
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@samsung.com> --- arch/arm/cpu/armv7/s5p-common/cpu_info.c | 5 +++++ 1 file changed, 5 insertions(+)